Function at 0x40950b
Capabilities:
Connect to http server
Create http request
Get file size
Parse url
Read and send data from client to server
Read file on windows
Send data
Send http request
Send http request with host header

Disassembly:
mov eax, 0x5858
call fcn.00418a70
mov eax, dword [0x43c580]
xor eax, esp
mov dword [esp + 0x5854], eax
push ebx
mov ebx, dword [esp + 0x5860]
xor eax, eax
push ebp
push esi
mov esi, dword [esp + 0x586c]
push 0x1ffe
push eax
mov word [esp + 0x3868], ax
lea eax, [esp + 0x386a]
push eax
mov dword [esp + 0x40], ebx
call fcn.00417630
add esp, 0xc
mov dword [esp + 0x24], 0x1000
xor ebp, ebp
lea eax, [esp + 0x24]
push ebp
push eax
lea eax, [esp + 0x3868]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetCanonicalizeUrlW]
push 0x38
lea eax, [esp + 0x44]
push ebp
push eax
call fcn.00417630
xor eax, eax
mov esi, 0x7ce
push esi
mov word [esp + 0x1160], ax
lea eax, [esp + 0x1162]
push ebp
push eax
call fcn.00417630
xor eax, eax
push esi
mov word [esp + 0x30ac], ax
lea eax, [esp + 0x30ae]
push ebp
push eax
call fcn.00417630
xor eax, eax
push esi
mov word [esp + 0x2118], ax
lea eax, [esp + 0x211a]
push ebp
push eax
call fcn.00417630
xor eax, eax
push esi
mov word [esp + 0x9b4], ax
lea eax, [esp + 0x9b6]
push ebp
push eax
call fcn.00417630
xor eax, eax
push esi
mov word [esp + 0x1960], ax
lea eax, [esp + 0x1962]
push ebp
push eax
call fcn.00417630
add esp, 0x48
xor eax, eax
mov word [esp + 0x28c0], ax
lea eax, [esp + 0x28c2]
push esi
push ebp
push eax
call fcn.00417630
lea eax, [esp + 0x115c]
mov dword [esp + 0x48], 0x3c
mov dword [esp + 0x4c], eax
add esp, 0xc
lea eax, [esp + 0x3090]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x20f0]
mov dword [esp + 0x58], eax
lea eax, [esp + 0x980]
mov dword [esp + 0x60], eax
lea eax, [esp + 0x1920]
mov dword [esp + 0x68], eax
lea eax, [esp + 0x28c0]
mov dword [esp + 0x70], eax
mov eax, 0x3e8
mov dword [esp + 0x44], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x74], eax
lea eax, [esp + 0x3c]
push eax
push ebp
push dword [esp + 0x2c]
lea eax, [esp + 0x386c]
push eax
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
mov dword [esp + 0x10], ebp
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
xor eax, eax
push 0x3fe
mov word [esp + 0x584], ax
lea eax, [esp + 0x586]
push ebp
push eax
call fcn.00417630
push 0x1ff
lea eax, [esp + 0x211]
mov byte [esp + 0x210], 0
push ebp
push eax
call fcn.00417630
push esi
push esi
lea eax, [esp + 0x5a0]
push 0x432574
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
push esi
push esi
lea eax, [esp + 0x230]
push str.___________________________x_x
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x38
push ebp
push 0x80
push 3
push ebp
push 3
push 0x80000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
xor ebx, ebx
mov dword [esp + 0x18], eax
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x580]
push eax
lea eax, [esp + 0x484]
push str.Content_Type:_multipart_form_data__boundary_s
push eax
call fcn.00402479
add esp, 0xc
lea ecx, [esp + 0x20]
push str.Host:
call fcn.004026d6
push dword [esp + 0x4c]
lea ecx, [esp + 0x24]
call fcn.00403fa5
push ebx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebp, eax
mov dword [esp + 0x2c], ebp
test ebp, ebp
je 0x409ac8
push ebx
push ebx
push 3
mov eax, 0x4320b0
push eax
push eax
push dword [esp + 0x68]
push dword [esp + 0x64]
push ebp
call dword [sym.imp.WININET.dll_InternetConnectW]
mov ebx, eax
mov dword [esp + 0x28], ebx
test ebx, ebx
jne 0x4097bf
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x409ac8
push edi
push dword [esp + 0x6c]
lea ecx, [esp + 0x14]
call fcn.004026d6
push dword [esp + 0x74]
lea ecx, [esp + 0x14]
call fcn.00403fa5
mov edi, dword [esp + 0x10]
xor eax, eax
push eax
push 0x80000
push eax
push eax
push str.HTTP_1.0
push edi
push str.POST
push ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, eax
mov dword [esp + 0x3c], esi
test esi, esi
jne 0x40980c
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x409830
push 4
push 0x1000
push dword [esp + 0x20]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [esp + 0x34], eax
test eax, eax
jne 0x40983b
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
push ebp
call esi
jmp 0x409abf
mov esi, dword [esp + 0x1c]
lea ecx, [esp + 0x7c]
push 0
push ecx
push dword [esp + 0x20]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x204]
push eax
lea eax, [esp + 0x188]
push str.___s_r_n
push eax
call fcn.0040245e
lea eax, [esp + 0x210]
push eax
lea eax, [esp + 0x414]
push str._r_n___s_r_n
push eax
call fcn.0040245e
lea eax, [esp + 0x21c]
push eax
lea eax, [esp + 0x120]
push str._r_n___s___r_n
push eax
call fcn.0040245e
add esp, 0x24
lea ecx, [esp + 0x20]
push str.Content_Disposition:_form_data__name_filename___filename_
call fcn.004026a6
push 3
push dword [esp + 0x3c]
lea eax, [esp + 0x8c]
lea ecx, [esp + 0x88]
mov dword [esp + 0x88], eax
call fcn.00406085
push dword [esp + 0x80]
lea ecx, [esp + 0x20]
call fcn.004026a6
lea eax, [esp + 0x84]
cmp dword [esp + 0x80], eax
je 0x409905
push dword [esp + 0x80]
call fcn.004154de
pop ecx
push dword [esp + 0x1c]
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
push eax
lea ecx, [esp + 0x24]
call fcn.00403eef
push 0x4326dc
lea ecx, [esp + 0x24]
call fcn.00403eef
call fcn.00405d59
push eax
lea ecx, [esp + 0x14]
call fcn.00402680
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x104]
push eax
mov ebp, dword [esi - 0xc]
call fcn.00417880
mov ebx, eax
mov dword [esp], str.Content_Type:_application_octet_stream_r_n_r_n
call fcn.00417880
add ebx, eax
lea eax, [esp + 0x188]
push eax
call fcn.00417880
add eax, ebx
add eax, ebp
add eax, dword [esp + 0x20]
push eax
lea eax, [esp + 0x1c]
push str.Content_Length:__i
push eax
call fcn.004059d9
mov ebp, dword [esp + 0x50]
add esp, 0x14
mov ebx, dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
push 0xa0000000
push 0xffffffffffffffff
push dword [esp + 0x2c]
push ebp
call ebx
push 0xa0000000
push 0xffffffffffffffff
push str.Accept:__
push ebp
call ebx
push 0xa0000000
push 0xffffffffffffffff
push dword [esp + 0x18]
push ebp
call ebx
push 0xa0000000
push 0xffffffffffffffff
lea eax, [esp + 0x48c]
push eax
push ebp
call ebx
xor eax, eax
push eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.WININET.dll_HttpSendRequestExW]
test eax, eax
jne 0x4099f4
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebp
call ebx
push dword [esp + 0x2c]
call ebx
push dword [esp + 0x30]
call ebx
jmp 0x409a9f
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x188]
push eax
call fcn.00417880
mov ebx, dword [sym.imp.WININET.dll_InternetWriteFile]
pop ecx
push eax
lea eax, [esp + 0x18c]
push eax
push ebp
call ebx
lea eax, [esp + 0x14]
push eax
push dword [esi - 0xc]
push esi
push ebp
call ebx
lea eax, [esp + 0x14]
push eax
push str.Content_Type:_application_octet_stream_r_n_r_n
call fcn.00417880
pop ecx
push eax
push str.Content_Type:_application_octet_stream_r_n_r_n
push ebp
call ebx
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x1c]
push dword [esp + 0x3c]
push ebp
call ebx
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x108]
push eax
call fcn.00417880
pop ecx
push eax
lea eax, [esp + 0x10c]
push eax
push ebp
call ebx
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.WININET.dll_HttpEndRequestW]
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebp
call ebx
push dword [esp + 0x2c]
call ebx
push dword [esp + 0x30]
call ebx
push 0x8000
push 0
push dword [esp + 0x3c]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov ecx, dword [esp + 0x10]
lea ecx, [ecx - 0x10]
call fcn.00407118
mov ecx, dword [esp + 0x1c]
lea ecx, [ecx - 0x10]
call fcn.00407118
lea ecx, [esi - 0x10]
call fcn.00407118
lea ecx, [edi - 0x10]
call fcn.00407118
pop edi
mov ecx, dword [esp + 0x20]
lea ecx, [ecx - 0x10]
call fcn.00407118
mov ecx, dword [esp + 0x5860]
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004189a5
add esp, 0x5858
ret