.text:00012748
.text:00012748 ; ??????????????? S U B R O U T I N E ???????????????????????????????????????
.text:00012748
.text:00012748
.text:00012748 ; bool __stdcall WriteFirmwareIntoPCI1620(struct _DEVICE_OBJECT *)
.text:00012748                 public ?WriteFirmwareIntoPCI1620@@YG_NPAU_DEVICE_OBJECT@@@Z
.text:00012748 ?WriteFirmwareIntoPCI1620@@YG_NPAU_DEVICE_OBJECT@@@Z proc near
.text:00012748                                         ; CODE XREF: StartInitDevice(_DEVICE_OBJECT *,bool,bool)+89p
.text:00012748                                         ; LoadFirmware(void *)+3Fp
.text:00012748
.text:00012748 var_4           = dword ptr -4
.text:00012748 arg_0           = dword ptr  4
.text:00012748
.text:00012748                 push    ecx
.text:00012749                 mov     eax, [esp+4+arg_0]
.text:0001274D                 push    ebx
.text:0001274E                 push    ebp
.text:0001274F                 push    esi
.text:00012750                 push    edi
.text:00012751                 mov     edi, [eax+28h]
.text:00012754                 mov     ebp, [edi+6Ch]
.text:00012757                 lea     ebx, [ebp+4]
.text:0001275A                 call    ?GetSystemTime@@YG_KXZ ; GetSystemTime(void)
.text:0001275F                 mov     esi, ds:__imp__WRITE_PORT_ULONG@8 ; __declspec(dllimport) WRITE_PORT_ULONG(x,x)
.text:00012765                 push    0               ; Value
.text:00012767                 push    ebx             ; Port
.text:00012768                 call    esi ; __declspec(dllimport) WRITE_PORT_ULONG(x,x) ; __declspec(dllimport) WRITE_PORT_ULONG(x,x)
.text:0001276A                 push    0Ah             ; Value
.text:0001276C                 push    ebx             ; Port
.text:0001276D                 call    esi ; __declspec(dllimport) WRITE_PORT_ULONG(x,x) ; __declspec(dllimport) WRITE_PORT_ULONG(x,x)
.text:0001276F                 push    ebx             ; Port
.text:00012770                 call    ds:__imp__READ_PORT_ULONG@4 ; __declspec(dllimport) READ_PORT_ULONG(x)
.text:00012776                 push    0               ; Value
.text:00012778                 push    ebp             ; Port
.text:00012779                 call    esi ; __declspec(dllimport) WRITE_PORT_ULONG(x,x) ; __declspec(dllimport) WRITE_PORT_ULONG(x,x)
.text:0001277B                 push    ebx             ; Port
.text:0001277C                 call    ds:__imp__READ_PORT_ULONG@4 ; __declspec(dllimport) READ_PORT_ULONG(x)
.text:00012782                 mov     [esp+14h+var_4], 1
.text:0001278A
.text:0001278A loc_1278A:                              ; CODE XREF: WriteFirmwareIntoPCI1620(_DEVICE_OBJECT *)+5Bj
.text:0001278A                 test    al, 1
.text:0001278C                 jz      short loc_127AC
.text:0001278E                 push    0               ; Value
.text:00012790                 push    ebp             ; Port
.text:00012791                 call    esi ; __declspec(dllimport) WRITE_PORT_ULONG(x,x) ; __declspec(dllimport) WRITE_PORT_ULONG(x,x)
.text:00012793                 push    ebx             ; Port
.text:00012794                 call    ds:__imp__READ_PORT_ULONG@4 ; __declspec(dllimport) READ_PORT_ULONG(x)
.text:0001279A                 inc     [esp+14h+var_4]
.text:0001279E                 cmp     [esp+14h+var_4], 5
.text:000127A3                 jb      short loc_1278A
.text:000127A5                 xor     al, al
.text:000127A7                 jmp     loc_12849
.text:000127AC ; ---------------------------------------------------------------------------
.text:000127AC
.text:000127AC loc_127AC:                              ; CODE XREF: WriteFirmwareIntoPCI1620(_DEVICE_OBJECT *)+44j
.text:000127AC                 cmp     word ptr [edi+84h], 8201h
.text:000127B5                 jnz     short loc_12821
.text:000127B7                 and     [esp+14h+var_4], 0
.text:000127BC                 cmp     dword ptr [edi+7Ch], 0
.text:000127C0                 jbe     short loc_127E5
.text:000127C2
.text:000127C2 loc_127C2:                              ; CODE XREF: WriteFirmwareIntoPCI1620(_DEVICE_OBJECT *)+9Bj
.text:000127C2                 mov     eax, [esp+14h+var_4]
.text:000127C6                 cmp     eax, 4FFFh
.text:000127CB                 jnb     short loc_127E5
.text:000127CD                 mov     ecx, [edi+78h]
.text:000127D0                 movzx   eax, byte ptr [ecx+eax]
.text:000127D4                 push    eax             ; Value
.text:000127D5                 push    ebp             ; Port
.text:000127D6                 call    esi ; __declspec(dllimport) WRITE_PORT_ULONG(x,x) ; __declspec(dllimport) WRITE_PORT_ULONG(x,x)
.text:000127D8                 inc     [esp+14h+var_4]
.text:000127DC                 mov     eax, [esp+14h+var_4]
.text:000127E0                 cmp     eax, [edi+7Ch]
.text:000127E3                 jb      short loc_127C2
.text:000127E5
.text:000127E5 loc_127E5:                              ; CODE XREF: WriteFirmwareIntoPCI1620(_DEVICE_OBJECT *)+78j
.text:000127E5                                         ; WriteFirmwareIntoPCI1620(_DEVICE_OBJECT *)+83j
.text:000127E5                 cmp     dword ptr [edi+7Ch], 8000h
.text:000127EC                 jbe     short loc_12839
.text:000127EE                 push    0               ; Value
.text:000127F0                 push    ebx             ; Port
.text:000127F1                 call    esi ; __declspec(dllimport) WRITE_PORT_ULONG(x,x) ; __declspec(dllimport) WRITE_PORT_ULONG(x,x)
.text:000127F3                 push    0Ah             ; Value
.text:000127F5                 push    ebx             ; Port
.text:000127F6                 call    esi ; __declspec(dllimport) WRITE_PORT_ULONG(x,x) ; __declspec(dllimport) WRITE_PORT_ULONG(x,x)
.text:000127F8                 mov     ebx, 8000h
.text:000127FD                 push    ebx             ; Value
.text:000127FE                 push    ebp             ; Port
.text:000127FF                 call    esi ; __declspec(dllimport) WRITE_PORT_ULONG(x,x) ; __declspec(dllimport) WRITE_PORT_ULONG(x,x)
.text:00012801                 cmp     [edi+7Ch], ebx
.text:00012804                 jbe     short loc_12839
.text:00012806
.text:00012806 loc_12806:                              ; CODE XREF: WriteFirmwareIntoPCI1620(_DEVICE_OBJECT *)+D5j
.text:00012806                 cmp     ebx, 0BFFFh
.text:0001280C                 jnb     short loc_12839
.text:0001280E                 mov     eax, [edi+78h]
.text:00012811                 movzx   eax, byte ptr [eax+ebx]
.text:00012815                 push    eax             ; Value
.text:00012816                 push    ebp             ; Port
.text:00012817                 call    esi ; __declspec(dllimport) WRITE_PORT_ULONG(x,x) ; __declspec(dllimport) WRITE_PORT_ULONG(x,x)
.text:00012819                 inc     ebx
.text:0001281A                 cmp     ebx, [edi+7Ch]
.text:0001281D                 jb      short loc_12806
.text:0001281F                 jmp     short loc_12839
.text:00012821 ; ---------------------------------------------------------------------------
.text:00012821
.text:00012821 loc_12821:                              ; CODE XREF: WriteFirmwareIntoPCI1620(_DEVICE_OBJECT *)+6Dj
.text:00012821                 xor     ebx, ebx
.text:00012823                 cmp     [edi+7Ch], ebx
.text:00012826                 jbe     short loc_12839
.text:00012828
.text:00012828 loc_12828:                              ; CODE XREF: WriteFirmwareIntoPCI1620(_DEVICE_OBJECT *)+EFj
.text:00012828                 mov     eax, [edi+78h]
.text:0001282B                 movzx   eax, byte ptr [eax+ebx]
.text:0001282F                 push    eax             ; Value
.text:00012830                 push    ebp             ; Port
.text:00012831                 call    esi ; __declspec(dllimport) WRITE_PORT_ULONG(x,x) ; __declspec(dllimport) WRITE_PORT_ULONG(x,x)
.text:00012833                 inc     ebx
.text:00012834                 cmp     ebx, [edi+7Ch]
.text:00012837                 jb      short loc_12828
.text:00012839
.text:00012839 loc_12839:                              ; CODE XREF: WriteFirmwareIntoPCI1620(_DEVICE_OBJECT *)+A4j
.text:00012839                                         ; WriteFirmwareIntoPCI1620(_DEVICE_OBJECT *)+BCj ...
.text:00012839                 push    [esp+14h+arg_0]
.text:0001283D                 call    ?SetDoneBit@@YGXPAU_DEVICE_OBJECT@@@Z ; SetDoneBit(_DEVICE_OBJECT *)
.text:00012842                 call    ?GetSystemTime@@YG_KXZ ; GetSystemTime(void)
.text:00012847                 mov     al, 1
.text:00012849
.text:00012849 loc_12849:                              ; CODE XREF: WriteFirmwareIntoPCI1620(_DEVICE_OBJECT *)+5Fj
.text:00012849                 pop     edi
.text:0001284A                 pop     esi
.text:0001284B                 pop     ebp
.text:0001284C                 pop     ebx
.text:0001284D                 pop     ecx
.text:0001284E                 retn    4
.text:0001284E ?WriteFirmwareIntoPCI1620@@YG_NPAU_DEVICE_OBJECT@@@Z endp