Function at 0x41f960
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 0x440c87
mov eax, dword fs:[0]
push eax
mov eax, 0x3cb8
call fcn.00439a30
mov eax, dword [0x4501a0]
xor eax, esp
mov dword [esp + 0x3cb4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4501a0]
xor eax, esp
push eax
lea eax, [esp + 0x3ccc]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x3cdc]
push 0x3c
lea eax, [esp + 0x58]
mov esi, ecx
push 0
push eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x20], 0
call fcn.0042a680
mov eax, 0x800
mov dword [esp + 0x74], eax
mov dword [esp + 0x90], eax
lea eax, [esp + 0xd4]
lea ecx, [esp + 0x4d4]
mov dword [esp + 0x7c], eax
mov eax, 0x200
mov dword [esp + 0x70], ecx
add esp, 0xc
cmp dword [ebp + 0x18], 8
lea edx, [esp + 0xcc8]
lea ecx, [esp + 0x2c8]
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
jb 0x41fa27
mov ecx, dword [ebp + 4]
jmp 0x41fa2a
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 0x41fe1e
push 0
push 0
push 0
push 0
push 0x447744
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [esp + 0x30], eax
test eax, eax
jne 0x41fa69
mov dword [esp + 0x14], 0xfffffffe
jmp 0x41fe1a
cmp dword [esi + 0xc], 0
je 0x41fa7c
mov dword [esp + 0x14], 0xffffffff
jmp 0x41fe13
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x70]
push 0
push 0
push 3
push ecx
mov ecx, dword [esp + 0x7c]
push edx
push ecx
lea edx, [esp + 0x4e0]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetConnectW]
mov ebx, eax
mov dword [esp + 0x2c], ebx
test ebx, ebx
jne 0x41fab7
mov dword [esp + 0x14], 0xfffffffe
jmp 0x41fe04
cmp dword [esi + 0xc], 0
je 0x41faca
mov dword [esp + 0x14], 0xffffffff
jmp 0x41fe04
cmp dword [ebp + 0x38], 0
push 0
push 0
push 0
push 0
push 0
je 0x41fb32
mov eax, dword [esp + 0x94]
push eax
push str.POST
push ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov edi, eax
mov eax, str.Content_Type:_application_x_www_form_urlencoded__charsetUTF_8__r_n
mov dword [esp + 0x18], edi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41fb00
sub eax, edx
push 0xa0000000
sar eax, 1
push eax
push str.Content_Type:_application_x_www_form_urlencoded__charsetUTF_8__r_n
push edi
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
test eax, eax
jne 0x41fb4a
mov dword [esp + 0x14], 0xfffffffd
jmp 0x41fdf5
mov ecx, dword [esp + 0x94]
push ecx
push 0x4477f4
push ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [esp + 0x18], eax
mov edi, dword [esp + 0x18]
test edi, edi
jne 0x41fb5f
mov dword [esp + 0x14], 0xfffffffd
jmp 0x41fe04
cmp dword [esi + 0xc], 0
je 0x41fb72
mov dword [esp + 0x14], 0xffffffff
jmp 0x41fdf5
mov edx, dword [ebp + 0x3c]
mov eax, dword [ebp + 0x38]
push edx
push eax
push 0
push 0
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x41fb96
mov dword [esp + 0x14], 0xfffffffd
jmp 0x41fdf5
cmp dword [esi + 0xc], 0
je 0x41fba9
mov dword [esp + 0x14], 0xffffffff
jmp 0x41fdf5
push 0
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x3c]
push edx
push 0x20000013
mov ebx, 4
push edi
mov dword [esp + 0x38], ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x41fded
cmp dword [esp + 0x34], 0x190
jae 0x41fded
cmp dword [ebp + 0x30], 0
je 0x41fdf5
cmp dword [ebp + 0x50], 0
je 0x41fc94
mov eax, ebp
call fcn.004037b0
push eax
lea eax, [esp + 0xb0]
push eax
call fcn.00420190
lea esi, [ebp + 0x1c]
mov edi, esi
lea eax, [esp + 0x38]
mov dword [esp + 0x3cd4], 0
call fcn.00416730
push 0xffffffffffffffff
push 0
mov ecx, esi
mov byte [esp + 0x3cdc], 1
call fcn.00403ea0
mov edi, 8
mov byte [esp + 0x3cd4], 0
cmp dword [esp + 0x50], edi
jb 0x41fc55
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.004266b0
add esp, 4
push 0
lea edx, [esp + 0xb0]
push edx
or eax, 0xffffffff
call fcn.004122c0
mov dword [esp + 0x3cd4], 0xffffffff
cmp dword [esp + 0xc4], edi
jb 0x41fdbf
mov eax, dword [esp + 0xb0]
push eax
call fcn.004266b0
add esp, 4
jmp 0x41fdbf
cmp dword [ebp + 0x54], 0
je 0x41fdc3
lea ecx, [esp + 0x90]
call fcn.00416880
push 1
push 0x4477fc
lea eax, [esp + 0x98]
mov dword [esp + 0x3cdc], 2
call fcn.004123d0
mov eax, ebp
call fcn.004037b0
push eax
lea ecx, [esp + 0xb0]
push ecx
call fcn.00420190
push 0
push eax
or eax, 0xffffffff
lea esi, [esp + 0x98]
mov byte [esp + 0x3cdc], 3
call fcn.004122c0
mov byte [esp + 0x3cd4], 2
cmp dword [esp + 0xc4], 8
jb 0x41fd19
mov edx, dword [esp + 0xb0]
push edx
call fcn.004266b0
add esp, 4
lea esi, [ebp + 0x1c]
mov edi, esi
lea eax, [esp + 0x38]
call fcn.00416730
push 0xffffffffffffffff
push 0
mov ecx, esi
mov byte [esp + 0x3cdc], bl
call fcn.00403ea0
mov byte [esp + 0x3cd4], 2
cmp dword [esp + 0x50], 8
jb 0x41fd55
mov eax, dword [esp + 0x3c]
push eax
call fcn.004266b0
add esp, 4
xor ecx, ecx
push ecx
lea edx, [esp + 0x94]
mov edi, 7
push edx
or eax, 0xffffffff
mov dword [esp + 0x58], edi
mov dword [esp + 0x54], 0
mov word [esp + 0x44], cx
call fcn.004122c0
mov dword [esp + 0x3cd4], 0xffffffff
cmp dword [esp + 0xa8], 8
jb 0x41fda3
mov eax, dword [esp + 0x94]
push eax
call fcn.004266b0
add esp, 4
xor ecx, ecx
mov dword [esp + 0xa8], edi
mov dword [esp + 0xa4], 0
mov word [esp + 0x94], cx
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
push 0
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x30]
push eax
push 0x20000005
push edi
mov dword [esp + 0x38], ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x41fe48
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], 0xfffffffc
test edi, edi
je 0x41fe00
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ebx, dword [esp + 0x2c]
test ebx, ebx
je 0x41fe0f
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x3ccc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x3cb4]
xor ecx, esp
call fcn.004266bb
add esp, 0x3cc4
ret 4
cmp dword [esi + 0xc], 0
je 0x41fe58
mov dword [esp + 0x14], 0xffffffff
jmp 0x41fdf5
cmp dword [ebp + 0x34], 8
jb 0x41fe63
mov eax, dword [ebp + 0x20]
jmp 0x41fe66
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 0x41fe90
mov dword [esp + 0x14], 0xfffffffb
jmp 0x41fdf5
mov eax, dword [esp + 0x28]
mov esi, eax
mov dword [esp + 0x1c], 0
test eax, eax
jbe 0x41ff5e
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [esp]
mov ecx, dword [esp + 0x20]
cmp dword [ecx + 0xc], 0
jne 0x41ff42
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x1c]
push edx
push 0x2800
lea eax, [esp + 0x14d0]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x41ff4c
mov ecx, dword [esp + 0x28]
sub esi, dword [esp + 0x1c]
mov eax, ecx
sub eax, esi
imul eax, eax, 0x64
xor edx, edx
div ecx
test eax, eax
jge 0x41fefa
xor eax, eax
jmp 0x41ff04
cmp eax, 0x64
jle 0x41ff04
mov eax, 0x64
mov ecx, dword [ebp + 0x44]
test ecx, ecx
je 0x41ff1d
mov edx, dword [ebp + 0x4c]
push eax
mov eax, dword [ebp + 0x48]
push 0
push 2
push edx
push eax
call ecx
add esp, 0x14
mov edx, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x20]
push ecx
push edx
lea eax, [esp + 0x14d4]
push eax
push ebx
call edi
test eax, eax
je 0x41ff56
test esi, esi
ja 0x41feb0
jmp 0x41ff5e
mov dword [esp + 0x14], 0xffffffff
jmp 0x41ff5e
mov dword [esp + 0x14], 0xfffffffa
jmp 0x41ff5e
mov dword [esp + 0x14], 0xfffffff9
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x18]
test esi, esi
ja 0x41fdf5
mov dword [esp + 0x14], 0
jmp 0x41fdf5