Function at 0x401130
Capabilities:
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
Write file on windows

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x4286cb
push eax
mov eax, 0x12c0
mov dword fs:[0], esp
call fcn.0040c980
push ebx
push ebp
push esi
push edi
mov edi, 0x438614
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x12d8], 1
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x12e8]
not ecx
dec ecx
mov ebp, ecx
mov ecx, eax
cmp eax, ebp
jb 0x40117e
mov ecx, ebp
mov esi, dword [esp + 0x12e4]
mov edi, 0x438614
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x401195
sbb edx, edx
sbb edx, 0xffffffff
xor ebx, ebx
cmp edx, ebx
jne 0x4011ae
cmp eax, ebp
jb 0x4011ae
xor edx, edx
cmp eax, ebp
setne dl
cmp edx, ebx
je 0x401654
mov edi, 0x438614
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x12f8]
not ecx
dec ecx
mov ebp, ecx
mov ecx, eax
cmp eax, ebp
jb 0x4011ce
mov ecx, ebp
mov esi, dword [esp + 0x12f4]
mov edi, 0x438614
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x4011e5
sbb edx, edx
sbb edx, 0xffffffff
cmp edx, ebx
jne 0x4011fc
cmp eax, ebp
jb 0x4011fc
xor edx, edx
cmp eax, ebp
setne dl
cmp edx, ebx
je 0x401654
mov al, byte [esp + 0x2f]
mov edi, 0x438614
mov byte [esp + 0x38], al
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x3c], ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x40], ebx
push ecx
push 0x438614
lea ecx, [esp + 0x40]
mov dword [esp + 0x4c], ebx
call fcn.004039e0
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x189]
mov byte [esp + 0x188], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x109]
mov byte [esp + 0x108], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x89]
mov byte [esp + 0x88], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x208
xor eax, eax
lea edi, [esp + 0xaad]
mov byte [esp + 0xaac], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x208
xor eax, eax
lea edi, [esp + 0x289]
mov byte [esp + 0x288], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor ebp, ebp
mov ecx, 0xe
xor eax, eax
lea edi, [esp + 0x50]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x188]
lea edx, [esp + 0x108]
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x68], edx
mov eax, 0x80
lea ecx, [esp + 0x88]
lea edx, [esp + 0xaac]
mov dword [esp + 0x6c], eax
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x12e4]
mov byte [esp + 0x12d8], 2
mov dword [esp + 0x30], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x34], 4
mov dword [esp + 0x4c], 0x3c
mov dword [esp + 0x60], 0x100
mov dword [esp + 0x70], ecx
mov dword [esp + 0x78], edx
mov dword [esp + 0x7c], 0x824
cmp eax, ebx
jne 0x401350
mov eax, 0x42a624
lea ecx, [esp + 0x4c]
push ecx
push ebx
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
test eax, eax
je 0x401369
cmp dword [esp + 0x58], 3
je 0x401370
xor esi, esi
jmp 0x401584
push ebx
push ebx
push ebx
push ebx
push str.down
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp eax, ebx
mov dword [esp + 0x30], eax
jne 0x40138e
xor esi, esi
jmp 0x401584
push ebx
push ebx
lea edx, [esp + 0x90]
push 3
lea ecx, [esp + 0x114]
push edx
mov edx, dword [esp + 0x74]
push ecx
lea ecx, [esp + 0x19c]
push edx
push ecx
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov edx, eax
cmp edx, ebx
mov dword [esp + 0x24], edx
jne 0x4013c7
xor esi, esi
jmp 0x401584
mov eax, dword [esp + 0x7c]
lea esi, [esp + 0x288]
cmp eax, ebx
je 0x4013f3
mov edi, dword [esp + 0x78]
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x10], esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [esp + 0x10]
mov eax, ecx
jmp 0x40140f
mov edi, 0x434148
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x10], esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [esp + 0x10]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
push 0x80200000
rep movsb byte es:[edi], byte [esi]
mov edi, dword [sym.imp.WININET.dll_HttpOpenRequestA]
push ebx
push 0x438614
lea ecx, [esp + 0x298]
push str.HTTP_1.1
push ecx
push str.HEAD
push edx
call edi
push 0xa
push eax
mov dword [esp + 0x24], eax
call fcn.00401f90
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x401584
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x34]
push ebx
lea eax, [esp + 0x2c]
push edx
push eax
push 0x20000005
push ecx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x48], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x401497
cmp dword [esp + 0x28], 0x3e800000
jbe 0x401497
xor esi, esi
jmp 0x401584
mov eax, dword [esp + 0x24]
push ebx
push 0x80200000
push ebx
push 0x438614
lea edx, [esp + 0x298]
push str.HTTP_1.1
push edx
push 0x434130
push eax
call edi
push 0xa
push eax
mov dword [esp + 0x1c], eax
call fcn.00401f90
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x401584
mov eax, dword [esp + 0x12f4]
cmp eax, ebx
jne 0x4014e5
mov eax, 0x42a624
push ebx
push 0x80
push 2
push ebx
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
jne 0x40150c
xor esi, esi
jmp 0x40159c
push 0x2800
call fcn.0041e0fc
mov ebp, eax
add esp, 4
cmp ebp, ebx
jne 0x401523
xor esi, esi
jmp 0x401584
mov dword [esp + 0x10], ebx
mov edx, dword [esp + 0x14]
mov ecx, 0xa00
xor eax, eax
mov edi, ebp
mov dword [esp + 0x20], ebx
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x20]
push ecx
push 0x2800
push ebp
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x401527
mov eax, dword [esp + 0x20]
cmp eax, ebx
jbe 0x40157d
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x48]
add edx, eax
push ebx
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x1c]
push ecx
push eax
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
cmp esi, ebx
je 0x401584
jmp 0x401527
jne 0x401527
mov esi, 1
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebp, ebx
je 0x40159c
push ebp
call fcn.0041e125
add esp, 4
mov eax, dword [esp + 0x14]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp eax, ebx
je 0x4015af
mov ecx, eax
push ecx
call edi
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x4015ba
push eax
call edi
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x4015c5
push eax
call edi
mov eax, dword [esp + 0x30]
cmp eax, ebx
je 0x4015d0
push eax
call edi
mov ecx, dword [esp + 0x3c]
cmp ecx, ebx
je 0x4015f4
mov al, byte [ecx - 1]
cmp al, bl
je 0x4015ea
cmp al, 0xff
je 0x4015ea
dec al
mov byte [ecx - 1], al
jmp 0x4015f4
dec ecx
push ecx
call fcn.0041e125
add esp, 4
mov ecx, dword [esp + 0x12e4]
mov dword [esp + 0x3c], ebx
cmp ecx, ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
je 0x401627
mov al, byte [ecx - 1]
cmp al, bl
je 0x40161d
cmp al, 0xff
je 0x40161d
dec al
mov byte [ecx - 1], al
jmp 0x401627
dec ecx
push ecx
call fcn.0041e125
add esp, 4
mov ecx, dword [esp + 0x12f4]
cmp ecx, ebx
je 0x401650
mov al, byte [ecx - 1]
cmp al, bl
je 0x401646
cmp al, 0xff
je 0x401646
dec al
mov byte [ecx - 1], al
mov eax, esi
jmp 0x4016a4
dec ecx
push ecx
call fcn.0041e125
add esp, 4
mov eax, esi
jmp 0x4016a4
mov ecx, dword [esp + 0x12e4]
cmp ecx, ebx
je 0x40167b
mov al, byte [ecx - 1]
cmp al, bl
je 0x401671
cmp al, 0xff
je 0x401671
dec al
mov byte [ecx - 1], al
jmp 0x40167b
dec ecx
push ecx
call fcn.0041e125
add esp, 4
mov ecx, dword [esp + 0x12f4]
cmp ecx, ebx
je 0x4016a2
mov al, byte [ecx - 1]
cmp al, bl
je 0x401698
cmp al, 0xff
je 0x401698
dec al
mov byte [ecx - 1], al
jmp 0x4016a2
dec ecx
push ecx
call fcn.0041e125
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x12d0]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x12cc
ret