Function at 0x402160
Capabilities:
Connect to http server
Create http request
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x738
mov eax, dword [0x5662d0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x104
lea eax, [ebp - 0x720]
push 0
push eax
mov esi, ecx
call fcn.004fbe10
push 0x104
lea ecx, [ebp - 0x518]
push 0
push ecx
call fcn.004fbe10
push 0x104
lea edx, [ebp - 0x414]
push 0
push edx
call fcn.004fbe10
push 0x104
lea eax, [ebp - 0x310]
push 0
push eax
call fcn.004fbe10
push 0x104
lea ecx, [ebp - 0x20c]
push 0
push ecx
call fcn.004fbe10
push 0x104
lea edx, [ebp - 0x108]
push 0
push edx
call fcn.004fbe10
add esp, 0x48
lea eax, [ebp - 0x108]
push eax
lea ecx, [ebp - 0x20c]
push ecx
push esi
lea ecx, [ebp - 0x310]
lea ebx, [ebp - 0x414]
lea edi, [ebp - 0x518]
lea esi, [ebp - 0x720]
call fcn.00401fe0
add esp, 0xc
test eax, eax
jne 0x402231
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004fad38
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x108]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x402256
lea eax, [ebp - 0x108]
push eax
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
xor esi, esi
push esi
push esi
push esi
push esi
push str.WinInet_Ftp_Download_V1.0
mov dword [ebp - 0x734], esi
mov dword [ebp - 0x72c], esi
xor ebx, ebx
xor edi, edi
mov dword [ebp - 0x728], esi
mov dword [ebp - 0x730], esi
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x738], eax
test eax, eax
jne 0x40229c
mov esi, str.InternetOpen
call fcn.00401f20
jmp 0x4023f6
push 0
push 0x8000000
push 1
lea edx, [ebp - 0x310]
push edx
lea ecx, [ebp - 0x414]
push ecx
push 0
lea edx, [ebp - 0x518]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp - 0x734], eax
test eax, eax
jne 0x4022dc
mov esi, str.InternetConnect
call fcn.00401f20
jmp 0x4023f6
push 0
push reloc.OLEAUT32.dll_SysReAllocString
push SysReAllocString
lea ecx, [ebp - 0x20c]
push ecx
push eax
call dword [sym.imp.WININET.dll_FtpOpenFileA]
mov dword [ebp - 0x72c], eax
test eax, eax
jne 0x40230f
mov esi, str.FtpOpenFile
call fcn.00401f20
jmp 0x4023f6
push 0
push eax
call dword [sym.imp.WININET.dll_FtpGetFileSize]
push eax
mov dword [ebp - 0x724], eax
call fcn.00403ac2
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4023f6
mov edx, dword [ebp - 0x724]
push edx
push 0
push ebx
call fcn.004fbe10
push 0x1000
call fcn.00403ac2
mov edi, eax
add esp, 0x10
test edi, edi
je 0x4023f6
push 0x1000
push 0
push edi
call fcn.004fbe10
add esp, 0xc
jmp 0x402370
mov ecx, dword [ebp - 0x72c]
lea eax, [ebp - 0x728]
push eax
push 0x1000
push edi
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov dword [ebp - 0x730], eax
test eax, eax
je 0x4023b8
mov edx, dword [ebp - 0x728]
push edx
lea eax, [esi + ebx]
push edi
push eax
call fcn.004ff270
add esi, dword [ebp - 0x728]
add esp, 0xc
cmp dword [ebp - 0x724], esi
ja 0x402370
jmp 0x402407
push 0x103
lea ecx, [ebp - 0x61b]
push 0
push ecx
mov byte [ebp - 0x61c], 0
call fcn.004fbe10
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x548350
lea edx, [ebp - 0x61c]
push str._s_Error__d__n
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push ebx
call fcn.00403ab7
add esp, 4
xor ebx, ebx
mov dword [ebp - 0x724], ebx
mov eax, dword [ebp - 0x724]
mov dword [0x56deb8], ebx
mov dword [0x56debc], eax
test edi, edi
je 0x402425
push edi
call fcn.00403ab7
add esp, 4
mov eax, dword [ebp - 0x72c]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
test eax, eax
je 0x402438
push eax
call esi
mov eax, dword [ebp - 0x734]
test eax, eax
je 0x402445
push eax
call esi
mov eax, dword [ebp - 0x738]
test eax, eax
je 0x402452
push eax
call esi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x730]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004fad38
mov esp, ebp
pop ebp
ret