Function at 0x409040
Capabilities:
Connect to http server
Create http request
Reference http user-agent string
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x4a8488
push 0x47eeb0
mov eax, dword fs:[0]
push eax
sub esp, 0x1dc
mov eax, dword [0x4aab30]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x20], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov dword [ebp - 0x19c], esi
mov edi, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x1ac], eax
mov dword [ebp - 0x1ec], ecx
mov dword [ebp - 0x1e4], edx
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x1d8], eax
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x1e0], ecx
mov edx, dword [ebp + 0x20]
mov dword [ebp - 0x1a0], edx
xor ebx, ebx
mov dword [ebp - 0x18c], ebx
mov dword [ebp - 0x194], ebx
mov dword [ebp - 0x198], ebx
mov dword [ebp - 0x190], ebx
mov byte [ebp - 0x84], bl
push 0x3f
push ebx
lea eax, [ebp - 0x83]
push eax
call fcn.0047d730
add esp, 0xc
mov dword [ebp - 0x1dc], 0x40
mov dword [ebp - 0x1d4], ebx
xor eax, eax
mov dword [ebp - 0x1d0], eax
mov dword [ebp - 0x1cc], eax
mov dword [ebp - 0x1c8], eax
mov dword [ebp - 0x1c4], eax
mov dword [ebp - 0x1c0], eax
mov dword [ebp - 0x1bc], eax
mov dword [ebp - 0x1b8], eax
mov dword [ebp - 0x1b4], eax
mov dword [ebp - 0x1b0], eax
mov dword [ebp - 0x1a4], 0x1b7740
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x1a0]
cmp eax, ebx
je 0x409145
mov dword [eax], ebx
push ebx
push ebx
push ebx
push ebx
push str.Mozilla_5.0__Windows_NT_6.3__Win64__x64__AppleWebKit_537.36__KHTML__like_Gecko__Chrome_37.0.2049.0
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x194], eax
cmp eax, ebx
jne 0x40917f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18c], eax
push eax
push str.Unable_to_open_internet_connection._Error_code__lu.
mov ecx, eax
call fcn.00405e70
add esp, 8
jmp 0x409506
push ebx
push ebx
push 3
push ebx
push ebx
push 0x50
push esi
push eax
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp - 0x198], eax
cmp eax, ebx
jne 0x4091bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18c], eax
push eax
push esi
push str.Unable_to_connect_to__S._Error_code__lu.
mov ecx, eax
call fcn.00405e70
add esp, 0xc
jmp 0x409506
push ebx
push 0x84404000
push ebx
push ebx
push ebx
push edi
push str.POST
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov edi, eax
mov dword [ebp - 0x190], edi
cmp edi, ebx
jne 0x4091ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18c], eax
push eax
push esi
push str.Open_request_to_server__S_failed._Error_code__lu.
mov ecx, eax
call fcn.00405e70
add esp, 0xc
jmp 0x409506
mov ecx, dword [ebp - 0x1ac]
push ecx
push str.Content_Type:_multipart_form_data__boundary_s_r_n_r_n
lea edx, [ebp - 0x184]
call fcn.004087e0
mov edx, dword [ebp - 0x1ac]
push edx
push str.___s___r_n
lea edx, [ebp - 0x40]
call fcn.00405510
add esp, 0x10
push 0x20000000
push 0xffffffffffffffff
lea eax, [ebp - 0x184]
push eax
push edi
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
test eax, eax
jne 0x409268
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18c], eax
push eax
push esi
push str.Add_http_multipart_request_headers_failed__server:__S_._Error_code__lu.
mov ecx, eax
call fcn.00405e70
add esp, 0xc
jmp 0x409506
xor eax, eax
mov dword [ebp - 0x1d4], eax
mov dword [ebp - 0x1d0], eax
mov dword [ebp - 0x1cc], eax
mov dword [ebp - 0x1c8], eax
mov dword [ebp - 0x1c4], eax
mov dword [ebp - 0x1c0], eax
mov dword [ebp - 0x1bc], eax
mov dword [ebp - 0x1b8], eax
mov dword [ebp - 0x1b4], eax
mov dword [ebp - 0x1b0], eax
mov dword [ebp - 0x1d4], 0x28
lea eax, [ebp - 0x40]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4092b6
sub eax, edx
mov ecx, dword [ebp + 0x14]
add eax, ecx
mov dword [ebp - 0x1b8], eax
push 4
lea edx, [ebp - 0x1a4]
push edx
push 6
push edi
call dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea eax, [ebp - 0x1a4]
push eax
push 5
push edi
call dword [sym.imp.WININET.dll_InternetSetOptionW]
test eax, eax
jne 0x409314
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18c], eax
push eax
push esi
push str.Set_timeout_for_http_multipart_request_failed__server:__S_._Error_code__lu.
mov ecx, eax
call fcn.00405e70
add esp, 0xc
jmp 0x409506
push ebx
push 8
push ebx
lea ecx, [ebp - 0x1d4]
push ecx
push edi
call dword [sym.imp.WININET.dll_HttpSendRequestExW]
cmp eax, ebx
jne 0x40936b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18c], eax
cmp eax, 0x2f0d
jne 0x409355
push esi
push str.Server_CA_is_not_trusted._Unable_to_establish_secure_connection_to__S.
mov ecx, 0x2f0d
call fcn.00405e70
add esp, 8
jmp 0x409506
push eax
push esi
push str.Unable_to_send_request_to_the_server___S_._Error_code:__lu.
mov ecx, eax
call fcn.00405e70
add esp, 0xc
jmp 0x409506
xor esi, esi
mov dword [ebp - 0x1e8], esi
mov byte [ebp - 0x185], 1
mov dword [ebp - 0x18c], ebx
mov edi, dword [ebp + 0x14]
sub edi, esi
cmp edi, 0x400
jbe 0x409392
mov edi, 0x400
xor ecx, ecx
cmp ecx, ebx
je 0x4093ad
push ebx
mov edx, dword [ebp + 0x14]
push edx
push ebx
push esi
xor eax, eax
push eax
call ecx
add esp, 0x14
mov byte [ebp - 0x185], al
lea eax, [ebp - 0x1a8]
push eax
push edi
mov ecx, dword [ebp - 0x1ec]
add ecx, esi
push ecx
mov edi, dword [ebp - 0x190]
push edi
call dword [sym.imp.WININET.dll_InternetWriteFile]
test eax, eax
jne 0x40940a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18c], eax
cmp eax, 0x2f0d
jne 0x4093ee
mov edx, dword [ebp - 0x19c]
push edx
jmp 0x40933e
push eax
mov ecx, dword [ebp - 0x19c]
push ecx
push str.Unable_to_send_request_to_the_server___S_._Error_code:__lu.
mov ecx, eax
call fcn.00405e70
add esp, 0xc
jmp 0x409506
add esi, dword [ebp - 0x1a8]
mov dword [ebp - 0x1e8], esi
cmp byte [ebp - 0x185], bl
je 0x40942d
cmp esi, dword [ebp + 0x14]
jb 0x40937a
mov edi, dword [ebp - 0x190]
xor ecx, ecx
cmp ecx, ebx
je 0x409450
cmp byte [ebp - 0x185], bl
je 0x409450
push ebx
mov edx, dword [ebp + 0x14]
push edx
push ebx
push esi
xor eax, eax
push eax
call ecx
add esp, 0x14
mov byte [ebp - 0x185], al
lea eax, [ebp - 0x40]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x409456
sub eax, edx
lea ecx, [ebp - 0x1a8]
push ecx
push eax
lea edx, [ebp - 0x40]
push edx
push edi
call dword [sym.imp.WININET.dll_InternetWriteFile]
test eax, eax
jne 0x40949b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18c], eax
push eax
mov ecx, dword [ebp - 0x19c]
push ecx
push str.Unable_to_send_multipart_body_footer_to_the_server___S_._Error_code:__lu.
mov ecx, eax
call fcn.00405e70
add esp, 0xc
jmp 0x409506
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.WININET.dll_HttpEndRequestW]
test eax, eax
jne 0x4094ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18c], eax
push eax
mov edx, dword [ebp - 0x19c]
push edx
push str.Unable_to_send_end_of_multipart_request_to_the_server___S_._Error_code:__lu.
mov ecx, eax
call fcn.00405e70
add esp, 0xc
jmp 0x409506
push ebx
lea eax, [ebp - 0x1dc]
push eax
lea ecx, [ebp - 0x84]
push ecx
push 0x13
push edi
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
cmp eax, 1
jne 0x409506
mov esi, dword [ebp - 0x1a0]
cmp esi, ebx
je 0x409506
lea eax, [ebp - 0x84]
push eax
call fcn.0047ab2f
add esp, 4
mov dword [esi], eax
mov dword [ebp - 4], 0xfffffffe
call fcn.00409532
mov eax, edi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.0047a722
mov esp, ebp
pop ebp
ret