Function at 0x402780
Capabilities:
Check internet connectivity via wininet
Connect to http server
Create http request
Read data from internet
Receive data
Send data
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x458
mov eax, dword [0x42d024]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x438], eax
push 0
lea eax, [ebp - 0x458]
push eax
mov dword [ebp - 0x450], ecx
mov dword [ebp - 0x448], edx
mov dword [ebp - 0x458], 0
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test eax, eax
je 0x402bd3
cmp dword [ebp + 0x18], 0
je 0x402bd3
cmp dword [ebp + 0x1c], 0
je 0x402bd3
mov eax, edi
mov dword [ebp - 0x430], 0
call fcn.004021a0
mov edi, eax
push 0
mov dword [ebp - 0x44c], edi
push 0
test esi, esi
je 0x40281e
push esi
push 3
push ebx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebx, eax
mov dword [ebp - 0x440], ebx
jmp 0x402831
push 0
push 0
push ebx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x440], eax
mov ebx, eax
test ebx, ebx
je 0x402ba3
movzx ecx, word [edi + 8]
mov eax, dword [edi + 4]
push 0
push 0
push 3
push 0
push 0
push ecx
push eax
push ebx
mov dword [ebp - 0x43c], eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov esi, eax
mov dword [ebp - 0x454], esi
test esi, esi
je 0x402b9c
mov cl, byte [edi]
mov eax, 0x8468c200
mov byte [ebp - 0x431], cl
test cl, cl
je 0x40287f
mov eax, 0x84e8c200
mov edx, dword [ebp - 0x438]
push 0
push eax
push 0
push 0
push str.HTTP_1.0
push edx
push str.POST
push esi
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov edi, eax
mov dword [ebp - 0x444], edi
test edi, edi
je 0x402b8f
cmp byte [ebp - 0x431], 0
je 0x4028fe
lea eax, [ebp - 0x438]
push eax
lea ecx, [ebp - 0x42c]
push ecx
push 0x1f
push esi
mov dword [ebp - 0x42c], 0
mov dword [ebp - 0x438], 4
call dword [sym.imp.WININET.dll_InternetQueryOptionA]
or dword [ebp - 0x42c], 0x3100
push 4
lea edx, [ebp - 0x42c]
push edx
push 0x1f
push edi
call dword [sym.imp.WININET.dll_InternetSetOptionA]
mov ecx, 9
mov esi, str.___________________________uploader
lea edi, [ebp - 0x28]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x43c]
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402918
sub eax, edx
mov edx, eax
lea eax, [ebp - 0x28]
lea esi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402930
sub eax, esi
lea esi, [eax + edx + 0x100]
push esi
call fcn.00414f9a
add esp, 4
mov dword [ebp - 0x43c], eax
test eax, eax
je 0x402940
mov ecx, dword [ebp - 0x43c]
lea eax, [ebp - 0x28]
push eax
push edi
push str.Host:__s_r_nContent_Type:_multipart_form_data__boundary_s
push ecx
call fcn.0041512c
lea eax, [ebp - 0x28]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402972
mov edi, dword [ebp - 0x450]
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402988
sub eax, esi
lea esi, [edx + eax + 0x418]
push esi
call fcn.00414f9a
add esp, 4
mov dword [ebp - 0x438], eax
test eax, eax
je 0x402998
push str.application_octet_stream
push edi
lea edx, [ebp - 0x28]
push edx
mov esi, eax
push str.___s_r_nContent_Disposition:_form_data__name__s___filename_file.raw__r_nContent_Type:__s_r_n_r_n
push esi
call fcn.0041512c
add esp, 0x14
call fcn.004042a0
mov ebx, eax
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4029d1
sub eax, edx
push esi
mov edi, eax
mov esi, ebx
call fcn.004042f0
mov eax, dword [ebp + 0x18]
mov edi, dword [ebp + 0x1c]
push eax
call fcn.004042f0
push str._r_n__
mov edi, 4
call fcn.004042f0
lea eax, [ebp - 0x28]
add esp, 0xc
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402a08
sub eax, esi
lea ecx, [ebp - 0x28]
push ecx
mov edi, eax
mov esi, ebx
call fcn.004042f0
push str.___r_n
mov edi, 4
call fcn.004042f0
mov edi, dword [ebp - 0x43c]
mov eax, edi
add esp, 8
lea edx, [eax + 1]
jmp 0x402a40
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402a40
mov ecx, dword [ebx]
mov esi, dword [ebp - 0x444]
sub eax, edx
mov edx, dword [ebx + 4]
push edx
push ecx
push eax
push edi
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x402b5a
call fcn.004042a0
lea edx, [ebp - 0x430]
push edx
mov dword [ebp - 0x42c], eax
push 0x3ff
lea eax, [ebp - 0x428]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x402aed
mov edi, dword [ebp - 0x430]
test edi, edi
je 0x402aed
mov esi, dword [ebp - 0x42c]
lea ecx, [ebp - 0x428]
push ecx
mov byte [ebp + edi - 0x428], 0
call fcn.004042f0
mov eax, dword [ebp - 0x448]
add esp, 4
test eax, eax
je 0x402ac9
mov edx, dword [ebp - 0x430]
add dword [eax], edx
mov edx, dword [ebp - 0x444]
lea eax, [ebp - 0x430]
push eax
push 0x3ff
lea ecx, [ebp - 0x428]
push ecx
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x402a90
mov eax, dword [ebp - 0x42c]
mov edi, dword [eax + 4]
test edi, edi
je 0x402b32
lea esi, [edi + 1]
lea ecx, [ecx]
push esi
call fcn.00414f9a
add esp, 4
test eax, eax
je 0x402b00
xor ecx, ecx
mov dword [ebp - 0x430], eax
test edi, edi
je 0x402b2c
mov edx, dword [ebp - 0x42c]
mov esi, dword [edx]
mov dl, byte [esi + ecx]
mov byte [eax + ecx], dl
inc ecx
cmp ecx, edi
jb 0x402b21
mov byte [edi + eax], 0
jmp 0x402b49
push 8
call fcn.00414f9a
add esp, 4
test eax, eax
je 0x402b32
mov dword [ebp - 0x430], eax
mov byte [eax], 0
mov esi, dword [ebp - 0x42c]
call fcn.004042d0
mov edi, dword [ebp - 0x43c]
mov esi, ebx
call fcn.004042d0
mov eax, dword [ebp - 0x438]
push eax
call fcn.00414f60
push edi
call fcn.00414f60
mov ecx, dword [ebp - 0x444]
add esp, 8
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, dword [ebp - 0x454]
mov ebx, dword [ebp - 0x440]
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edi, dword [ebp - 0x44c]
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [edi + 4]
test eax, eax
je 0x402bb3
push eax
call fcn.00414f60
add esp, 4
push edi
call fcn.00414f60
mov eax, dword [ebp - 0x430]
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00413f0d
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00413f0d
mov esp, ebp
pop ebp
ret