Function at 0x404930
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x532f4b
mov eax, dword fs:[0]
push eax
mov eax, 0x1bc4
call fcn.005117a0
mov eax, dword [0x587770]
xor eax, esp
mov dword [esp + 0x1bc0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x587770]
xor eax, esp
push eax
lea eax, [esp + 0x1bd8]
mov dword fs:[0], eax
mov esi, ecx
xor ebx, ebx
mov dword [esp + 0x18], esi
mov dword [esp + 0x54], ebx
call fcn.00416a2a
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x404995
push 0x80004005
call fcn.00401ee0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov dword [esp + 0x1be0], ebx
mov eax, dword [esi + 0xc]
lea ecx, [eax + eax*4]
mov ecx, dword [ecx*8 + 0x58f1c8]
add ecx, ecx
xor edx, edx
mov eax, 0x64
div ecx
lea edx, [esp + 0x554]
mov dword [esp + 0x5c], edx
lea ecx, [esp + 0x354]
mov dword [esp + 0x64], ecx
lea edx, [esp + 0xb54]
mov dword [esp + 0x68], edx
lea ecx, [esp + 0x854]
mov dword [esp + 0x70], ecx
lea edx, [esp + 0x1d4]
mov dword [esp + 0x74], edx
lea ecx, [esp + 0x654]
mov dword [esp + 0x7c], ecx
lea edx, [esp + 0x954]
mov dword [esp + 0x80], edx
lea ecx, [esp + 0x2d4]
mov dword [esp + 0x88], ecx
lea edx, [esp + 0x3d4]
mov dword [esp + 0x8c], edx
lea ecx, [esp + 0x5d4]
mov dword [esp + 0x94], ecx
lea edx, [esp + 0x6d4]
lea ecx, [esp + 0x8d4]
mov dword [esp + 0x98], edx
push 0xd
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x758]
mov dword [esp + 0x64], eax
lea eax, [esp + 0x458]
mov dword [esp + 0x70], eax
lea eax, [esp + 0xa58]
mov dword [esp + 0x7c], eax
lea eax, [esp + 0x258]
mov dword [esp + 0x88], eax
lea eax, [esp + 0x4d8]
mov dword [esp + 0x94], eax
lea eax, [esp + 0x7d8]
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], ecx
lea edx, [esp + 0x9d8]
lea eax, [esp + 0xad8]
push str.Download...1_
lea ecx, [esp + 0x24]
mov dword [esp + 0x50], ebx
mov dword [esp + 0xac], edx
mov dword [esp + 0xb0], eax
call fcn.00401b00
call fcn.0041c3be
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x20]
cmp eax, ebx
jne 0x404aec
xor eax, eax
jmp 0x404aef
mov eax, dword [eax + 0x20]
mov ebp, dword [esp + 0x1c]
push ebp
push 1
push 0x466
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [esi + 0xc]
mov edi, dword [esi + 0x58]
lea ecx, [eax + eax*4]
mov ecx, dword [ecx*8 + 0x58f1cc]
xor edx, edx
mov eax, edi
div ecx
sub ecx, edx
mov edx, dword [esi + 0x54]
lea eax, [ecx + edi]
push eax
push edx
mov dword [esi + 0x58], eax
call fcn.0050af35
add esp, 8
mov dword [esi + 0x54], eax
cmp eax, ebx
jne 0x404b75
push str.LoadFile_realloc_func_failed_n
mov edi, 0x59e710
call fcn.0040b3d0
add esp, 4
mov dword [esp + 0x1be0], 0xffffffff
lea eax, [ebp - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404b6d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
or eax, 0xffffffff
jmp 0x405e4a
mov ecx, dword [esi + 0x58]
sub ecx, edi
push ecx
add eax, edi
push 0xff
push eax
call fcn.0050e990
mov eax, dword [esi + 0xc]
lea eax, [eax + eax*4]
add eax, eax
add eax, eax
mov edx, dword [eax + eax + 0x58f1d0]
mov ecx, dword [edx]
add eax, eax
add esp, 0xc
cmp ecx, dword [esi + 0x58]
jb 0x404bad
xor ecx, ecx
mov dword [esp + 0x20], ebx
jmp 0x404bb6
mov dword [esp + 0x20], ecx
mov ecx, 1
mov dword [esp + 0x28], ecx
cmp ecx, dword [eax + 0x58f1c8]
jae 0x405d29
mov esi, dword [esp + 0x18]
mov eax, dword [esi + 0xc]
lea eax, [eax + eax*4]
mov eax, dword [eax*8 + 0x58f1d4]
cmp eax, 1
je 0x404c16
cmp eax, 2
jne 0x404be8
mov eax, 0x40000000
jmp 0x404c1b
cmp eax, 3
je 0x404c16
cmp eax, 4
je 0x404c16
cmp eax, 5
je 0x404c16
cmp eax, 6
je 0x404c16
cmp eax, 7
je 0x404c16
push eax
push str.Error_in_ReturnValueLpcRamStart___d__n
mov edi, 0x59e710
call fcn.0040b3d0
add esp, 8
jmp 0x404c24
mov eax, 0x10000000
cmp dword [esi + 0x5c], eax
jb 0x404cb1
mov eax, dword [esi + 0xc]
lea ecx, [eax + eax*4]
mov eax, dword [ecx*8 + 0x58f1d4]
cmp eax, 1
jne 0x404c3d
mov eax, 0x10000000
jmp 0x404c9a
cmp eax, 2
jne 0x404c49
mov eax, 0x40000000
jmp 0x404c9a
cmp eax, 3
jne 0x404c55
mov eax, 0x10000000
jmp 0x404c9a
cmp eax, 4
jne 0x404c61
mov eax, 0x10000000
jmp 0x404c9a
cmp eax, 5
jne 0x404c6d
mov eax, 0x10000000
jmp 0x404c9a
cmp eax, 6
jne 0x404c79
mov eax, 0x10000000
jmp 0x404c9a
cmp eax, 7
jne 0x404c85
mov eax, 0x10000000
jmp 0x404c9a
push eax
push str.Error_in_ReturnValueLpcRamStart___d__n
mov edi, 0x59e710
call fcn.0040b3d0
add esp, 8
xor eax, eax
mov ecx, dword [esi + 0xc]
lea edx, [ecx + ecx*4]
mov ecx, dword [edx*8 + 0x58f1c4]
shl ecx, 0xa
add ecx, eax
cmp dword [esi + 0x5c], ecx
jb 0x404cc5
mov ecx, dword [esp + 0x28]
mov edx, ecx
call fcn.00404620
cmp eax, 0xffffffff
je 0x404b46
mov eax, dword [esi + 0xc]
mov ecx, dword [esp + 0x28]
lea edx, [eax + eax*4]
mov eax, dword [edx*8 + 0x58f1d0]
mov edi, dword [eax + ecx*4]
mov eax, dword [esi + 0x58]
sub eax, dword [esp + 0x20]
mov dword [esp + 0x34], edi
cmp edi, eax
jbe 0x404cee
mov edi, eax
mov dword [esp + 0x34], eax
fild dword [esp + 0x48]
fst qword [esp + 0xb4]
fild dword [esp + 0x58]
fst qword [esp + 0xac]
fxch st(1)
fadd qword [0x565a40]
fmulp st(1)
call fcn.005113f0
mov esi, eax
push esi
lea edx, [esp + 0x20]
push str.Download..._d__
push edx
call fcn.004034d0
add esp, 0xc
call fcn.0041c3be
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x20]
test eax, eax
je 0x404d3a
mov eax, dword [eax + 0x20]
mov ecx, dword [esp + 0x1c]
push ecx
push esi
push 0x466
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov dword [esp + 0x24], 0
test edi, edi
jbe 0x405c74
mov ebp, dword [esp + 0x24]
mov edi, dword [esp + 0x18]
test ebp, ebp
jne 0x404d8e
mov eax, dword [edi + 0x54]
mov edx, dword [esp + 0x34]
xor ecx, ecx
add eax, dword [esp + 0x20]
cmp byte [eax], 0xff
jne 0x404d80
inc ecx
inc eax
cmp ecx, edx
jb 0x404d75
cmp ecx, edx
je 0x405c74
xor ebp, ebp
mov dword [esp + 0x24], ebp
mov eax, dword [edi + 0xc]
mov esi, dword [esp + 0x34]
lea eax, [eax + eax*4]
add eax, eax
add eax, eax
mov ecx, dword [eax + eax + 0x58f1cc]
add eax, eax
sub esi, ebp
mov dword [esp + 0x50], esi
cmp esi, ecx
jbe 0x404db5
mov esi, ecx
mov dword [esp + 0x50], ecx
mov ecx, dword [eax + 0x58f1d4]
mov ebx, esi
mov dword [esp + 0x3c], ebx
cmp ecx, 2
je 0x404ddf
cmp ecx, 4
je 0x404ddf
cmp ecx, 5
je 0x404ddf
cmp ecx, 6
je 0x404ddf
cmp ecx, 3
je 0x404ddf
cmp ecx, 1
jne 0x404e19
mov eax, 0x6c16c16d
mul esi
mov eax, esi
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 7
mov edx, eax
imul edx, edx, 0xb4
mov eax, esi
sub eax, edx
je 0x404e0d
mov ebx, esi
sub ebx, eax
add ebx, 0xb4
mov dword [esp + 0x3c], ebx
cmp ecx, 1
jne 0x404e19
mov ecx, 0x10000200
jmp 0x404e7a
cmp ecx, 2
jne 0x404e25
mov ecx, 0x40000200
jmp 0x404e7a
cmp ecx, 3
jne 0x404e31
mov ecx, 0x10000200
jmp 0x404e7a
cmp ecx, 4
jne 0x404e3d
mov ecx, 0x10000200
jmp 0x404e7a
cmp ecx, 5
jne 0x404e49
mov ecx, 0x10000300
jmp 0x404e7a
cmp ecx, 6
jne 0x404e55
mov ecx, 0x10000300
jmp 0x404e7a
cmp ecx, 7
jne 0x404e61
mov ecx, 0x10000270
jmp 0x404e7a
push ecx
push str.Error_in_ReturnValueLpcRamBase___d__n
mov edi, 0x59e710
call fcn.0040b3d0
mov edi, dword [esp + 0x20]
add esp, 8
xor ecx, ecx
push ebx
mov esi, edi
call fcn.004047a0
cmp eax, 0xffffffff
je 0x405d6d
mov eax, dword [edi + 0xc]
lea eax, [eax + eax*4]
mov eax, dword [eax*8 + 0x58f1d4]
cmp eax, 2
je 0x404f9d
cmp eax, 4
je 0x404f9d
cmp eax, 5
je 0x404f9d
cmp eax, 6
je 0x404f9d
cmp eax, 3
je 0x404f9d
cmp eax, 1
je 0x404f9d
cmp eax, 7
jne 0x4058bc
xor ebp, ebp
test ebx, ebx
jbe 0x4058bc
mov edi, dword [esp + 0x3c]
sub edi, ebp
cmp edi, 0x100
jbe 0x404ef4
mov edi, 0x100
mov ecx, dword [esp + 0x24]
mov ebx, dword [esp + 0x18]
lea esi, [ecx + ebp]
add esi, dword [esp + 0x20]
mov eax, edi
add esi, dword [ebx + 0x54]
call fcn.0040ae90
mov ebx, dword [ebx]
push edi
lea edx, [esp + 0xbd8]
push edx
call fcn.0040b0b0
test eax, eax
jne 0x405d6d
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
add eax, ebp
add eax, dword [esp + 0x20]
mov ecx, edi
add eax, dword [edx + 0x54]
lea esi, [esp + 0xbd4]
cmp edi, 4
jb 0x404f5c
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x405d6d
sub ecx, 4
add esi, 4
add eax, 4
cmp ecx, 4
jae 0x404f44
test ecx, ecx
je 0x404f8c
mov dl, byte [esi]
cmp dl, byte [eax]
jne 0x405d6d
cmp ecx, 1
jbe 0x404f8c
mov dl, byte [esi + 1]
cmp dl, byte [eax + 1]
jne 0x405d6d
cmp ecx, 2
jbe 0x404f8c
mov cl, byte [esi + 2]
cmp cl, byte [eax + 2]
jne 0x405d6d
add ebp, edi
cmp ebp, dword [esp + 0x3c]
jb 0x404ee1
jmp 0x4058bc
mov ecx, dword [esp + 0x20]
xor eax, eax
add ebx, ebp
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
lea eax, [ecx + ebp]
add ebx, ecx
mov dword [esp + 0x38], eax
cmp eax, ebx
jae 0x4058bc
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x18]
cmp edx, dword [eax + 0x58]
jae 0x40561a
mov dword [esp + 0x44], 0
jmp 0x404fe0
mov edi, dword [esp + 0x44]
mov ecx, dword [esp + 0x30]
mov ebx, dword [esp + ecx*4 + 0x5c]
xor ebp, ebp
imul edi, edi, 0x2d
mov byte [ebx], 0x4d
mov esi, 1
mov dword [esp + 0x4c], edi
lea ecx, [ecx]
mov edx, dword [esp + 0x18]
mov eax, dword [edx + 0xc]
lea eax, [eax + eax*4]
mov eax, dword [eax*8 + 0x58f1d4]
cmp eax, 1
je 0x405058
cmp eax, 2
jne 0x405022
mov eax, 0x40000000
jmp 0x40505d
cmp eax, 3
je 0x405058
cmp eax, 4
je 0x405058
cmp eax, 5
je 0x405058
cmp eax, 6
je 0x405058
cmp eax, 7
je 0x405058
push eax
push str.Error_in_ReturnValueLpcRamStart___d__n
mov edi, 0x59e710
call fcn.0040b3d0
mov edi, dword [esp + 0x54]
mov edx, dword [esp + 0x20]
add esp, 8
jmp 0x405066
mov eax, 0x10000000
cmp dword [edx + 0x5c], eax
jb 0x40510f
mov eax, dword [edx + 0xc]
lea ecx, [eax + eax*4]
mov eax, dword [ecx*8 + 0x58f1d4]
cmp eax, 1
jne 0x40507f
mov eax, 0x10000000
jmp 0x4050e4
cmp eax, 2
jne 0x40508b
mov eax, 0x40000000
jmp 0x4050e4
cmp eax, 3
jne 0x405097
mov eax, 0x10000000
jmp 0x4050e4
cmp eax, 4
jne 0x4050a3
mov eax, 0x10000000
jmp 0x4050e4
cmp eax, 5
jne 0x4050af
mov eax, 0x10000000
jmp 0x4050e4
cmp eax, 6
jne 0x4050bb
mov eax, 0x10000000
jmp 0x4050e4
cmp eax, 7
jne 0x4050c7
mov eax, 0x10000000
jmp 0x4050e4
push eax
push str.Error_in_ReturnValueLpcRamStart___d__n
mov edi, 0x59e710
call fcn.0040b3d0
mov edi, dword [esp + 0x54]
mov edx, dword [esp + 0x20]
add esp, 8
xor eax, eax
mov ecx, dword [edx + 0xc]
lea ecx, [ecx + ecx*4]
mov ecx, dword [ecx*8 + 0x58f1c4]
shl ecx, 0xa
add ecx, eax
cmp dword [edx + 0x5c], ecx
jae 0x40510f
mov ecx, dword [edx + 0x54]
lea eax, [edi + ebp]
add eax, dword [esp + 0x38]
movzx eax, byte [eax + ecx + 0x200]
jmp 0x40511d
mov ecx, dword [edx + 0x54]
lea eax, [edi + ebp]
add eax, dword [esp + 0x38]
movzx eax, byte [eax + ecx]
add dword [esp + 0x2c], eax
mov edx, dword [esp + 0x54]
shl edx, 8
and eax, 0xff
add eax, edx
mov ecx, eax
mov eax, 0xaaaaaaab
mul ebp
shr edx, 1
lea eax, [edx + edx*2]
mov edx, ebp
sub edx, eax
mov dword [esp + 0x54], ecx
cmp edx, 2
jne 0x40518d
mov eax, dword [esp + 0x18]
mov edx, ecx
sar edx, 0x12
and edx, 0x3f
movzx edx, byte [edx + eax + 0x10]
mov byte [ebx + esi], dl
mov edx, ecx
sar edx, 0xc
and edx, 0x3f
movzx edx, byte [edx + eax + 0x10]
mov byte [ebx + esi + 1], dl
inc esi
mov edx, ecx
sar edx, 6
and edx, 0x3f
movzx edx, byte [edx + eax + 0x10]
inc esi
mov byte [ebx + esi], dl
and ecx, 0x3f
mov al, byte [ecx + eax + 0x10]
inc esi
mov byte [ebx + esi], al
inc esi
inc ebp
cmp ebp, 0x2d
jb 0x405000
mov byte [ebx + esi], 0xd
inc esi
mov byte [ebx + esi], 0xa
inc esi
mov eax, ebx
mov byte [ebx + esi], 0
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4051b0
sub eax, edx
test ebx, ebx
je 0x4051fc
test eax, eax
jle 0x4051fc
mov ecx, dword [0x5893c4]
cmp ecx, 0xffffffff
je 0x4051fc
push 0
lea edx, [esp + 0xc4]
push edx
push eax
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4051fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Write_buffer_____Error:__ld
mov edi, 0x59e710
call fcn.0040b3d0
add esp, 8
mov edx, dword [esp + 0x18]
push 1
lea eax, [esp + 0x44]
push eax
mov eax, dword [edx]
push 0x7f
lea ecx, [esp + 0x160]
push ecx
push eax
mov eax, 0x1388
call fcn.0040af10
xor eax, eax
xor edx, edx
cmp byte [ebx], al
je 0x405254
jmp 0x405230
mov cl, byte [eax + ebx]
cmp cl, 0xd
je 0x40548d
cmp cl, 0xa
je 0x40548d
mov byte [esp + edx + 0xd4], cl
inc eax
inc edx
cmp byte [eax + ebx], 0
jne 0x405230
mov byte [esp + edx + 0xd4], 0
xor eax, eax
xor edx, edx
cmp byte [esp + 0x154], al
je 0x40529c
lea esp, [esp]
mov cl, byte [esp + eax + 0x154]
cmp cl, 0xd
je 0x4054b5
cmp cl, 0xa
je 0x4054b5
mov byte [esp + edx + 0x154], cl
inc eax
inc edx
cmp byte [esp + eax + 0x154], 0
jne 0x405270
lea eax, [esp + 0xd4]
mov byte [esp + edx + 0x154], 0
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4052b0
sub eax, edx
push eax
lea ecx, [esp + 0xd8]
push ecx
lea edx, [esp + 0x15c]
push edx
call fcn.0050abb0
add esp, 0xc
test eax, eax
jne 0x405d5b
mov eax, dword [esp + 0x30]
inc eax
mov dword [esp + 0x30], eax
cmp eax, 0x14
jne 0x4055e5
xor ebp, ebp
mov edi, edi
mov eax, dword [esp + 0x2c]
push eax
push str._ld_r_n
lea ecx, [esp + 0xdc]
push 0x80
push ecx
call fcn.0050ac70
lea eax, [esp + 0xe4]
add esp, 0x10
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405320
sub eax, edx
lea edx, [esp + 0xd4]
test edx, edx
je 0x40537a
test eax, eax
jle 0x40537a
mov ecx, dword [0x5893c4]
cmp ecx, 0xffffffff
je 0x40537a
push 0
lea edx, [esp + 0xcc]
push edx
push eax
lea eax, [esp + 0xe0]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40537a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Write_buffer_____Error:__ld
mov edi, 0x59e710
call fcn.0040b3d0
add esp, 8
mov eax, dword [esp + 0x18]
push 2
lea ecx, [esp + 0x44]
push ecx
mov ecx, dword [eax]
push 0x7f
lea edx, [esp + 0x160]
push edx
push ecx
mov eax, 0x1388
call fcn.0040af10
mov edx, dword [esp + 0x2c]
push edx
push str._ld_nOK_n
lea eax, [esp + 0xdc]
push 0x80
push eax
call fcn.0050ac70
xor eax, eax
add esp, 0x10
xor ebx, ebx
xor edx, edx
cmp byte [esp + 0xd4], al
je 0x4053fc
lea ebx, [ebx]
mov cl, byte [esp + eax + 0xd4]
cmp cl, 0xd
je 0x4054dc
cmp cl, 0xa
je 0x4054dc
mov byte [esp + edx + 0xd4], cl
inc eax
inc edx
cmp byte [esp + eax + 0xd4], 0
jne 0x4053d0
mov byte [esp + edx + 0xd4], 0
xor eax, eax
xor edx, edx
cmp byte [esp + 0x154], al
je 0x40544c
jmp 0x405420
mov cl, byte [esp + eax + 0x154]
cmp cl, 0xd
je 0x405508
cmp cl, 0xa
je 0x405508
mov byte [esp + edx + 0x154], cl
inc eax
inc edx
cmp byte [esp + eax + 0x154], 0
jne 0x405420
mov byte [esp + edx + 0x154], 0
lea ecx, [esp + 0xd4]
lea eax, [esp + 0x154]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x405538
test dl, dl
je 0x405486
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x405538
add eax, 2
add ecx, 2
test dl, dl
jne 0x405462
xor eax, eax
jmp 0x40553d
test edx, edx
jbe 0x40549b
mov byte [esp + edx + 0xd4], 0xa
jmp 0x4054a0
dec edx
lea esp, [esp]
mov cl, byte [ebx + eax + 1]
cmp cl, 0xd
je 0x4054b2
cmp cl, 0xa
jne 0x40524c
inc eax
jmp 0x4054a0
test edx, edx
jbe 0x4054c3
mov byte [esp + edx + 0x154], 0xa
jmp 0x4054c4
dec edx
mov cl, byte [esp + eax + 0x155]
cmp cl, 0xd
je 0x4054d9
cmp cl, 0xa
jne 0x405290
inc eax
jmp 0x4054c4
cmp edx, ebx
jbe 0x4054ea
mov byte [esp + edx + 0xd4], 0xa
jmp 0x4054f0
dec edx
jmp 0x4054f0
mov cl, byte [esp + eax + 0xd5]
cmp cl, 0xd
je 0x405505
cmp cl, 0xa
jne 0x4053f0
inc eax
jmp 0x4054f0
cmp edx, ebx
jbe 0x405516
mov byte [esp + edx + 0x154], 0xa
jmp 0x405520
dec edx
jmp 0x405520
mov cl, byte [esp + eax + 0x155]
cmp cl, 0xd
je 0x405535
cmp cl, 0xa
jne 0x405440
inc eax
jmp 0x405520
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x4055d8
mov ecx, dword [esp + ebx*4 + 0x5c]
mov eax, ecx
lea esi, [eax + 1]
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x405550
sub eax, esi
test ecx, ecx
je 0x40559c
test eax, eax
jle 0x40559c
mov edx, dword [0x5893c4]
cmp edx, 0xffffffff
je 0x40559c
push 0
lea esi, [esp + 0xd0]
push esi
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40559c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Write_buffer_____Error:__ld
mov edi, 0x59e710
call fcn.0040b3d0
add esp, 8
mov eax, dword [esp + 0x18]
push 1
lea ecx, [esp + 0x44]
push ecx
mov ecx, dword [eax]
push 0x7f
lea edx, [esp + 0x160]
push edx
push ecx
mov eax, 0x1388
call fcn.0040af10
inc ebx
cmp ebx, 0x14
jl 0x405545
inc ebp
cmp ebp, 3
jl 0x4052f0
push str.Error_on_writing_block_CRC__1__n
jmp 0x405d60
cmp ebp, 3
jge 0x4055ce
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], ebx
mov eax, dword [esp + 0x44]
inc eax
mov dword [esp + 0x44], eax
cmp eax, 4
jb 0x404fe0
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x38]
add edx, ecx
add edx, dword [esp + 0x20]
add eax, 0xb4
mov dword [esp + 0x38], eax
cmp eax, edx
jb 0x404fbe
cmp dword [esp + 0x30], 0
je 0x4058bc
xor ebx, ebx
jmp 0x405630
mov edx, dword [esp + 0x2c]
push edx
push str._ld_r_n
lea eax, [esp + 0xdc]
push 0x80
push eax
call fcn.0050ac70
lea eax, [esp + 0xe4]
add esp, 0x10
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405660
lea ecx, [esp + 0xd4]
sub eax, edx
test ecx, ecx
je 0x4056ba
test eax, eax
jle 0x4056ba
mov ecx, dword [0x5893c4]
cmp ecx, 0xffffffff
je 0x4056ba
push 0
lea edx, [esp + 0xc8]
push edx
push eax
lea eax, [esp + 0xe0]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4056ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Write_buffer_____Error:__ld
mov edi, 0x59e710
call fcn.0040b3d0
add esp, 8
mov eax, dword [esp + 0x18]
push 2
lea ecx, [esp + 0x44]
push ecx
mov ecx, dword [eax]
push 0x7f
lea edx, [esp + 0x160]
push edx
push ecx
mov eax, 0x1388
call fcn.0040af10
mov edx, dword [esp + 0x2c]
push edx
push str._ld_nOK_n
lea eax, [esp + 0xdc]
push 0x80
push eax
call fcn.0050ac70
xor eax, eax
add esp, 0x10
xor edx, edx
cmp byte [esp + 0xd4], al
je 0x40573c
jmp 0x405710
mov cl, byte [esp + eax + 0xd4]
cmp cl, 0xd
je 0x4057b0
cmp cl, 0xa
je 0x4057b0
mov byte [esp + edx + 0xd4], cl
inc eax
inc edx
cmp byte [esp + eax + 0xd4], 0
jne 0x405710
mov byte [esp + edx + 0xd4], 0
xor eax, eax
xor edx, edx
cmp byte [esp + 0x154], al
je 0x405775
mov cl, byte [esp + eax + 0x154]
cmp cl, 0xd
je 0x4057d8
cmp cl, 0xa
je 0x4057d8
mov byte [esp + edx + 0x154], cl
inc eax
inc edx
cmp byte [esp + eax + 0x154], 0
jne 0x405751
mov byte [esp + edx + 0x154], 0
lea ecx, [esp + 0xd4]
lea eax, [esp + 0x154]
jmp 0x405790
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x405808
test dl, dl
je 0x4057ac
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x405808
add eax, 2
add ecx, 2
test dl, dl
jne 0x405790
xor eax, eax
jmp 0x40580d
test edx, edx
jbe 0x4057be
mov byte [esp + edx + 0xd4], 0xa
jmp 0x4057c0
dec edx
nop
mov cl, byte [esp + eax + 0xd5]
cmp cl, 0xd
je 0x4057d5
cmp cl, 0xa
jne 0x405730
inc eax
jmp 0x4057c0
test edx, edx
jbe 0x4057e6
mov byte [esp + edx + 0x154], 0xa
jmp 0x4057f0
dec edx
jmp 0x4057f0
mov cl, byte [esp + eax + 0x155]
cmp cl, 0xd
je 0x405805
cmp cl, 0xa
jne 0x405769
inc eax
jmp 0x4057f0
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4058b7
xor esi, esi
cmp dword [esp + 0x30], esi
jle 0x4058a3
mov ebp, dword [esp + 0x30]
mov ecx, dword [esp + esi*4 + 0x5c]
mov eax, ecx
lea edi, [eax + 1]
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x405830
sub eax, edi
test ecx, ecx
je 0x40587c
test eax, eax
jle 0x40587c
mov edx, dword [0x5893c4]
cmp edx, 0xffffffff
je 0x40587c
push 0
lea edi, [esp + 0xd4]
push edi
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40587c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Write_buffer_____Error:__ld
mov edi, 0x59e710
call fcn.0040b3d0
add esp, 8
mov eax, dword [esp + 0x18]
push 1
lea ecx, [esp + 0x44]
push ecx
mov ecx, dword [eax]
push 0x7f
lea edx, [esp + 0x160]
push edx
push ecx
mov eax, 0x1388
call fcn.0040af10
inc esi
cmp esi, ebp
jl 0x405825
inc ebx
cmp ebx, 3
jl 0x405630
push str.Error_on_writing_block_CRC__3__n
jmp 0x405d60
cmp ebx, 3
jge 0x4058ad
mov edi, dword [esp + 0x18]
mov eax, dword [edi + 0xc]
lea edx, [eax + eax*4]
mov eax, dword [edx*8 + 0x58f1d4]
cmp eax, 1
je 0x405910
cmp eax, 2
jne 0x4058de
mov eax, 0x40000000
jmp 0x405915
cmp eax, 3
je 0x405910
cmp eax, 4
je 0x405910
cmp eax, 5
je 0x405910
cmp eax, 6
je 0x405910
cmp eax, 7
je 0x405910
push eax
push str.Error_in_ReturnValueLpcRamStart___d__n
mov edi, 0x59e710
call fcn.0040b3d0
mov edi, dword [esp + 0x20]
add esp, 8
jmp 0x40591e
mov eax, 0x10000000
cmp dword [edi + 0x5c], eax
jb 0x4059b3
mov eax, dword [edi + 0xc]
lea eax, [eax + eax*4]
mov eax, dword [eax*8 + 0x58f1d4]
cmp eax, 1
jne 0x405937
mov eax, 0x10000000
jmp 0x405998
cmp eax, 2
jne 0x405943
mov eax, 0x40000000
jmp 0x405998
cmp eax, 3
jne 0x40594f
mov eax, 0x10000000
jmp 0x405998
cmp eax, 4
jne 0x40595b
mov eax, 0x10000000
jmp 0x405998
cmp eax, 5
jne 0x405967
mov eax, 0x10000000
jmp 0x405998
cmp eax, 6
jne 0x405973
mov eax, 0x10000000
jmp 0x405998
cmp eax, 7
jne 0x40597f
mov eax, 0x10000000
jmp 0x405998
push eax
push str.Error_in_ReturnValueLpcRamStart___d__n
mov edi, 0x59e710
call fcn.0040b3d0
mov edi, dword [esp + 0x20]
add esp, 8
xor eax, eax
mov ecx, dword [edi + 0xc]
lea ecx, [ecx + ecx*4]
mov edx, dword [ecx*8 + 0x58f1c4]
shl edx, 0xa
add edx, eax
cmp dword [edi + 0x5c], edx
jb 0x405c5e
mov ecx, dword [esp + 0x28]
mov edx, ecx
mov esi, edi
call fcn.00404620
cmp eax, 0xffffffff
je 0x405d6d
mov ebp, 0x200
cmp dword [esp + 0x3c], ebp
jb 0x4059f9
mov eax, dword [esp + 0x34]
cmp eax, 0x400
jae 0x4059e6
mov ebp, 0x400
jmp 0x4059f9
cmp eax, 0x1000
sbb ebp, ebp
and ebp, 0xfffff000
add ebp, 0x2000
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 0xc]
lea eax, [eax + eax*4]
add eax, eax
add eax, eax
mov ecx, dword [eax + eax + 0x58f1cc]
add eax, eax
cmp ebp, ecx
jbe 0x405a16
mov ebp, ecx
mov eax, dword [eax + 0x58f1d4]
cmp eax, 1
jne 0x405a28
mov ecx, 0x10000200
jmp 0x405a85
cmp eax, 2
jne 0x405a34
mov ecx, 0x40000200
jmp 0x405a85
cmp eax, 3
jne 0x405a40
mov ecx, 0x10000200
jmp 0x405a85
cmp eax, 4
jne 0x405a4c
mov ecx, 0x10000200
jmp 0x405a85
cmp eax, 5
jne 0x405a58
mov ecx, 0x10000300
jmp 0x405a85
cmp eax, 6
jne 0x405a64
mov ecx, 0x10000300
jmp 0x405a85
cmp eax, 7
jne 0x405a70
mov ecx, 0x10000270
jmp 0x405a85
push eax
push str.Error_in_ReturnValueLpcRamBase___d__n
mov edi, 0x59e710
call fcn.0040b3d0
add esp, 8
xor ecx, ecx
mov esi, dword [esp + 0x18]
mov edx, dword [esi + 0x5c]
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x20]
add edx, edi
push ebp
add edx, ebx
call fcn.00406100
cmp eax, 0xffffffff
je 0x405d6d
cmp dword [esp + 0x28], 0
je 0x405c5a
lea eax, [edi + ebx]
cmp eax, 0x80
jae 0x405bc5
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + 0xc]
lea edx, [eax + eax*4]
mov eax, dword [edx*8 + 0x58f1d4]
mov esi, 0x80
cmp eax, 1
jne 0x405af2
mov eax, 0x10000200
sub eax, edi
sub eax, ebx
sub eax, 0xffffff80
add ebp, edi
lea ecx, [ebx + ebp - 0x80]
jmp 0x405c43
cmp eax, 2
jne 0x405b0e
mov eax, 0x40000200
sub eax, edi
sub eax, ebx
sub eax, 0xffffff80
add ebp, edi
lea ecx, [ebx + ebp - 0x80]
jmp 0x405c43
cmp eax, 3
jne 0x405b2a
mov eax, 0x10000200
sub eax, edi
sub eax, ebx
sub eax, 0xffffff80
add ebp, edi
lea ecx, [ebx + ebp - 0x80]
jmp 0x405c43
cmp eax, 4
jne 0x405b46
mov eax, 0x10000200
sub eax, edi
sub eax, ebx
sub eax, 0xffffff80
add ebp, edi
lea ecx, [ebx + ebp - 0x80]
jmp 0x405c43
cmp eax, 5
jne 0x405b62
mov eax, 0x10000300
sub eax, edi
sub eax, ebx
sub eax, 0xffffff80
add ebp, edi
lea ecx, [ebx + ebp - 0x80]
jmp 0x405c43
cmp eax, 6
jne 0x405b7e
mov eax, 0x10000300
sub eax, edi
sub eax, ebx
sub eax, 0xffffff80
add ebp, edi
lea ecx, [ebx + ebp - 0x80]
jmp 0x405c43
cmp eax, 7
jne 0x405b9a
mov eax, 0x10000270
sub eax, edi
sub eax, ebx
sub eax, 0xffffff80
add ebp, edi
lea ecx, [ebx + ebp - 0x80]
jmp 0x405c43
push eax
push str.Error_in_ReturnValueLpcRamBase___d__n
mov edi, 0x59e710
call fcn.0040b3d0
mov edi, dword [esp + 0x2c]
xor eax, eax
sub eax, edi
sub eax, ebx
add esp, 8
sub eax, 0xffffff80
add ebp, edi
lea ecx, [ebx + ebp - 0x80]
jmp 0x405c43
mov esi, eax
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 0xc]
lea ecx, [eax + eax*4]
mov eax, dword [ecx*8 + 0x58f1d4]
cmp eax, 1
jne 0x405be4
mov eax, 0x10000200
jmp 0x405c41
cmp eax, 2
jne 0x405bf0
mov eax, 0x40000200
jmp 0x405c41
cmp eax, 3
jne 0x405bfc
mov eax, 0x10000200
jmp 0x405c41
cmp eax, 4
jne 0x405c08
mov eax, 0x10000200
jmp 0x405c41
cmp eax, 5
jne 0x405c14
mov eax, 0x10000300
jmp 0x405c41
cmp eax, 6
jne 0x405c20
mov eax, 0x10000300
jmp 0x405c41
cmp eax, 7
jne 0x405c2c
mov eax, 0x10000270
jmp 0x405c41
push eax
push str.Error_in_ReturnValueLpcRamBase___d__n
mov edi, 0x59e710
call fcn.0040b3d0
add esp, 8
xor eax, eax
mov ecx, ebp
push ecx
mov edx, esi
mov esi, dword [esp + 0x1c]
mov ecx, eax
call fcn.004061a0
cmp eax, 0xffffffff
je 0x405d6d
mov edi, dword [esp + 0x18]
mov ebp, dword [esp + 0x24]
add ebp, dword [esp + 0x50]
mov dword [esp + 0x24], ebp
cmp ebp, dword [esp + 0x34]
jb 0x404d64
fld qword [esp + 0xb4]
fadd qword [0x565a38]
fmul qword [esp + 0xac]
call fcn.005113f0
mov esi, eax
push esi
lea edx, [esp + 0x20]
push str.Download..._d__
push edx
call fcn.004034d0
add esp, 0xc
call fcn.0041c3be
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x20]
test eax, eax
je 0x405cb4
mov eax, dword [eax + 0x20]
mov ebp, dword [esp + 0x1c]
mov ebx, dword [sym.imp.USER32.dll_SendMessageA]
push ebp
push esi
push 0x466
push eax
call ebx
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0x18]
add eax, ecx
cmp eax, dword [esi + 0x58]
jb 0x405ced
xor edx, edx
cmp dword [esp + 0x28], edx
je 0x405d84
mov dword [esp + 0x20], edx
jmp 0x405d0e
mov edx, dword [esp + 0x28]
test edx, edx
je 0x405d84
mov eax, dword [esi + 0xc]
lea eax, [eax + eax*4]
mov eax, dword [eax*8 + 0x58f1d0]
add ecx, dword [eax + edx*4]
inc edx
mov dword [esp + 0x20], ecx
mov eax, dword [esi + 0xc]
inc dword [esp + 0x48]
lea ecx, [eax + eax*4]
mov dword [esp + 0x28], edx
cmp edx, dword [ecx*8 + 0x58f1c8]
jb 0x404bc6
push str.Program_too_large__running_out_of_Flash_sectors._n
mov edi, 0x59e710
call fcn.0040b3d0
lea eax, [ebp - 0x10]
add esp, 4
mov dword [esp + 0x1be0], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x404b61
push str.Error_on_writing_data__1__n
mov edi, 0x59e710
call fcn.0040b3d0
add esp, 4
mov dword [esp + 0x1be0], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
jmp 0x404b54
mov eax, dword [esi + 0xc]
lea ecx, [eax + eax*4]
mov eax, dword [ecx*8 + 0x58f1d4]
cmp eax, 1
je 0x405d9b
cmp eax, 3
jne 0x405dd1
push esi
call fcn.00406080
or edi, 0xffffffff
cmp eax, edi
jne 0x405dd4
lea eax, [ebp - 0x10]
mov dword [esp + 0x1be0], edi
lea edx, [eax + 0xc]
mov ecx, edi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405dca
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
jmp 0x405e4a
or edi, 0xffffffff
mov ecx, esi
call fcn.00405e80
test eax, eax
je 0x405df7
lea eax, [ebp - 0x10]
mov dword [esp + 0x1be0], edi
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x405dbe
push 0xf
push str.Download...100_
lea ecx, [esp + 0x24]
call fcn.00401b00
call fcn.0041c3be
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x20]
test eax, eax
je 0x405e19
mov eax, dword [eax + 0x20]
mov esi, dword [esp + 0x1c]
push esi
push 0x64
push 0x466
push eax
call ebx
lea eax, [esi - 0x10]
mov dword [esp + 0x1be0], edi
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jg 0x405e48
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x1bd8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1bc0]
xor ecx, esp
call fcn.0050a0dc
add esp, 0x1bd0
ret