Function at 0x401380
Capabilities:
Connect to http server
Create http request
Download and write a file
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
mov eax, 0x2c28
call fcn.00519540
mov eax, dword [0x594ca8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
push 0
push 0
push 0
push 1
push 0x5704d8
mov dword [ebp - 0x2c1c], eax
mov dword [ebp - 0x2c10], ecx
mov dword [ebp - 0x2c18], edx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x2c20], eax
test eax, eax
je 0x401516
push 0
push 0
push 3
push 0
push 0
push 0x50
push edi
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov edi, eax
mov dword [ebp - 0x2c14], edi
test edi, edi
je 0x401516
push 1
push 0x4000000
lea eax, [ebp - 0x2c28]
push eax
push 0
push 0
push ebx
push esi
push edi
mov dword [ebp - 0x2c28], 0x5704e0
mov dword [ebp - 0x2c24], 0x5704e4
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov ebx, eax
mov dword [ebp - 0x2c08], ebx
test ebx, ebx
je 0x401516
mov ecx, str.POST
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401463
test dl, dl
je 0x40145f
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401463
add eax, 2
add ecx, 2
test dl, dl
jne 0x401443
xor eax, eax
jmp 0x401468
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40152b
push 0x27ff
push eax
lea ecx, [ebp - 0x2c03]
push ecx
call fcn.00518f10
mov eax, dword [ebp - 0x2c10]
mov ecx, 0xc
mov esi, str.Content_Type:_application_x_www_form_urlencoded_r_n
lea edi, [ebp - 0x2c04]
rep movsd dword es:[edi], dword [esi]
add esp, 0xc
movsw word es:[edi], word [esi]
test eax, eax
je 0x4014cd
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4014a5
lea edi, [ebp - 0x2c04]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4014b5
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x2c18]
test edi, edi
je 0x4014ed
mov eax, edi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4014e0
sub eax, edx
mov edx, eax
jmp 0x4014ef
xor edx, edx
lea eax, [ebp - 0x2c04]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4014f8
push edx
push edi
sub eax, esi
push eax
lea edx, [ebp - 0x2c04]
push edx
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x401571
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005155a4
mov esp, ebp
pop ebp
ret 0x14
mov edx, dword [ebp - 0x2c10]
test edx, edx
je 0x40154b
mov eax, edx
lea esi, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401540
sub eax, esi
jmp 0x40154d
xor eax, eax
push 0
push 0
push eax
push edx
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x401577
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005155a4
mov esp, ebp
pop ebp
ret 0x14
mov edi, dword [ebp - 0x2c14]
push 0x3ff
lea eax, [ebp - 0x403]
push 0
push eax
mov byte [ebp - 0x404], 0
call fcn.00518f10
mov ebx, dword [ebp - 0x2c1c]
push 0x570524
push ebx
mov dword [ebp - 0x2c0c], 0
call fcn.00516280
mov esi, eax
add esp, 0x14
test esi, esi
je 0x401658
mov eax, dword [ebp - 0x2c08]
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
lea ecx, [ebp - 0x2c0c]
push ecx
push 0x400
lea edx, [ebp - 0x404]
push edx
push eax
call edi
test eax, eax
je 0x401649
nop
mov eax, dword [ebp - 0x2c0c]
test eax, eax
je 0x401649
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x38], 0
push esi
jne 0x40163b
push eax
lea edx, [ebp - 0x404]
push 1
push edx
call fcn.00516546
push 0x400
lea eax, [ebp - 0x404]
push 0
push eax
call fcn.00518f10
mov eax, dword [ebp - 0x2c08]
add esp, 0x1c
lea ecx, [ebp - 0x2c0c]
push ecx
push 0x400
lea edx, [ebp - 0x404]
push edx
push eax
call edi
test eax, eax
jne 0x4015e0
jmp 0x401649
call fcn.0051634b
push ebx
call fcn.005163bf
add esp, 8
push esi
call fcn.0051634b
mov edi, dword [ebp - 0x2c14]
add esp, 4
mov ecx, dword [ebp - 0x2c08]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ecx
call esi
push edi
call esi
mov edx, dword [ebp - 0x2c20]
push edx
call esi
mov ecx, dword [ebp + 8]
xor eax, eax
cmp dword [ecx + 0x38], eax
mov ecx, dword [ebp - 4]
pop edi
sete al
pop esi
xor ecx, ebp
pop ebx
call fcn.005155a4
mov esp, ebp
pop ebp
ret 0x14