Function at 0x402c90
Capabilities:
Connect to http server
Create http request
Download and write a file
Get file size
Parse url
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
and esp, 0xfffffff8
sub esp, 0x68
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push esi
push 0x800
push 0x40
mov esi, eax
call ebx
push 0x800
push 0x40
mov dword [esp + 0x2c], eax
call ebx
mov ebx, eax
mov ecx, 0x3c
lea edx, [esp + 0x34]
mov dword [esp + 0x2c], ebx
call fcn.00402a40
mov eax, dword [esp + 0x24]
mov dword [esp + 0x34], ecx
mov ecx, edx
mov dword [esp + 0x44], eax
mov eax, 0x400
push ecx
push 0x10000000
mov ecx, esi
mov dword [esp + 0x48], 3
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], eax
mov dword [esp + 0x50], eax
call fcn.00402a50
push eax
push esi
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
jne 0x402d41
call dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
je 0x402d20
push 0xf
push 0
call edi
add esp, 8
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
test ebx, ebx
je 0x402d2d
push ebx
call esi
mov eax, dword [esp + 0x24]
test eax, eax
je 0x402d38
push eax
call esi
or eax, 0xffffffff
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push 0
push str.Mozilla_4.0__compatible__MSIE_6.0b__Windows_NT_5.0__.NET_CLR_1.0.2914_
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [esp + 0x10], eax
test eax, eax
je 0x402fd7
mov edx, dword [esp + 0x44]
push 1
push 0
push 3
push 0
push 0
push 0x50
push edx
push eax
call dword [sym.imp.WININET.dll_InternetConnectW]
mov esi, eax
mov dword [esp + 0xc], esi
test esi, esi
je 0x402fbf
mov eax, dword [esp + 0x60]
push 1
push 0x400000
push 0
push 0
push 0
push eax
push 0x404260
push esi
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov ebx, eax
test ebx, ebx
je 0x402fa5
push 0
push 0
push 0
push 0
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x402f96
test edi, edi
je 0x402dd2
push 0
push 2
call edi
add esp, 8
mov esi, dword [sym.imp.WININET.dll_InternetSetFilePointer]
push 0
push 2
push 0
push 0
push ebx
call esi
push 0
push 0
push 0
push 0
push ebx
mov dword [esp + 0x30], eax
call esi
test edi, edi
je 0x402e02
mov ecx, dword [esp + 0x1c]
push ecx
push 3
call edi
add esp, 8
mov edx, dword [ebp + 0xc]
cmp byte [edx], 0
jne 0x402efe
mov edi, edi
push 0x400
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
lea eax, [esp + 0x18]
push eax
push 0x400
push esi
push ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x402ef3
mov eax, dword [esp + 0x18]
test eax, eax
je 0x402ef3
mov edx, dword [ebp + 8]
push 0
lea ecx, [esp + 0x18]
push ecx
push eax
push esi
push edx
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402e8f
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
jne 0x402e8f
test edi, edi
je 0x402e7a
push eax
push 4
call edi
add esp, 8
test esi, esi
je 0x402e85
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0
je 0x402e10
jmp 0x402efe
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
call ebx
mov edx, dword [esp + 0xc]
push edx
call ebx
mov eax, dword [esp + 0x10]
push eax
call ebx
test edi, edi
je 0x402ebd
push 0x14
push 0
call edi
add esp, 8
test esi, esi
je 0x402ecc
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
call esi
jmp 0x402ed2
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x402edd
push eax
call esi
mov eax, dword [esp + 0x24]
test eax, eax
je 0x402ee8
push eax
call esi
mov eax, 0xfffffffe
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x402efe
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov esi, dword [ebp + 8]
lea ecx, [esp + 0x20]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp dword [esp + 0x1c], eax
je 0x402f67
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
mov edx, dword [esp + 0xc]
push edx
call esi
mov eax, dword [esp + 0x10]
push eax
call esi
test edi, edi
je 0x402f3e
push 0x13
push 0
call edi
add esp, 8
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x402f4d
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x402f5c
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 0xfffffffd
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x402f74
push 0
push 5
call edi
add esp, 8
mov esi, dword [esp + 0xc]
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ebx, dword [esp + 0x2c]
jmp 0x402fcc
test edi, edi
je 0x402f78
push 0x12
push 0
call edi
add esp, 8
jmp 0x402f78
test edi, edi
je 0x402fb2
push 0x11
push 0
call edi
add esp, 8
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ebx, dword [esp + 0x2c]
jmp 0x402fcc
test edi, edi
je 0x402fcc
push 0x10
push 0
call edi
add esp, 8
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
test ebx, ebx
je 0x402fe2
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x402ff1
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret