Function at 0x470a98
Capabilities:
Check http status code
Connect to http server
Create http request
Download and write a file
Get http content length
Read data from internet
Receive and write data from server to client
Receive data
Resolve function by parsing pe exports
Send data
Send http request
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffbc
push ebx
xor ebx, ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x4712b7
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 8]
add eax, 0x3c
call fcn.00404b04
mov eax, dword [ebp - 8]
mov dword [eax + 0x48], 0x3e7
mov eax, dword [ebp - 8]
mov dword [eax + 0x4c], 0x3e7
mov eax, dword [ebp - 8]
mov dword [eax + 0x44], 0xffffffff
mov eax, dword [ebp - 8]
cmp dword [eax + 0x34], 0
je 0x470b14
mov eax, dword [ebp - 8]
mov edx, dword [eax + 0x34]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
call fcn.0046a728
mov eax, dword [ebp - 8]
add eax, 0x34
call fcn.00404b04
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
call fcn.0046a728
test al, al
je 0x47128b
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
mov eax, dword [eax + 8]
mov edx, dword [ebp - 8]
mov edx, dword [edx + 8]
mov edx, dword [edx + 0x1c]
call fcn.00404f20
jne 0x470b5d
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
mov ax, word [eax + 0xc]
mov edx, dword [ebp - 8]
mov edx, dword [edx + 8]
cmp ax, word [edx + 0xe]
je 0x470c59
mov eax, dword [ebp - 8]
call fcn.0047194c
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x24]
call fcn.00404fd4
push eax
call sub.wininet.dll_InternetOpenA
mov edx, dword [ebp - 8]
mov dword [edx + 0x10], eax
mov eax, dword [ebp - 8]
cmp dword [eax + 0x10], 0
jne 0x470b9c
mov eax, dword [ebp - 8]
mov dword [eax + 0x4c], 0x37a
jmp 0x4711f4
mov eax, dword [ebp - 8]
cmp byte [eax + 0x70], 0
je 0x470bf7
push 0
push 0
push 3
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x14]
call fcn.00404fd4
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x10]
call fcn.00404fd4
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
mov ax, word [eax + 0xc]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
mov eax, dword [eax + 8]
call fcn.00404fd4
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x10]
push eax
call sub.wininet.dll_InternetConnectA
mov edx, dword [ebp - 8]
mov dword [edx + 0x14], eax
jmp 0x470c41
push 0
push 0
push 3
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x78]
call fcn.00404fd4
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x74]
call fcn.00404fd4
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
mov ax, word [eax + 0xc]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
mov eax, dword [eax + 8]
call fcn.00404fd4
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x10]
push eax
call sub.wininet.dll_InternetConnectA
mov edx, dword [ebp - 8]
mov dword [edx + 0x14], eax
mov eax, dword [ebp - 8]
cmp dword [eax + 0x14], 0
jne 0x470c59
mov eax, dword [ebp - 8]
mov dword [eax + 0x4c], 0x384
jmp 0x4711f4
mov eax, dword [ebp - 8]
imul eax, dword [eax + 0x40], 0x3e8
jno 0x470c6a
call fcn.00403cb4
test eax, eax
jns 0x470c73
call fcn.00403cac
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
push 2
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x14]
push eax
call sub.wininet.dll_InternetQueryOptionA
push 4
lea eax, [ebp - 0x1c]
push eax
push 2
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x14]
push eax
call sub.wininet.dll_InternetSetOptionA
push 4
lea eax, [ebp - 0x1c]
push eax
push 6
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x14]
push eax
call sub.wininet.dll_InternetSetOptionA
mov eax, dword [ebp - 8]
cmp byte [eax + 0xc], 0
je 0x470ccc
lea eax, [ebp - 0x18]
mov edx, 0x4712d0
call fcn.00404b9c
jmp 0x470cee
cmp dword [ebp - 0x10], 0
jne 0x470ce1
lea eax, [ebp - 0x18]
mov edx, 0x4712e0
call fcn.00404b9c
jmp 0x470cee
lea eax, [ebp - 0x18]
mov edx, 0x4712d0
call fcn.00404b9c
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
mov eax, dword [eax + 4]
mov edx, 0x4712ec
call fcn.00404f20
jne 0x470d0c
mov dword [ebp - 0x38], 0x80f000
jmp 0x470d11
xor eax, eax
mov dword [ebp - 0x38], eax
or dword [ebp - 0x38], 0x80000000
mov eax, dword [ebp - 8]
cmp byte [eax + 0x1c], 0
jne 0x470d28
or dword [ebp - 0x38], 0x4000000
mov eax, dword [ebp - 8]
cmp byte [eax + 4], 0
je 0x470d38
or dword [ebp - 0x38], 0x400000
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x7c]
mov dword [ebp - 0x3c], eax
sub dword [ebp - 0x3c], 1
jno 0x470d4c
call fcn.00403cb4
push 0
mov eax, dword [ebp - 0x38]
push eax
mov eax, dword [ebp - 8]
add eax, 0x20
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x20]
call fcn.00404fd4
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x28]
call fcn.00404fd4
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x18]
call fcn.00404fd4
push eax
mov eax, dword [ebp - 0x18]
call fcn.00404fd4
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x14]
push eax
call sub.wininet.dll_HttpOpenRequestA
mov edx, dword [ebp - 8]
mov dword [edx + 0x18], eax
mov eax, dword [ebp - 8]
cmp dword [eax + 0x18], 0
jne 0x470db6
mov eax, dword [ebp - 8]
mov dword [eax + 0x4c], 0x38e
jmp 0x470e6f
mov eax, dword [ebp - 0x18]
mov edx, 0x4712e0
call fcn.00404f20
jne 0x470e01
push 0
push 0
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x2c]
call fcn.00404dd4
test eax, eax
jns 0x470ddd
call fcn.00403cac
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x2c]
call fcn.00404fd4
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x18]
push eax
call sub.wininet.dll_HttpSendRequestA
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x31], al
jmp 0x470e52
mov eax, dword [ebp - 0x10]
call fcn.00404dd4
test eax, eax
jns 0x470e12
call fcn.00403cac
push eax
mov eax, dword [ebp - 0x10]
call fcn.00404fd4
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x2c]
call fcn.00404dd4
test eax, eax
jns 0x470e30
call fcn.00403cac
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x2c]
call fcn.00404fd4
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x18]
push eax
call sub.wininet.dll_HttpSendRequestA
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x31], al
cmp dword [ebp - 0x3c], 1
jl 0x470e6f
cmp byte [ebp - 0x31], 0
jne 0x470e65
push 0x64
call sub.kernel32.dll_Sleep_1
cmp byte [ebp - 0x31], 0
je 0x470d41
cmp byte [ebp - 0x31], 0
jne 0x470e84
mov eax, dword [ebp - 8]
mov dword [eax + 0x4c], 0x398
jmp 0x4711f4
xor eax, eax
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x20], eax
xor eax, eax
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
push 0x20000013
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x18]
push eax
call sub.wininet.dll_HttpQueryInfoA
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x31], al
cmp byte [ebp - 0x31], 0
jne 0x470ef6
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x7a
jne 0x470ef6
mov dword [ebp - 0x20], 4
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
push 0x20000013
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x18]
push eax
call sub.wininet.dll_HttpQueryInfoA
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x31], al
mov eax, dword [ebp - 0x1c]
test eax, eax
jns 0x470f02
call fcn.00403cac
mov edx, dword [ebp - 8]
mov dword [edx + 0x48], eax
cmp byte [ebp - 0x31], 0
je 0x470f20
cmp dword [ebp - 0x1c], 0xc8
jb 0x470f20
cmp dword [ebp - 0x1c], 0x12b
jbe 0x470f2f
mov eax, dword [ebp - 8]
mov dword [eax + 0x4c], 0x3a2
jmp 0x4711f4
xor eax, eax
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x20], eax
xor eax, eax
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
push 0x20000005
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x18]
push eax
call sub.wininet.dll_HttpQueryInfoA
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x31], al
cmp byte [ebp - 0x31], 0
jne 0x470fb3
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x7a
jne 0x470fb3
mov dword [ebp - 0x20], 4
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
push 0x20000005
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x18]
push eax
call sub.wininet.dll_HttpQueryInfoA
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x31], al
mov eax, dword [ebp - 0x1c]
test eax, eax
jns 0x470fad
call fcn.00403cac
mov edx, dword [ebp - 8]
mov dword [edx + 0x44], eax
mov dword [ebp - 0x20], 0x1000
mov eax, dword [ebp - 0x20]
push eax
lea eax, [ebp - 4]
mov ecx, 1
mov edx, dword [0x470a64]
call fcn.00405fec
add esp, 4
cmp dword [ebp + 0xc], 0
je 0x471014
xor eax, eax
mov dword [ebp - 0x30], eax
push 0
push 0x20
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp + 0xc]
call fcn.00404fd4
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0xffffffff
jne 0x471014
mov eax, dword [ebp - 8]
mov dword [eax + 0x4c], 0x3ac
jmp 0x4711f4
mov eax, dword [ebp - 8]
add eax, 0x3c
call fcn.00404b04
xor eax, eax
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 4]
call fcn.00405e10
mov edx, eax
xor eax, eax
mov ecx, dword [ebp - 4]
test ecx, ecx
je 0x47103c
cmp eax, dword [ecx - 4]
jb 0x471041
call fcn.00403cac
lea eax, [ecx + eax]
xor ecx, ecx
call fcn.00403650
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x18]
push eax
call sub.wininet.dll_InternetReadFile
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x31], al
cmp byte [ebp - 0x31], 0
jne 0x471081
mov eax, dword [ebp - 8]
mov dword [eax + 0x4c], 0x3b6
jmp 0x471197
cmp dword [ebp - 0x24], 0
jne 0x471096
mov eax, dword [ebp - 8]
mov dword [eax + 0x4c], 0x3b7
jmp 0x471197
lea eax, [ebp - 0x44]
push eax
mov ecx, dword [ebp - 0x24]
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.00405034
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 8]
add eax, 0x3c
call fcn.00404ddc
cmp dword [ebp + 0xc], 0
je 0x471133
push 0
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x24]
push eax
xor eax, eax
mov edx, dword [ebp - 4]
test edx, edx
je 0x4710d6
cmp eax, dword [edx - 4]
jb 0x4710db
call fcn.00403cac
lea eax, [edx + eax]
push eax
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_WriteFile_1
mov eax, dword [ebp - 0x2c]
add dword [ebp - 0x30], eax
jae 0x4710f5
call fcn.00403cb4
mov eax, dword [ebp - 8]
cmp dword [eax + 0x50], 0
je 0x47110d
mov ebx, dword [ebp - 8]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
call dword [ebx + 0x50]
mov eax, dword [ebp - 8]
cmp word [eax + 0x5a], 0
je 0x471024
mov eax, dword [ebp - 0x1c]
push eax
mov ebx, dword [ebp - 8]
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebx + 0x5c]
call dword [ebx + 0x58]
jmp 0x471024
mov eax, dword [ebp - 8]
cmp dword [eax + 0x50], 0
je 0x47115e
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x3c]
call fcn.00404dd4
mov edx, eax
test edx, edx
jns 0x471152
call fcn.00403cac
mov ebx, dword [ebp - 8]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x24]
call dword [ebx + 0x50]
mov eax, dword [ebp - 8]
cmp word [eax + 0x5a], 0
je 0x471024
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x3c]
call fcn.00404dd4
mov ecx, eax
test ecx, ecx
jns 0x471186
call fcn.00403cac
mov ebx, dword [ebp - 8]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebx + 0x5c]
call dword [ebx + 0x58]
jmp 0x471024
cmp dword [ebp + 0xc], 0
je 0x4711a6
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_CloseHandle_1
cmp dword [ebp - 0x1c], 0
jbe 0x4711d9
cmp dword [ebp + 0xc], 0
jne 0x4711ca
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x3c]
call fcn.00404dd4
test eax, eax
jle 0x4711e0
mov dword [ebp - 0x14], 0xffffffff
jmp 0x4711e0
cmp dword [ebp - 0x30], 0
jbe 0x4711e0
mov dword [ebp - 0x14], 0xffffffff
jmp 0x4711e0
mov dword [ebp - 0x14], 0xffffffff
mov eax, dword [ebp - 8]
cmp dword [eax + 0x4c], 0x3b7
jne 0x4711f4
mov eax, dword [ebp - 8]
xor edx, edx
mov dword [eax + 0x4c], edx
mov eax, dword [ebp - 4]
call fcn.00405e10
test eax, eax
jle 0x471227
mov eax, dword [ebp - 4]
call fcn.00405e10
mov edx, eax
xor eax, eax
mov ecx, dword [ebp - 4]
test ecx, ecx
je 0x471218
cmp eax, dword [ecx - 4]
jb 0x47121d
call fcn.00403cac
lea eax, [ecx + eax]
xor ecx, ecx
call fcn.00403650
push 0
lea eax, [ebp - 4]
mov ecx, 1
mov edx, dword [0x470a64]
call fcn.00405fec
add esp, 4
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x18]
push eax
call sub.wininet.dll_InternetCloseHandle
cmp dword [ebp - 0x14], 0
je 0x47128b
mov eax, dword [ebp - 8]
cmp dword [eax + 0x60], 0
je 0x47126c
mov eax, dword [ebp - 8]
lea edx, [eax + 0x3c]
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x3c]
call dword [ebx + 0x60]
mov eax, dword [ebp - 8]
cmp word [eax + 0x6a], 0
je 0x47128b
mov eax, dword [ebp - 8]
lea ecx, [eax + 0x3c]
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 8]
mov edx, dword [eax + 0x3c]
mov eax, dword [ebx + 0x6c]
call dword [ebx + 0x68]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4712be
lea eax, [ebp - 0x44]
call fcn.00404b04
lea eax, [ebp - 0x18]
call fcn.00404b04
lea eax, [ebp - 4]
mov edx, dword [0x470a64]
call fcn.00405ff8
ret