Function at 0x408620
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x435710
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14c
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10], esp
xor ebx, ebx
push str.Starting_flash_write
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x14], ebx
call fcn.00409670
lea eax, [ebp - 0x28]
push eax
call fcn.00417161
mov ecx, dword [0x4551d4]
add esp, 4
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 4], ebx
push ebx
push 0x8000000
push 3
push ebx
push 1
push SysReAllocString
push ecx
call edi
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov dword [esi + 0x10024], eax
call ebx
mov dword [esi + 0x10158], eax
mov al, byte [esi + 0x10174]
test al, al
je 0x4086d8
mov edx, dword [0x4551d0]
push 0
push 0x8000000
push 3
push 0
push 1
push SysReAllocString
push edx
call edi
push 0
push eax
mov dword [esi + 0x10028], eax
call ebx
mov dword [esi + 0x1015c], eax
mov eax, dword [0x455204]
test eax, eax
jne 0x408704
mov edx, dword [esi + 0x10158]
mov eax, 0xfffffff8
add edx, eax
mov dword [esi + 0x10158], edx
mov cl, byte [esi + 0x10174]
test cl, cl
je 0x408704
add dword [esi + 0x1015c], eax
mov al, byte [esi + 0x10174]
test al, al
je 0x408768
mov eax, dword [esi + 0x10158]
shr eax, 0xf
mov dword [esi + 0x10164], eax
mov ecx, dword [esi + 0x10158]
test ecx, 0x7fff
je 0x408732
inc eax
mov dword [esi + 0x10164], eax
mov ecx, dword [esi + 0x1015c]
mov eax, ecx
shr eax, 0xf
test ecx, 0x7fff
mov dword [esi + 0x10168], eax
je 0x408752
inc eax
mov dword [esi + 0x10168], eax
mov eax, dword [esi + 0x10168]
mov ecx, dword [esi + 0x10164]
add eax, ecx
mov dword [esi + 0x10160], eax
jmp 0x408794
mov ecx, dword [esi + 0x10158]
mov eax, ecx
shr eax, 0xf
test ecx, 0x7fff
mov dword [esi + 0x10160], eax
je 0x408788
inc eax
mov dword [esi + 0x10160], eax
mov ecx, dword [esi + 0x10160]
mov dword [esi + 0x10164], ecx
mov edx, dword [0x4573cc]
push 0x64
push 0
lea ecx, [edx + 0x98]
call fcn.0040e770
mov eax, dword [0x4573cc]
push 0
lea ecx, [eax + 0x98]
call fcn.0040e790
mov eax, dword [esi + 0x10190]
mov dword [esi + 0x10154], 0x1000000
cmp eax, 0x1a
je 0x4089db
cmp eax, 0x1b
je 0x4089db
mov ecx, dword [esi + 0x101a8]
mov eax, dword [ecx + 0x20]
cmp eax, 0x2253
ja 0x40887f
je case.0x408a14.74
cmp eax, 0xd2
ja 0x40881d
je 0x408a1b
add eax, 0xffffffb7
cmp eax, 0x80
ja case.0x4089a7.34965
xor ecx, ecx
mov cl, byte [eax + 0x4094f0]
jmp dword [ecx*4 + 0x4094d8]
cmp eax, 0x1c8
ja 0x40885e
je case.0x408a14.74
sub eax, 0xd6
je 0x408982
sub eax, 0x12
je case.0x4089a7.34964
dec eax
je case.0x4089a7.34961
mov eax, dword [esi + 0x10160]
add eax, 0x200
shl eax, 0xf
mov dword [esi + 0x10154], eax
jmp 0x408b61
sub eax, 0x1c9
je case.0x408a14.75
sub eax, 0x2080
je case.0x4089a7.34961
sub eax, 7
je case.0x408a14.75
jmp case.0x4089a7.34965
cmp eax, 0x8890
ja 0x408991
je case.0x4089a7.34964
cmp eax, 0x235b
ja 0x40896b
cmp eax, 0x235a
jae case.0x408a14.74
sub eax, 0x227e
je 0x4088c1
sub eax, 0x46
je case.0x4089a7.34964
sub eax, 0x35
je case.0x408a14.74
jmp case.0x4089a7.34965
mov eax, dword [ecx + 0x24]
mov edx, 0x2201
cmp eax, 0x2210
jne 0x4088df
cmp dword [ecx + 0x28], edx
jne 0x4088df
mov dword [esi + 0x10154], 0x17e0000
cmp dword [ecx + 0x24], 0x220a
jne 0x4088f7
cmp dword [ecx + 0x28], edx
jne 0x4088f7
mov dword [esi + 0x10154], 0x13e0000
mov edi, dword [ecx + 0x24]
mov eax, 0x221a
cmp edi, eax
jne 0x40892a
cmp dword [ecx + 0x28], 0x2200
jne 0x408916
mov dword [esi + 0x10154], 0x13f0000
cmp dword [ecx + 0x24], eax
jne 0x40892a
cmp dword [ecx + 0x28], edx
jne 0x40892a
mov dword [esi + 0x10154], 0x13e0000
cmp dword [ecx + 0x24], 0x2202
jne 0x408942
cmp dword [ecx + 0x28], edx
jne 0x408942
mov dword [esi + 0x10154], 0x17e0000
cmp dword [ecx + 0x24], 0x2220
jne 0x408b61
cmp dword [ecx + 0x28], 0x2200
jne 0x408b61
mov dword [esi + 0x10154], 0x1fe0000
jmp 0x408b61
sub eax, 0x734b
je case.0x4089a7.34961
sub eax, 8
je case.0x408a14.74
sub eax, 0x1502
jne case.0x4089a7.34965
mov dword [esi + 0x10154], 0x17f0000
jmp 0x408b61
add eax, 0xffff776f
cmp eax, 0x34
ja case.0x4089a7.34965
xor edx, edx
mov dl, byte [eax + 0x409588]
jmp dword [edx*4 + 0x409574]
mov dword [esi + 0x10154], 0x13f0000
jmp 0x408b61
mov dword [esi + 0x10154], 0x11f0000
jmp 0x408b61
mov dword [esi + 0x10154], 0x11e0000
jmp 0x408b61
mov ecx, dword [esi + 0x101a8]
mov eax, dword [ecx + 0x20]
cmp eax, 0x22f6
ja 0x408ae1
je case.0x408a14.75
cmp eax, 0xd2
ja 0x408a2a
je 0x408a1b
add eax, 0xffffffb7
cmp eax, 0x80
ja case.0x408a14.76
xor ecx, ecx
mov cl, byte [eax + 0x4095d0]
jmp dword [ecx*4 + 0x4095c0]
mov dword [esi + 0x10154], 0x17e0000
jmp 0x408b61
cmp eax, 0x2250
ja 0x408a52
je case.0x408a14.75
cmp eax, 0xd6
je 0x408982
cmp eax, 0x1c9
je case.0x408a14.75
jmp case.0x408a14.76
cmp eax, 0x227e
jne case.0x408a14.76
mov eax, dword [ecx + 0x24]
mov edx, 0x2201
cmp eax, 0x220a
jne 0x408a7b
cmp dword [ecx + 0x28], edx
jne 0x408a7b
mov dword [esi + 0x10154], 0x13e0000
cmp dword [ecx + 0x24], 0x2210
jne 0x408a93
cmp dword [ecx + 0x28], edx
jne 0x408a93
mov dword [esi + 0x10154], 0x17e0000
mov edi, dword [ecx + 0x24]
mov eax, 0x221a
cmp edi, eax
jne 0x408ac6
cmp dword [ecx + 0x28], 0x2200
jne 0x408ab2
mov dword [esi + 0x10154], 0x13f0000
cmp dword [ecx + 0x24], eax
jne 0x408ac6
cmp dword [ecx + 0x28], edx
jne 0x408ac6
mov dword [esi + 0x10154], 0x13e0000
cmp dword [ecx + 0x24], 0x2202
jne 0x408942
cmp dword [ecx + 0x28], edx
jne 0x408942
jmp 0x408938
cmp eax, 0x8855
ja 0x408b2d
je 0x408982
cmp eax, 0x7353
ja 0x408b1a
je case.0x408a14.74
cmp eax, 0x22f9
je case.0x408a14.74
cmp eax, 0x2359
jbe case.0x408a14.76
cmp eax, 0x235b
jbe case.0x408a14.74
jmp case.0x408a14.76
cmp eax, 0x8815
jne case.0x408a14.76
mov dword [esi + 0x10154], 0x1fe0000
jmp 0x408b61
sub eax, 0x88ba
je case.0x408a14.75
sub eax, 0xa
je case.0x408a14.75
dec eax
je case.0x408a14.74
mov edx, dword [esi + 0x10160]
add edx, 0x200
shl edx, 0xf
mov dword [esi + 0x10154], edx
jmp 0x408b61
mov dword [esi + 0x10154], 0x13e0000
push 2
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x455204]
lea ebx, [esi + 0x1013c]
test eax, eax
jne 0x408bee
mov ecx, dword [esi + 0x10024]
lea eax, [ebp - 0x14]
push 0
push eax
push 4
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esi + 0x10024]
lea edx, [ebp - 0x14]
push 0
lea edi, [esi + 0x10144]
push edx
push 4
push edi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov al, byte [esi + 0x10174]
test al, al
je 0x408c1e
mov eax, dword [esi + 0x10028]
lea ecx, [ebp - 0x14]
push 0
push ecx
lea edx, [esi + 0x10140]
push 4
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esi + 0x10028]
lea ecx, [ebp - 0x14]
push 0
push ecx
lea edx, [esi + 0x10148]
push 4
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x408c1e
mov ecx, dword [esi + 0x10158]
mov edx, dword [ebx]
mov al, byte [esi + 0x10174]
lea edi, [esi + 0x10144]
add ecx, edx
test al, al
mov dword [edi], ecx
je 0x408c1e
mov edx, dword [esi + 0x1015c]
mov eax, dword [esi + 0x10140]
add edx, eax
mov dword [esi + 0x10148], edx
mov edi, dword [edi]
mov ecx, dword [ebx]
mov edx, dword [esi + 0x10158]
mov eax, edi
sub eax, ecx
cmp eax, edx
je 0x408c4d
push str.File_Error
mov ecx, esi
call fcn.00409670
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x10154]
lea edx, [eax + 1]
cmp edi, edx
ja 0x40944d
cmp ecx, 0x1000000
jb 0x40944d
mov ecx, eax
mov edx, eax
lea edi, [esi + 4]
push 4
shr eax, 8
shr ecx, 0x18
mov byte [esi + 6], al
mov al, byte [esi + 0x10154]
mov byte [edi], cl
push edi
shr edx, 0x10
mov ecx, esi
mov byte [esi + 5], dl
mov byte [esi + 7], al
call fcn.00407c30
mov dword [esi + 0x100a0], eax
mov al, byte [esi + 0x10174]
test al, al
setne al
mov cl, al
push 2
shr cl, 8
mov byte [edi], cl
push edi
mov ecx, esi
mov byte [esi + 5], al
call fcn.00407c30
mov edx, dword [esi + 0x10164]
mov dword [esi + 0x100a0], eax
mov al, byte [esi + 0x10164]
push 2
shr edx, 8
push edi
mov ecx, esi
mov byte [edi], dl
mov byte [esi + 5], al
call fcn.00407c30
mov dword [esi + 0x100a0], eax
mov eax, dword [ebx]
mov ecx, eax
mov edx, eax
shr eax, 8
shr ecx, 0x18
mov byte [esi + 6], al
mov al, byte [ebx]
mov byte [edi], cl
push 4
shr edx, 0x10
push edi
mov ecx, esi
mov byte [esi + 5], dl
mov byte [esi + 7], al
call fcn.00407c30
mov dword [esi + 0x100a0], eax
mov eax, dword [esi + 0x10158]
mov ecx, eax
mov edx, eax
shr eax, 8
shr ecx, 0x18
mov byte [esi + 6], al
mov al, byte [esi + 0x10158]
mov byte [edi], cl
push 4
shr edx, 0x10
push edi
mov ecx, esi
mov byte [esi + 5], dl
mov byte [esi + 7], al
call fcn.00407c30
mov ecx, dword [esi + 0x10158]
mov dword [esi + 0x100a0], eax
mov edx, dword [0x4573cc]
push ecx
add edx, 0x62c
push str._08x
push edx
call fcn.00426b2a
mov eax, dword [ebx]
add esp, 0xc
push eax
push str._08x
mov ecx, dword [0x4573cc]
add ecx, 0x618
push ecx
call fcn.00426b2a
mov ecx, dword [0x4573cc]
add esp, 0xc
push 0x5004
call fcn.0040b850
mov al, byte [esi + 0x10174]
test al, al
je 0x408e7e
mov edx, dword [esi + 0x10168]
mov al, byte [esi + 0x10168]
shr edx, 8
push 2
push edi
mov ecx, esi
mov byte [edi], dl
mov byte [esi + 5], al
call fcn.00407c30
mov dword [esi + 0x100a0], eax
mov eax, dword [esi + 0x10140]
mov ecx, eax
mov edx, eax
shr eax, 8
shr ecx, 0x18
mov byte [esi + 6], al
mov al, byte [esi + 0x10140]
mov byte [edi], cl
push 4
shr edx, 0x10
push edi
mov ecx, esi
mov byte [esi + 5], dl
mov byte [esi + 7], al
call fcn.00407c30
mov dword [esi + 0x100a0], eax
mov eax, dword [esi + 0x1015c]
mov ecx, eax
mov edx, eax
shr eax, 8
shr ecx, 0x18
mov byte [esi + 6], al
mov al, byte [esi + 0x1015c]
mov byte [edi], cl
push 4
shr edx, 0x10
push edi
mov ecx, esi
mov byte [esi + 5], dl
mov byte [esi + 7], al
call fcn.00407c30
mov ecx, dword [esi + 0x1015c]
mov dword [esi + 0x100a0], eax
mov edx, dword [0x4573cc]
push ecx
add edx, 0x630
push str._08x
push edx
call fcn.00426b2a
mov eax, dword [esi + 0x10140]
mov ecx, dword [0x4573cc]
add esp, 0xc
add ecx, 0x628
push eax
push str._08x
push ecx
call fcn.00426b2a
mov ecx, dword [0x4573cc]
add esp, 0xc
push 0x5005
call fcn.0040b850
mov dl, byte [esi + 0x10180]
push 1
push edi
mov ecx, esi
mov byte [edi], dl
call fcn.00407c30
mov dword [esi + 0x100a0], eax
mov eax, dword [esi + 0x10180]
cmp eax, 2
jge 0x408ea8
mov ecx, esi
call fcn.0040a6d0
mov edi, dword [ebp - 0x30]
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x20], eax
lea ebx, [esi + 0x800c]
lea eax, [ebp - 0x2c]
push eax
mov byte [ebx], 0xde
call fcn.00417161
mov edx, dword [ebp - 0x2c]
add esp, 4
mov eax, edx
mov dword [ebp - 0x18], eax
mov cl, byte [ebx]
cmp cl, 0x21
je 0x408f3a
cmp cl, 0x15
je 0x408f3a
mov ecx, dword [esi + 0x100a8]
test ecx, ecx
jne 0x408f3a
sub eax, edx
cmp eax, 0x14
jge 0x408f3a
push 1
push ebx
mov ecx, esi
call fcn.00407c80
lea ecx, [ebp - 0x18]
mov dword [esi + 0x1009c], eax
push ecx
call fcn.00417161
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x28]
add esp, 4
sub edx, ecx
lea eax, [ebp - 0x50]
push edx
push str.time:_03d
push eax
call fcn.00416df9
add esp, 0xc
lea ecx, [ebp - 0x50]
push ecx
mov ecx, esi
call fcn.00409670
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x2c]
mov edi, eax
sub edi, edx
jmp 0x408ed0
mov ecx, dword [ebp - 0x20]
inc ecx
cmp edi, 0x32
mov dword [ebp - 0x20], ecx
jb 0x408f52
push str.Wait_Target_Repeat_TimeOut_
mov ecx, esi
call fcn.004085a0
inc word [0x45728c]
mov eax, dword [esi + 0x100a8]
test eax, eax
jne 0x4090a3
cmp byte [ebx], 0x21
jne 0x409083
mov ebx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x14]
add ebx, edx
lea edx, [ebp - 0x14]
mov ecx, dword [esi + 0x10024]
push 0
mov eax, 0x8000
push edx
push eax
mov eax, 8
mov dword [ebp - 0x24], ebx
lea eax, [eax + esi + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x408fb1
mov dword [esi + 0x100a4], 0x15
jmp 0x4090d4
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x409063
mov eax, ebx
mov edx, ecx
shr eax, 0x18
shr edx, 8
mov byte [esi + 8], al
mov byte [esi + 4], dl
mov eax, ebx
mov edx, ebx
shr eax, 8
shr edx, 0x10
mov byte [esi + 0xa], al
mov byte [esi + 5], cl
mov byte [esi + 9], dl
mov byte [esi + 0xb], bl
xor eax, eax
mov edi, 4
lea edx, [ecx + 8]
cmp edi, edx
jae 0x408ffb
movzx dx, byte [esi + edi + 4]
add eax, edx
inc edi
jmp 0x408fe9
mov ebx, dword [ebp - 0x1c]
mov edx, dword [esi + 0x10160]
xor ecx, ecx
inc ebx
mov cl, ah
mov byte [esi + 7], al
push edx
push ebx
lea eax, [ebp - 0x50]
push str.Sending_block:_d_of__d
push eax
mov byte [esi + 6], cl
mov dword [ebp - 0x1c], ebx
call fcn.00416df9
add esp, 0x10
lea ecx, [ebp - 0x50]
push ecx
mov ecx, esi
call fcn.00409670
lea edx, [ebp - 0x18]
push edx
call fcn.00417161
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x28]
add esp, 4
sub eax, edx
lea ecx, [ebp - 0x50]
push eax
push str.time:_03d
push ecx
call fcn.00416df9
add esp, 0xc
lea edx, [ebp - 0x50]
mov ecx, esi
push edx
call fcn.00409670
jmp 0x409066
mov ebx, dword [ebp - 0x1c]
lea eax, [ebx + ebx*4]
xor edx, edx
mov ecx, dword [0x4573cc]
lea eax, [eax + eax*4]
shl eax, 2
div dword [esi + 0x10160]
push eax
call fcn.0040c340
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x4090a3
mov eax, 8
add eax, ecx
mov ecx, esi
push eax
lea eax, [esi + 4]
push eax
call fcn.00407c30
mov dword [esi + 0x100a0], eax
mov ecx, dword [ebp - 0x14]
mov eax, 0x8000
cmp ecx, eax
jne 0x4090d4
mov ecx, dword [ebp - 0x1c]
mov eax, dword [esi + 0x10164]
cmp ecx, eax
jae 0x4090d4
mov eax, dword [esi + 0x100a4]
test eax, eax
jne 0x4090d4
mov eax, dword [esi + 0x100a8]
test eax, eax
je 0x408eb3
mov al, byte [esi + 0x10174]
test al, al
je 0x40930e
mov edx, dword [esi + 0x10024]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4090fd
mov dword [esi + 0x10024], 0xffffffff
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x24], eax
lea edi, [esi + 0x800c]
lea eax, [ebp - 0x20]
push eax
xor ebx, ebx
mov byte [edi], 0xde
call fcn.00417161
add esp, 4
mov al, byte [edi]
cmp al, 0x21
je 0x409180
cmp al, 0x15
je 0x409180
mov eax, dword [esi + 0x100a8]
test eax, eax
jne 0x409180
cmp ebx, 0x14
jae 0x409180
push 1
push edi
mov ecx, esi
call fcn.00407c80
lea ecx, [ebp - 0x18]
mov dword [esi + 0x1009c], eax
push ecx
call fcn.00417161
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x28]
add esp, 4
sub edx, ecx
lea eax, [ebp - 0x50]
push edx
push str.time:_03d
push eax
call fcn.00416df9
add esp, 0xc
lea ecx, [ebp - 0x50]
push ecx
mov ecx, esi
call fcn.00409670
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
sub ebx, eax
jmp 0x40911c
cmp ebx, 0x32
jb 0x409191
push str.Wait_Target_Repeat_TimeOut_
mov ecx, esi
call fcn.004085a0
mov eax, dword [esi + 0x100a8]
test eax, eax
jne 0x4092d9
cmp byte [edi], 0x21
jne 0x4092b9
mov ebx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x14]
push 0
mov eax, 0x8000
push edx
push eax
mov eax, 8
add ebx, ecx
mov ecx, dword [esi + 0x10028]
lea eax, [eax + esi + 4]
mov dword [ebp - 0x24], ebx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4091e9
mov dword [esi + 0x100a8], 0x15
jmp 0x40930e
mov edx, dword [ebp - 0x14]
test edx, edx
je 0x409299
mov eax, edx
mov ecx, ebx
shr eax, 8
shr ecx, 0x18
mov byte [esi + 4], al
mov byte [esi + 8], cl
mov eax, ebx
mov ecx, ebx
shr eax, 0x10
shr ecx, 8
mov byte [esi + 9], al
mov byte [esi + 0xa], cl
mov byte [esi + 5], dl
mov byte [esi + 0xb], bl
xor ecx, ecx
mov eax, 4
lea edi, [edx + 8]
cmp eax, edi
jae 0x409233
movzx di, byte [esi + eax + 4]
add ecx, edi
inc eax
jmp 0x409221
mov eax, dword [ebp - 0x1c]
xor edx, edx
mov dl, ch
mov byte [esi + 7], cl
mov ecx, dword [esi + 0x10160]
inc eax
mov byte [esi + 6], dl
push ecx
push eax
lea edx, [ebp - 0x50]
push str.Sending_block:_d_of__d
push edx
mov dword [ebp - 0x1c], eax
call fcn.00416df9
add esp, 0x10
lea eax, [ebp - 0x50]
mov ecx, esi
push eax
call fcn.00409670
lea ecx, [ebp - 0x18]
push ecx
call fcn.00417161
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x28]
add esp, 4
sub edx, eax
lea eax, [ebp - 0x50]
push edx
push str.time:_03d
push eax
call fcn.00416df9
add esp, 0xc
lea ecx, [ebp - 0x50]
push ecx
mov ecx, esi
call fcn.00409670
mov eax, dword [ebp - 0x1c]
xor edx, edx
mov ecx, dword [0x4573cc]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 2
div dword [esi + 0x10160]
push eax
call fcn.0040c340
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x4092d9
mov eax, 8
lea edx, [esi + 4]
add eax, ecx
mov ecx, esi
push eax
push edx
call fcn.00407c30
mov dword [esi + 0x100a0], eax
mov ecx, dword [ebp - 0x14]
mov eax, 0x8000
cmp ecx, eax
jne 0x40930e
mov eax, dword [ebp - 0x1c]
mov ecx, dword [esi + 0x10160]
cmp eax, ecx
jae 0x40930e
mov eax, dword [esi + 0x100a4]
test eax, eax
jne 0x4093c8
mov eax, dword [esi + 0x100a8]
test eax, eax
je 0x409105
mov eax, dword [esi + 0x100a4]
test eax, eax
jne 0x4093c8
mov eax, dword [esi + 0x100a8]
test eax, eax
jne 0x4093c8
lea edi, [esi + 0x800c]
mov byte [edi], 0xde
mov al, byte [edi]
cmp al, 0x21
je 0x409359
cmp al, 0x15
je 0x409359
mov eax, dword [esi + 0x100a8]
test eax, eax
jne 0x409359
push 1
push edi
mov ecx, esi
call fcn.00407c80
mov dword [esi + 0x1009c], eax
jmp 0x409333
mov al, byte [edi]
cmp al, 0x21
jne 0x40936d
push str.Download_complete
mov ecx, esi
call fcn.00409670
jmp 0x4093c8
cmp al, 0x15
jne 0x4093c8
mov ecx, dword [0x451114]
mov dword [ebp - 0x20], ecx
push str.FLASH_programming_error
mov ecx, esi
mov byte [ebp - 4], 1
call fcn.00409670
mov dword [esi + 0x1009c], 0
mov ebx, 8
cmp dword [esi + 0x1009c], ebx
je 0x4093bc
mov eax, dword [esi + 0x100a8]
test eax, eax
jne 0x4093bc
push ebx
push edi
mov ecx, esi
call fcn.00407c80
mov dword [esi + 0x1009c], eax
jmp 0x409399
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0
call fcn.0042830e
mov al, byte [esi + 0x10174]
test al, al
je 0x409403
mov eax, dword [esi + 0x10028]
cmp eax, 0xffffffff
je 0x408c3c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x10028], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x10024]
cmp eax, 0xffffffff
je 0x409430
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x10024], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.Could_not_open_BIN_file
mov ecx, esi
call fcn.004085a0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push str.Error:_The_size_of_mot_file_is_too_large_
call fcn.00430287
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret