Function at 0x409470
Capabilities:
Check http status code
Connect to http server
Create http request
Download and write a file
Get http content length
Parse url
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 0xffffffffffffffff
push 0x44669e
mov eax, dword fs:[0]
push eax
mov eax, 0x3da8
call fcn.00434f90
mov eax, dword [0x4561c4]
xor eax, esp
mov dword [esp + 0x3da4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4561c4]
xor eax, esp
push eax
lea eax, [esp + 0x3dbc]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x3dcc]
xor esi, esi
push 0x3c
lea eax, [esp + 0x58]
mov edi, ecx
push esi
push eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x24], esi
call fcn.0042f810
mov eax, 0x800
mov dword [esp + 0x74], eax
mov dword [esp + 0x90], eax
lea eax, [esp + 0x1c4]
lea ecx, [esp + 0x5c4]
mov dword [esp + 0x7c], eax
mov eax, 0x200
mov dword [esp + 0x70], ecx
mov ebx, 8
add esp, 0xc
lea edx, [esp + 0xdb8]
lea ecx, [esp + 0x3b8]
mov dword [esp + 0x74], eax
mov dword [esp + 0x7c], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x54], 0x3c
mov dword [esp + 0x80], edx
mov dword [esp + 0x78], ecx
cmp dword [ebp + 0x18], ebx
jb 0x409538
mov ecx, dword [ebp + 4]
jmp 0x40953b
lea ecx, [ebp + 4]
lea edx, [esp + 0x54]
push edx
push 0
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
je 0x409b1b
push 0
push 0
push 0
push 0
push 0x44afc0
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [esp + 0x30], eax
test eax, eax
jne 0x409575
lea esi, [eax - 2]
jmp 0x409b19
cmp dword [edi + 0xc], esi
je 0x409582
or esi, 0xffffffff
jmp 0x409b0e
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x6c]
push 0
push 0
push 3
push eax
push ecx
mov ecx, dword [esp + 0x44]
push edx
lea eax, [esp + 0x5d0]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [esp + 0x28], eax
test eax, eax
jne 0x4095ba
lea esi, [eax - 2]
jmp 0x409aff
cmp dword [edi + 0xc], esi
je 0x4095c7
or esi, 0xffffffff
jmp 0x409aff
mov edx, dword [esp + 0x80]
mov eax, dword [esp + 0x28]
push 0
push 0
push 0
push 0
push 0
push edx
cmp dword [ebp + 0x38], esi
je 0x409635
push str.POST
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [esp + 0x14], eax
mov eax, str.Content_Type:_application_x_www_form_urlencoded__charsetUTF_8__r_n
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x409600
mov ecx, dword [esp + 0x14]
sub eax, edx
push 0xa0000000
sar eax, 1
push eax
push str.Content_Type:_application_x_www_form_urlencoded__charsetUTF_8__r_n
push ecx
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
test eax, eax
jne 0x409866
lea esi, [eax - 3]
jmp 0x409af0
push 0x44b074
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
cmp byte [0x45c44c], 0
mov dword [esp + 0x14], eax
je 0x409866
lea esi, [esp + 0x180]
call fcn.0041eb30
push eax
push str.Referer:
lea edi, [esp + 0x1a4]
mov dword [esp + 0x3dcc], 0
call fcn.00405730
add esp, 8
mov byte [esp + 0x3dc4], 2
cmp dword [esp + 0x198], ebx
jb 0x40969f
mov ecx, dword [esp + 0x184]
push ecx
call fcn.0042bcf0
add esp, 4
lea eax, [esp + 0x19c]
xor edx, edx
push eax
mov ebx, 0x44b090
lea esi, [esp + 0x38]
mov dword [esp + 0x19c], 7
mov dword [esp + 0x198], 0
mov word [esp + 0x188], dx
call fcn.004057f0
add esp, 4
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x1a4]
mov byte [esp + 0x3dcc], 3
call fcn.00401990
mov ebx, 8
mov byte [esp + 0x3dc4], 2
cmp dword [esp + 0x4c], ebx
jb 0x409710
mov ecx, dword [esp + 0x38]
push ecx
call fcn.0042bcf0
add esp, 4
mov edx, dword [esp + 0x1a0]
cmp dword [esp + 0x1b4], ebx
jae 0x409727
lea edx, [esp + 0x1a0]
mov eax, edx
lea esi, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x409730
sub eax, esi
push 0xa0000000
sar eax, 1
push eax
push edx
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
test eax, eax
jne 0x409772
lea esi, [esp + 0x19c]
mov dword [esp + 0x18], 0xfffffffd
call fcn.004200f0
mov esi, dword [esp + 0x18]
jmp 0x409af0
lea esi, [esp + 0x90]
call fcn.0041e9c0
lea ecx, [esp + 0x34]
mov byte [esp + 0x3dc4], 4
call fcn.0040e630
mov edi, eax
lea esi, [esp + 0x164]
mov byte [esp + 0x3dc4], 5
call fcn.0041eb30
cmp dword [edi + 0x18], ebx
jb 0x4097af
mov edi, dword [edi + 4]
jmp 0x4097b2
add edi, 4
cmp dword [eax + 0x18], ebx
jb 0x4097bc
mov eax, dword [eax + 4]
jmp 0x4097bf
add eax, 4
push edi
xor edi, edi
push edi
push eax
call dword [sym.imp.WININET.dll_InternetSetCookieW]
cmp dword [esp + 0x17c], ebx
jb 0x4097e3
mov eax, dword [esp + 0x168]
push eax
call fcn.0042bcf0
add esp, 4
xor ecx, ecx
mov esi, 7
mov dword [esp + 0x17c], esi
mov dword [esp + 0x178], edi
mov word [esp + 0x168], cx
cmp dword [esp + 0x4c], ebx
jb 0x409813
mov edx, dword [esp + 0x38]
push edx
call fcn.0042bcf0
add esp, 4
mov dword [esp + 0x4c], esi
xor eax, eax
lea esi, [esp + 0x90]
mov dword [esp + 0x48], edi
mov word [esp + 0x38], ax
call fcn.0040e4f0
mov dword [esp + 0x3dc4], 0xffffffff
mov byte [0x45c44c], 0
cmp dword [esp + 0x1b4], ebx
jb 0x409859
mov ecx, dword [esp + 0x1a0]
push ecx
call fcn.0042bcf0
add esp, 4
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
mov ebx, 8
cmp dword [esp + 0x14], 0
jne 0x409877
mov esi, 0xfffffffd
jmp 0x409aff
cmp dword [edi + 0xc], 0
je 0x409885
or esi, 0xffffffff
jmp 0x409af0
mov edx, dword [ebp + 0x3c]
mov eax, dword [ebp + 0x38]
mov ecx, dword [esp + 0x14]
push edx
push eax
push 0
push 0
push ecx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x4098a8
lea esi, [eax - 3]
jmp 0x409af0
cmp dword [edi + 0xc], 0
je 0x4098b6
or esi, 0xffffffff
jmp 0x409af0
mov ecx, dword [esp + 0x14]
push 0
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x58]
push eax
push 0x20000013
push ecx
mov dword [esp + 0x38], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x409aeb
cmp dword [esp + 0x50], 0x190
jae 0x409aeb
cmp dword [ebp + 0x30], 0
je 0x409af0
cmp dword [ebp + 0x50], 0
je 0x4099a1
mov eax, ebp
call fcn.004022f0
push eax
lea edx, [esp + 0x184]
push edx
call fcn.00409e80
lea esi, [ebp + 0x1c]
mov ebx, 6
mov edi, esi
lea eax, [esp + 0x34]
mov dword [esp + 0x3dc4], ebx
call fcn.00423170
push 0xffffffffffffffff
push 0
mov ecx, esi
mov byte [esp + 0x3dcc], 7
call fcn.00401990
mov byte [esp + 0x3dc4], bl
cmp dword [esp + 0x4c], 8
jb 0x409961
mov eax, dword [esp + 0x38]
push eax
call fcn.0042bcf0
add esp, 4
push 0
lea ecx, [esp + 0x184]
push ecx
or eax, 0xffffffff
call fcn.00405960
mov dword [esp + 0x3dc4], 0xffffffff
cmp dword [esp + 0x198], 8
jb 0x409abd
mov edx, dword [esp + 0x184]
push edx
call fcn.0042bcf0
add esp, 4
jmp 0x409abd
cmp dword [ebp + 0x54], 0
je 0x409abd
lea ecx, [esp + 0x164]
call fcn.004232b0
push 1
mov eax, 0x44b098
lea ecx, [esp + 0x168]
mov dword [esp + 0x3dc8], ebx
call fcn.00405a20
mov eax, ebp
call fcn.004022f0
push eax
lea eax, [esp + 0x38]
push eax
call fcn.00409e80
push 0
push eax
or eax, 0xffffffff
lea esi, [esp + 0x16c]
mov byte [esp + 0x3dcc], 9
call fcn.00405960
mov byte [esp + 0x3dc4], 8
cmp dword [esp + 0x4c], ebx
jb 0x409a18
mov ecx, dword [esp + 0x38]
push ecx
call fcn.0042bcf0
add esp, 4
lea esi, [ebp + 0x1c]
mov edi, esi
lea eax, [esp + 0x34]
call fcn.00423170
push 0xffffffffffffffff
push 0
mov ecx, esi
mov byte [esp + 0x3dcc], 0xa
call fcn.00401990
mov byte [esp + 0x3dc4], 8
cmp dword [esp + 0x4c], ebx
jb 0x409a54
mov edx, dword [esp + 0x38]
push edx
call fcn.0042bcf0
add esp, 4
xor eax, eax
push eax
lea ecx, [esp + 0x168]
mov word [esp + 0x3c], ax
mov edi, 7
push ecx
or eax, 0xffffffff
mov dword [esp + 0x54], edi
mov dword [esp + 0x50], 0
call fcn.00405960
mov dword [esp + 0x3dc4], 0xffffffff
cmp dword [esp + 0x17c], ebx
jb 0x409aa1
mov edx, dword [esp + 0x168]
push edx
call fcn.0042bcf0
add esp, 4
xor eax, eax
mov dword [esp + 0x17c], edi
mov dword [esp + 0x178], 0
mov word [esp + 0x168], ax
mov eax, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x34]
push edx
push 0x20000005
push eax
mov dword [esp + 0x38], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x409b45
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0xfffffffc
mov eax, dword [esp + 0x14]
test eax, eax
je 0x409aff
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x409b0e
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, esi
mov ecx, dword [esp + 0x3dbc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x3da4]
xor ecx, esp
call fcn.0042bcfb
add esp, 0x3db4
ret 4
mov ecx, dword [esp + 0x1c]
cmp dword [ecx + 0xc], 0
je 0x409b54
or esi, 0xffffffff
jmp 0x409af0
cmp dword [ebp + 0x34], 8
jb 0x409b5f
mov eax, dword [ebp + 0x20]
jmp 0x409b62
lea eax, [ebp + 0x20]
push 0
push 0
push 2
push 0
push 2
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x409b89
mov esi, 0xfffffffb
jmp 0x409af0
mov eax, dword [esp + 0x2c]
mov edi, eax
mov dword [esp + 0x20], 0
test eax, eax
jbe 0x409c39
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x1c]
cmp dword [edx + 0xc], 0
jne 0x409c53
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x20]
push eax
push 0x2800
lea ecx, [esp + 0x15c0]
push ecx
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x409c58
mov ecx, dword [esp + 0x2c]
sub edi, dword [esp + 0x20]
mov eax, ecx
sub eax, edi
imul eax, eax, 0x64
xor edx, edx
div ecx
test eax, eax
jge 0x409bf3
xor eax, eax
jmp 0x409bfd
cmp eax, 0x64
jle 0x409bfd
mov eax, 0x64
mov ecx, dword [ebp + 0x44]
test ecx, ecx
je 0x409c16
mov edx, dword [ebp + 0x48]
push eax
mov eax, dword [ebp + 0x4c]
push 0
push 2
push eax
push edx
call ecx
add esp, 0x14
mov ecx, dword [esp + 0x20]
push 0
lea eax, [esp + 0x24]
push eax
push ecx
lea edx, [esp + 0x15c4]
push edx
push ebx
call esi
test eax, eax
je 0x409c5f
test edi, edi
ja 0x409ba5
mov esi, dword [esp + 0x18]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
ja 0x409af0
xor esi, esi
jmp 0x409af0
or esi, 0xffffffff
jmp 0x409c3d
mov esi, 0xfffffffa
jmp 0x409c3d
mov esi, 0xfffffff9
jmp 0x409c3d