Function at 0x405670
Capabilities:
Connect to http server
Create http request
Delete file
Download and write a file
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
sub esp, 0x264
mov dword [ebp - 4], 1
push 0x3c
push 0
lea eax, [ebp - 0x144]
push eax
call fcn.0040a430
add esp, 0xc
push 0x100
push 0
lea ecx, [ebp - 0x108]
push ecx
call fcn.0040a430
add esp, 0xc
push 0x100
push 0
lea edx, [ebp - 0x248]
push edx
call fcn.0040a430
add esp, 0xc
mov dword [ebp - 0x144], 0x3c
mov dword [ebp - 0x130], 0xffffffff
mov dword [ebp - 0x114], 0xffffffff
lea eax, [ebp - 0x144]
push eax
push 0
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
mov edx, dword [ebp - 0x130]
push edx
mov eax, dword [ebp - 0x134]
push eax
lea ecx, [ebp - 0x108]
push ecx
call fcn.0040a470
add esp, 0xc
mov edx, dword [ebp - 0x114]
push edx
mov eax, dword [ebp - 0x118]
push eax
lea ecx, [ebp - 0x248]
push ecx
call fcn.0040a470
add esp, 0xc
mov dword [ebp - 0x25c], 0
mov dword [ebp - 0x24c], 0
mov edx, dword [ebp - 0x24c]
mov dword [ebp - 0x264], edx
mov eax, dword [ebp - 0x264]
mov dword [ebp - 0x260], eax
push 0
push 0
push 0
push 1
push 0
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x260], eax
push 0
push 0
push 3
push 0
push 0
mov cx, word [ebp - 0x12c]
push ecx
lea edx, [ebp - 0x108]
push edx
mov eax, dword [ebp - 0x260]
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp - 0x264], eax
cmp dword [ebp - 0x264], 0
jne 0x4057a8
jmp 0x405934
push 0
push 0x84000000
push 0
push 0
push 0
lea ecx, [ebp - 0x248]
push ecx
push 0x40e984
mov edx, dword [ebp - 0x264]
push edx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov dword [ebp - 0x24c], eax
cmp dword [ebp - 0x24c], 0
jne 0x4057e2
jmp 0x405934
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 0x24c]
push eax
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x405800
jmp 0x405934
push 0
push 0x80
push 2
push 0
push 0
push 0x10000000
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x250], eax
push 0x2000
call fcn.0040a350
add esp, 4
mov dword [ebp - 0x25c], eax
mov dword [ebp - 0x254], 0
lea edx, [ebp - 0x254]
push edx
push 0x2000
mov eax, dword [ebp - 0x25c]
push eax
mov ecx, dword [ebp - 0x24c]
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x405927
cmp dword [ebp - 0x254], 0
jbe 0x405927
cmp dword [ebp - 4], 1
jne 0x4058d4
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x25c]
movzx eax, byte [edx]
cmp eax, 0x4d
je 0x4058d4
mov ecx, dword [ebp - 0x25c]
movzx edx, byte [ecx + 1]
cmp edx, 0x5a
je 0x4058d4
mov eax, dword [ebp - 0x25c]
movzx ecx, byte [eax]
cmp ecx, 0x5a
je 0x4058d4
mov edx, dword [ebp - 0x25c]
movzx eax, byte [edx + 1]
cmp eax, 0x4d
je 0x4058d4
mov ecx, dword [ebp - 0x250]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x405934
mov dword [ebp - 0x258], 0
push 0
lea eax, [ebp - 0x258]
push eax
mov ecx, dword [ebp - 0x254]
push ecx
mov edx, dword [ebp - 0x25c]
push edx
mov eax, dword [ebp - 0x250]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x254], 0
push 0x2000
push 0
mov ecx, dword [ebp - 0x25c]
push ecx
call fcn.0040a430
add esp, 0xc
jmp 0x40583f
mov edx, dword [ebp - 0x250]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x260], 0
je 0x40594a
mov eax, dword [ebp - 0x260]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x264], 0
je 0x405960
mov ecx, dword [ebp - 0x264]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x24c], 0
je 0x405976
mov edx, dword [ebp - 0x24c]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x25c], 0
je 0x40598e
mov eax, dword [ebp - 0x25c]
push eax
call fcn.0040a410
add esp, 4
mov esp, ebp
pop ebp
ret