Function at 0x40c770
Capabilities:
Connect to http server
Delete file
Download and write a file
Move file
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x578
lea eax, [ebp - 8]
mov dword [ebp - 0x48c], eax
lea eax, [ebp - 0x4ac]
mov dword [esp], eax
mov dword [ebp - 0x494], 0x41caa0
mov dword [ebp - 0x490], 0x41d28e
mov dword [ebp - 0x488], 0x40d9a9
mov dword [ebp - 0x484], esp
call fcn.00418ac0
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov eax, dword [edx + 0x68]
xor edx, edx
cmp eax, 0x1bb
setne dl
sub edx, 1
and edx, 0x803000
mov dword [ebp - 0x4b8], edx
mov edx, dword [ecx + 0x6c]
test edx, edx
jne 0x40c840
mov eax, ecx
add eax, 0x18
mov dword [esp + 4], str.Protocol_not_supported
mov dword [esp], eax
mov dword [ebp - 0x4a8], 0xffffffff
call fcn.00402d30
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40cb81
mov eax, dword [ebp + 8]
mov dword [esp + 4], 2
add eax, 0x10
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call dword [ebp + 0x10]
mov byte [ebp - 0x4c9], 1
lea eax, [ebp - 0x4ac]
mov dword [esp], eax
call fcn.00418a60
movzx eax, byte [ebp - 0x4c9]
leave
ret
mov dword [esp + 0x1c], 0
movzx eax, ax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], edx
mov edx, dword [ecx + 0x44]
mov dword [esp + 0x10], edx
mov edx, dword [ecx + 0x3c]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov eax, dword [ecx + 0x4c]
mov dword [esp + 4], eax
mov eax, dword [ecx]
mov dword [ebp - 0x4a8], 0xffffffff
mov dword [esp], eax
call sub.WININET.DLL_InternetConnectA
sub esp, 0x20
test eax, eax
mov dword [ebp - 0x4c4], eax
je 0x40cb60
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x1c]
mov dword [esp], eax
mov dword [ebp - 0x4a8], 0xffffffff
add edx, 0x58
mov dword [esp + 8], edx
mov edx, dword [ebp + 8]
add edx, 0x50
mov dword [esp + 4], edx
call fcn.004037b0
mov edx, dword [ebp + 8]
sub esp, 4
cmp dword [edx + 0x6c], 3
jne 0x40cbe0
mov dword [ebp - 0x24], 0x422da8
mov edx, str.HEAD
mov dword [ebp - 0x20], 0
lea eax, [ebp - 0x24]
mov ecx, dword [ebp - 0x4b8]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 4], edx
mov edx, dword [ebp - 0x4c4]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp], edx
mov dword [ebp - 0x4a8], 0xc
call sub.WININET.DLL_HttpOpenRequestA
sub esp, 0x20
mov dword [ebp - 0x4b4], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.WININET.DLL_HttpSendRequestA
sub esp, 0x14
test eax, eax
jne 0x40c96a
call sub.KERNEL32.dll_GetLastError
mov ecx, dword [ebp - 0x4b4]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4a8], 0xc
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0040aa70
mov eax, dword [ebp - 0x4b4]
test eax, eax
je 0x40c9a4
mov edx, dword [ebp - 0x4b4]
mov dword [esp], edx
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x4a8], 0xc
mov dword [esp], ecx
call fcn.0040a960
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
test ecx, ecx
jle 0x40cb90
mov dword [esp + 4], 0x20
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp], eax
call fcn.00402640
test eax, eax
je 0x40ca20
add eax, 1
je 0x40cd60
mov dword [esp], eax
mov dword [ebp - 0x4a8], 0xc
call fcn.004025c0
cmp eax, 0x190
mov edx, 0x422dac
je 0x40c8e1
cmp eax, 0x195
je 0x40c8e1
lea esi, [esi]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 4]
test eax, eax
jle 0x40cb90
mov edx, dword [ebp + 8]
mov dword [esp + 4], 0x20
mov eax, dword [edx + 0xc]
mov eax, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x4a8], 0xc
mov dword [esp], eax
call fcn.00402640
test eax, eax
je 0x40cb90
add eax, 1
je 0x40cb90
mov dword [esp], eax
call fcn.004025c0
lea edx, [eax - 0xc8]
cmp edx, 0x63
ja 0x40cb95
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
test edx, edx
jle 0x40cc00
mov dword [ebp - 0x4b0], 0
mov eax, dword [ebp - 0x4b0]
jmp 0x40cab9
mov ecx, dword [ebp + 8]
add dword [ebp - 0x4b0], 1
mov eax, dword [ebp - 0x4b0]
cmp eax, dword [ecx + 4]
jge 0x40cc00
mov edx, dword [ebp + 8]
shl eax, 2
mov dword [ebp - 0x4c8], eax
mov ecx, dword [ebp - 0x4b0]
mov eax, dword [edx + 0xc]
mov eax, dword [eax + ecx*4]
mov dword [esp], str.Content_Length
mov dword [ebp - 0x4a8], 0xc
mov dword [ebp - 0x4bc], eax
call sub.KERNEL32.dll_lstrlenA
mov edx, dword [ebp - 0x4bc]
sub esp, 4
mov dword [esp + 8], eax
mov dword [esp + 4], str.Content_Length
mov eax, dword [edx + 4]
mov dword [esp], eax
call fcn.00402550
test eax, eax
jne 0x40caa0
mov ecx, dword [ebp + 8]
mov dword [esp + 4], 0x422d2c
mov edx, dword [ebp - 0x4c8]
mov eax, dword [ecx + 0xc]
mov eax, dword [eax + edx]
mov eax, dword [eax + 4]
mov dword [esp], eax
call fcn.004026c0
test eax, eax
je 0x40caa0
add eax, 2
mov dword [esp + 4], eax
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [esp], eax
call fcn.00402d30
jmp 0x40cc2b
mov eax, dword [ebp + 8]
mov dword [esp + 4], str.InternetConnect____failed
add eax, 0x18
mov dword [esp], eax
call fcn.00402d30
mov edx, dword [ebp + 0x10]
test edx, edx
jne 0x40c807
mov byte [ebp - 0x4c9], 1
jmp 0x40c829
mov eax, 0x194
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], str.Request_returned_code__d
mov dword [ebp - 0x4a8], 0xc
add eax, 0x18
mov dword [esp], eax
call fcn.00402bd0
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x40cbe0
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 2
add eax, 0x10
mov dword [esp + 8], eax
mov dword [esp], ecx
call dword [ebp + 0x10]
nop
lea esi, [esi]
mov byte [ebp - 0x4c9], 1
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40c829
mov dword [esp], eax
call fcn.0041bd20
jmp 0x40c829
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [esp + 4], 0x422d2f
mov dword [esp], eax
mov dword [ebp - 0x4a8], 0xc
call fcn.00402d30
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x4a8], 0xb
mov dword [esp], eax
call fcn.004025c0
mov dword [ebp - 0x4d8], eax
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40cc55
mov dword [esp], eax
call fcn.0041bd20
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x4a8], 0xc
add edx, 0x18
mov dword [ebp - 0x4e4], edx
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.00402d30
mov eax, dword [ebp - 0x4d8]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x20], eax
mov eax, dword [ebp + 0x10]
mov dword [ecx + 0x24], 0
test eax, eax
je 0x40ccc0
mov edx, dword [ebp + 0x14]
mov eax, ecx
add eax, 0x10
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], edx
mov dword [ebp - 0x4a8], 0xc
call dword [ebp + 0x10]
test al, al
je 0x40cbe0
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x34]
mov dword [esp + 8], str.Content_Type:
mov dword [esp], eax
mov dword [ebp - 0x4a8], 0xc
mov dword [esp + 4], edx
call fcn.0040a890
mov eax, dword [ebp - 0x30]
sub esp, 4
mov dword [esp + 4], str.html
mov dword [ebp - 0x4a8], 0xa
mov dword [esp], eax
call fcn.004026c0
test eax, eax
je 0x40cd6b
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
test eax, eax
mov dword [ecx + 0x24], 0
mov dword [ecx + 0x20], 0
je 0x40cd44
mov eax, ecx
add eax, 0x10
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], 3
mov dword [ebp - 0x4a8], 0xa
mov dword [esp], eax
call dword [ebp + 0x10]
mov byte [ebp - 0x4c9], 0
lea eax, [ebp - 0x34]
mov dword [esp], eax
call fcn.0041a790
jmp 0x40cbe7
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
jmp 0x40ca26
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], 0x422dc4
mov dword [esp], eax
call fcn.004026c0
test eax, eax
jne 0x40cd08
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], str.plain
mov dword [esp], eax
call fcn.004026c0
test eax, eax
jne 0x40cd08
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x4a8], 0xa
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
add eax, 0x10
mov dword [esp], eax
call fcn.00402d30
mov edx, dword [ebp + 0xc]
mov byte [ebp - 0x511], 0
mov dword [ebp - 0x4a8], 9
mov dword [esp], edx
call fcn.0040ab20
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x52c], eax
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x518], edx
mov dword [esp + 8], str.Last_Modified:
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0040a890
mov eax, dword [ebp - 0x38]
sub esp, 4
mov byte [ebp - 0x511], 1
mov dword [esp], eax
call fcn.0040abd0
cmp edx, dword [ebp - 0x518]
je 0x40d640
lea eax, [ebp - 0x3c]
mov dword [esp], eax
call fcn.0041a790
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x4a8], 0xa
mov dword [esp], ecx
call sub.KERNEL32.dll_DeleteFileA
sub esp, 4
lea eax, [ebp - 0x44]
mov dword [esp + 4], 0x400
mov dword [esp], eax
mov dword [ebp - 0x4a8], 0xa
call fcn.0041a760
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x4a8], 8
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.KERNEL32.dll_lstrcpyA
mov eax, dword [ebp - 0x40]
sub esp, 8
mov dword [esp + 4], str..xdl_
mov dword [esp], eax
call sub.KERNEL32.dll_lstrcatA
mov eax, dword [ebp - 0x40]
sub esp, 8
mov dword [esp], eax
call fcn.0040ab80
mov dword [ebp - 0x4e0], eax
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call fcn.0040ab20
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x544], eax
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x534], edx
mov dword [esp + 8], str.Last_Modified:
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0040a890
mov eax, dword [ebp - 0x48]
sub esp, 4
mov dword [ebp - 0x4a8], 7
mov dword [esp], eax
call fcn.0040abd0
cmp edx, dword [ebp - 0x534]
je 0x40d7b7
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call fcn.0041a790
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x4a8], 8
mov dword [esp], eax
call sub.KERNEL32.dll_DeleteFileA
sub esp, 4
mov dword [ebp - 0x4e0], 0
lea eax, [ebp - 0x24]
mov edx, dword [ebp - 0x4b8]
mov dword [esp + 0x14], eax
mov ecx, dword [ebp - 0x4c4]
mov eax, dword [ebp - 0x18]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0x422dac
mov dword [esp], ecx
mov dword [ebp - 0x4a8], 8
call sub.WININET.DLL_HttpOpenRequestA
mov edx, dword [ebp - 0x4e0]
sub esp, 0x20
mov dword [ebp - 0x4fc], eax
test edx, edx
je 0x40d770
lea eax, [ebp - 0x46c]
mov dword [ebp - 0x4c0], eax
mov dword [ebp - 0x4d0], 0x7f
mov dword [ebp - 0x4d4], pe_nt_image_headers32
nop
mov edx, dword [ebp - 0x4c0]
mov dword [edx], 1
mov dword [edx + 4], 0
mov dword [esp + 4], 1
mov dword [esp], edx
mov dword [ebp - 0x4a8], 6
call fcn.004029a0
mov ecx, dword [ebp - 0x4d0]
add dword [ebp - 0x4c0], 8
mov dword [ebp - 0x4d4], ecx
sub ecx, 1
cmp ecx, 0xfffffffe
mov dword [ebp - 0x4d0], ecx
jne 0x40cfb0
mov edx, dword [ebp - 0x4e0]
lea eax, [ebp - 0x46c]
mov dword [esp + 4], str.Range:_bytes_d__r_n
mov dword [esp], eax
mov dword [ebp - 0x4a8], 5
mov dword [esp + 8], edx
call fcn.00402bd0
mov eax, dword [ebp - 0x468]
mov dword [esp], eax
call sub.KERNEL32.dll_lstrlenA
sub esp, 4
mov ecx, dword [ebp - 0x4fc]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x468]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.WININET.DLL_HttpSendRequestA
sub esp, 0x14
test eax, eax
je 0x40d885
lea eax, [ebp - 0x64]
lea edx, [ebp - 0x46c]
mov dword [ebp - 0x4e8], eax
mov dword [ebp - 0x554], edx
sub dword [ebp - 0x4e8], 8
mov ecx, dword [ebp - 0x4e8]
mov dword [esp], ecx
call fcn.0041a790
mov eax, dword [ebp - 0x554]
cmp dword [ebp - 0x4e8], eax
jne 0x40d085
mov ecx, dword [ebp - 0x4fc]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4a8], 8
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0040aa70
mov edx, dword [ebp + 8]
mov dword [esp], edx
call fcn.0040a960
mov ecx, dword [ebp + 8]
mov dword [esp], ecx
call fcn.0040a840
cmp eax, 0xc8
je 0x40d0ef
cmp eax, 0xce
jne 0x40d731
mov eax, dword [ebp - 0x40]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 2
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x40000000
mov dword [esp], eax
mov dword [ebp - 0x4a8], 8
call sub.KERNEL32.dll_CreateFileA
mov dword [ebp - 0x500], eax
mov eax, dword [ebp - 0x4e0]
sub esp, 0x1c
test eax, eax
jne 0x40d8fa
mov eax, dword [ebp - 0x4d8]
mov ecx, 0x51eb851f
imul ecx
mov eax, dword [ebp - 0x4d8]
sar edx, 5
sar eax, 0x1f
sub edx, eax
cmp edx, 0x1400000
mov dword [ebp - 0x4f4], edx
jle 0x40d17e
mov dword [ebp - 0x4f4], 0x1400000
mov ecx, dword [ebp - 0x4f4]
lea eax, [ebp - 0x54]
mov dword [esp], eax
mov dword [ebp - 0x4a8], 8
mov dword [esp + 4], ecx
call fcn.0041a760
mov eax, dword [ebp - 0x4e0]
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0
mov dword [esp + 4], 0
mov dword [ebp - 0x4dc], eax
lea eax, [ebp - 9]
mov dword [esp], eax
mov dword [ebp - 0x4a8], 4
call fcn.00403e90
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x4f4]
add ecx, 0x10
mov dword [ebp - 0x50c], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x504], edx
test ecx, ecx
jne 0x40d23e
jmp 0x40d4cf
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40d92a
mov edx, dword [ebp - 0x50c]
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 1
mov dword [ebp - 0x4a8], 2
mov dword [esp + 8], edx
mov dword [esp], ecx
call dword [ebp + 0x10]
cmp al, 1
jne 0x40d88f
lea eax, [ebp - 0x46c]
mov dword [esp], eax
call fcn.0041a790
mov eax, dword [ebp - 0x50]
lea edx, [ebp - 0x10]
mov ecx, dword [ebp - 0x504]
mov dword [esp + 0xc], edx
mov dword [ebp - 0x4a8], 3
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4fc]
mov dword [esp + 8], ecx
mov dword [esp], eax
call sub.WININET.DLL_InternetReadFile
sub esp, 0x10
test eax, eax
mov dword [ebp - 0x4f0], 0
jne 0x40d294
mov dword [ebp - 0x4a8], 3
call sub.KERNEL32.dll_GetLastError
mov dword [ebp - 0x4f0], eax
mov edx, dword [ebp - 0x10]
lea ecx, [ebp - 0x46c]
add dword [ebp - 0x4dc], edx
mov dword [esp + 4], 0
mov dword [esp], ecx
mov dword [ebp - 0x4a8], 3
call fcn.0041a760
mov eax, dword [ebp - 0x4d8]
mov edx, dword [ebp - 0x4dc]
mov ecx, dword [ebp - 0x4f4]
mov dword [esp + 4], str.code:__d__requested__d_bytes__read__d_bytes__total:__d_of__d
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 0x14], edx
lea edx, [ebp - 0x46c]
mov dword [esp + 0xc], ecx
mov dword [esp], edx
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x4f0]
mov dword [ebp - 0x4a8], 2
mov dword [esp + 8], eax
call fcn.00402bd0
mov ecx, dword [ebp - 0x468]
lea eax, [ebp - 9]
mov dword [esp], eax
mov dword [ebp - 0x4f8], ecx
call fcn.00403b90
mov edx, dword [ebp - 0x4f8]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00403db0
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x14]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x500]
mov dword [esp], eax
call sub.KERNEL32.dll_WriteFile
sub esp, 0x14
test eax, eax
jne 0x40d36c
call sub.KERNEL32.dll_GetLastError
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x4e4]
mov dword [ebp - 0x4a8], 2
mov dword [esp + 4], edx
mov dword [esp], ecx
call fcn.00402d30
mov edx, dword [ebp - 0x4d8]
mov ecx, dword [ebp - 0x4dc]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4ec], edx
cmp edx, ecx
mov dword [eax + 0x20], edx
mov dword [eax + 0x24], ecx
jne 0x40d1f8
mov eax, dword [ebp - 0x50c]
mov edx, dword [ebp + 0x14]
mov dword [esp + 4], 3
mov dword [esp + 8], eax
mov dword [esp], edx
call dword [ebp + 0x10]
lea eax, [ebp - 0x46c]
mov dword [esp], eax
call fcn.0041a790
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x64]
mov dword [esp + 8], str.Last_Modified:
mov dword [esp], eax
mov dword [ebp - 0x4a8], 3
mov dword [esp + 4], ecx
call fcn.0040a890
mov eax, dword [ebp - 0x60]
sub esp, 4
mov dword [ebp - 0x4a8], 1
mov dword [esp], eax
call fcn.0040abd0
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x64]
mov dword [ebp - 0x58], edx
mov dword [esp], eax
call fcn.0041a790
mov edx, dword [ebp - 0x500]
lea eax, [ebp - 0x5c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], edx
mov dword [ebp - 0x4a8], 3
call sub.KERNEL32.dll_SetFileTime
mov eax, dword [ebp - 0x500]
sub esp, 0x10
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov edx, dword [ebp - 0x4ec]
sub esp, 4
cmp dword [ebp - 0x4dc], edx
mov byte [ebp - 0x4c9], 1
je 0x40d8af
lea eax, [ebp - 9]
mov dword [esp], eax
mov dword [ebp - 0x4a8], 4
call fcn.00403d60
lea eax, [ebp - 0x54]
mov dword [esp], eax
call fcn.0041a790
lea eax, [ebp - 0x44]
mov dword [esp], eax
call fcn.0041a790
jmp 0x40cd4b
mov edx, dword [ebp - 0x10]
test edx, edx
je 0x40d3c9
lea eax, [ebp - 0x46c]
mov dword [esp], eax
call fcn.0041a790
mov edx, dword [ebp - 0x504]
lea eax, [ebp - 0x10]
mov ecx, dword [ebp - 0x4fc]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 8], edx
mov dword [ebp - 0x4a8], 3
mov dword [esp], ecx
mov dword [esp + 4], eax
call sub.WININET.DLL_InternetReadFile
sub esp, 0x10
test eax, eax
mov dword [ebp - 0x508], 0
jne 0x40d51f
mov dword [ebp - 0x4a8], 3
call sub.KERNEL32.dll_GetLastError
mov dword [ebp - 0x508], eax
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0x46c]
add dword [ebp - 0x4dc], eax
mov dword [esp + 4], 0
mov dword [esp], edx
mov dword [ebp - 0x4a8], 3
call fcn.0041a760
mov eax, dword [ebp - 0x4dc]
mov ecx, dword [ebp - 0x4d8]
mov edx, dword [ebp - 0x4f4]
mov dword [esp + 4], str.code:__d__requested__d_bytes__read__d_bytes__total:__d_of__d
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp - 0x508]
mov dword [esp + 0xc], edx
mov dword [ebp - 0x4a8], 2
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x46c]
mov dword [esp + 8], ecx
mov dword [esp], eax
call fcn.00402bd0
mov edx, dword [ebp - 0x468]
lea ecx, [ebp - 9]
mov dword [esp], ecx
mov dword [ebp - 0x510], edx
call fcn.00403b90
mov edx, dword [ebp - 0x510]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00403db0
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x14]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x50]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x500]
mov dword [esp], eax
call sub.KERNEL32.dll_WriteFile
sub esp, 0x14
test eax, eax
jne 0x40d5f7
call sub.KERNEL32.dll_GetLastError
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x4e4]
mov dword [ebp - 0x4a8], 2
mov dword [esp + 4], edx
mov dword [esp], ecx
call fcn.00402d30
mov edx, dword [ebp - 0x4d8]
mov ecx, dword [ebp - 0x4dc]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4ec], edx
cmp edx, ecx
mov dword [eax + 0x20], edx
mov dword [eax + 0x24], ecx
jne 0x40d4b0
jmp 0x40d3c9
cmp eax, dword [ebp - 0x52c]
jne 0x40ce1f
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x4a8], 9
mov dword [esp], edx
call fcn.0040ab80
cmp dword [ebp - 0x4d8], eax
jne 0x40ce1f
lea eax, [ebp - 0x3c]
mov dword [esp], eax
call fcn.0041a790
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x4e4]
mov dword [ebp - 0x4a8], 0xa
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.00402d30
mov ecx, dword [ebp - 0x4d8]
mov edx, dword [ebp + 8]
mov dword [edx + 0x20], ecx
mov dword [edx + 0x24], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x40cd44
mov eax, dword [ebp + 0x14]
add edx, 0x10
mov dword [ebp - 0x530], edx
mov dword [esp + 8], edx
mov dword [esp + 4], 1
mov dword [esp], eax
mov dword [ebp - 0x4a8], 0xa
call dword [ebp + 0x10]
cmp al, 1
jne 0x40d753
mov eax, dword [ebp - 0x530]
mov edx, dword [ebp + 0x14]
mov dword [esp + 4], 3
mov dword [ebp - 0x4a8], 0xa
mov dword [esp + 8], eax
mov dword [esp], edx
call dword [ebp + 0x10]
cmp al, 1
je 0x40cd44
mov ecx, dword [ebp - 0x530]
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], 2
mov dword [esp + 8], ecx
mov dword [esp], eax
call dword [ebp + 0x10]
mov byte [ebp - 0x4c9], 1
jmp 0x40cd4b
lea eax, [ebp - 0x44]
mov dword [esp], eax
call fcn.0041a790
lea eax, [ebp - 0x34]
mov dword [esp], eax
call fcn.0041a790
mov byte [ebp - 0x4c9], 1
jmp 0x40cbe7
mov edx, dword [ebp - 0x530]
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 2
mov dword [esp + 8], edx
mov dword [esp], ecx
call dword [ebp + 0x10]
jmp 0x40d725
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
mov dword [ebp - 0x4a8], 8
call sub.WININET.DLL_HttpSendRequestA
sub esp, 0x14
test eax, eax
jne 0x40d0a8
call sub.KERNEL32.dll_GetLastError
jmp 0x40d0a8
cmp eax, dword [ebp - 0x544]
jne 0x40cefa
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call fcn.0041a790
mov eax, dword [ebp - 0x4e0]
cmp dword [ebp - 0x4d8], eax
jne 0x40cf27
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x4a8], 8
mov dword [esp], eax
call sub.KERNEL32.dll_DeleteFileA
mov edx, dword [ebp + 0xc]
push eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.KERNEL32.dll_MoveFileA
push ecx
mov eax, dword [ebp - 0x4e4]
push ecx
mov ecx, dword [ebp + 0xc]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.00402d30
mov ecx, dword [ebp - 0x4d8]
mov edx, dword [ebp + 8]
cmp dword [ebp + 0x10], 0
mov dword [edx + 0x20], ecx
mov dword [edx + 0x24], ecx
je 0x40d97d
mov eax, dword [ebp + 0x14]
add edx, 0x10
mov dword [ebp - 0x53c], edx
mov dword [esp + 8], edx
mov dword [esp + 4], 1
mov dword [esp], eax
call dword [ebp + 0x10]
cmp al, 1
je 0x40d954
mov edx, dword [ebp - 0x53c]
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 2
mov dword [esp + 8], edx
mov dword [esp], ecx
call dword [ebp + 0x10]
mov byte [ebp - 0x4c9], 1
jmp 0x40d4a0
call sub.KERNEL32.dll_GetLastError
jmp 0x40d070
mov eax, dword [ebp - 0x50c]
mov edx, dword [ebp + 0x14]
mov dword [esp + 4], 2
mov dword [esp + 8], eax
mov dword [esp], edx
call dword [ebp + 0x10]
jmp 0x40d3c9
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x4a8], 3
mov dword [esp], ecx
call sub.KERNEL32.dll_DeleteFileA
mov eax, dword [ebp + 0xc]
push ecx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sub.KERNEL32.dll_MoveFileA
push edx
push edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 4], pe_nt_image_headers32
mov dword [esp], edx
call sub.KERNEL32.dll_SetFileAttributesA
push eax
push eax
mov byte [ebp - 0x4c9], 0
jmp 0x40d480
mov eax, dword [ebp - 0x4e0]
mov edx, dword [ebp - 0x500]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.KERNEL32.dll_SetFilePointer
sub esp, 0x10
jmp 0x40d14b
mov ecx, dword [ebp - 0x50c]
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], 4
mov dword [ebp - 0x4a8], 2
mov dword [esp + 8], ecx
mov dword [esp], eax
call dword [ebp + 0x10]
jmp 0x40d3c9
mov eax, dword [ebp - 0x53c]
mov edx, dword [ebp + 0x14]
mov dword [esp + 4], 3
mov dword [ebp - 0x4a8], 8
mov dword [esp + 8], eax
mov dword [esp], edx
call dword [ebp + 0x10]
cmp al, 1
jne 0x40d989
mov byte [ebp - 0x4c9], 0
jmp 0x40d4a0
mov ecx, dword [ebp - 0x53c]
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], 2
mov dword [esp + 8], ecx
mov dword [esp], eax
call dword [ebp + 0x10]
jmp 0x40d879