Function at 0x410350
Capabilities:
Check http status code
Connect to http server
Create http request
Parse url
Print debug messages
Reference http user-agent string
Send data
Send http request

Disassembly:
sub esp, 0x5a8
mov eax, dword [0x430400]
xor eax, esp
mov dword [esp + 0x5a4], eax
mov eax, dword [esp + 0x5b4]
mov edx, dword [esp + 0x5b8]
mov ecx, dword [esp + 0x5b0]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x5bc]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x5c4]
mov dword [esp], edx
mov edx, dword [esp + 0x5c0]
push esi
mov esi, dword [esp + 0x5b0]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], eax
test eax, eax
je 0x4103b7
mov dword [eax], 0
push ecx
call fcn.0040e6d0
add esp, 4
test al, al
jne 0x4103dc
xor al, al
pop esi
mov ecx, dword [esp + 0x5a4]
xor ecx, esp
call fcn.0041139e
add esp, 0x5a8
ret
push 0x3c
lea eax, [esp + 0x2c]
push 0
push eax
call fcn.00414160
lea ecx, [esp + 0xcc]
mov eax, 0x100
mov dword [esp + 0x38], ecx
add esp, 0xc
cmp dword [esi + 0x18], 8
lea edx, [esp + 0x1a8]
lea ecx, [esp + 0x3a8]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x58], eax
mov eax, dword [esi + 0x14]
mov dword [esp + 0x28], 0x3c
mov dword [esp + 0x30], 0x10
mov dword [esp + 0x38], edx
mov dword [esp + 0x54], ecx
jb 0x410439
mov esi, dword [esi + 4]
jmp 0x41043c
add esi, 4
lea edx, [esp + 0x28]
push edx
push 0
push eax
push esi
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
je 0x4103c4
push ebx
xor bl, bl
mov ecx, str.https
lea eax, [esp + 0xc4]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x410488
test dx, dx
je 0x410484
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x410488
add eax, 4
add ecx, 4
test dx, dx
jne 0x410462
xor eax, eax
jmp 0x41048d
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4104cb
mov bl, 1
push ebp
push 0
push 0
push 0
push 0
push str.User_Agent:_Mozilla_5.0__Windows__U__Windows_NT_5.1__en_US__AppleWebKit_534.3__KHTML__like_Gecko__Chrome_6.0.472.63_Safari_534.3
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebp, eax
mov dword [esp + 0x14], ebp
test ebp, ebp
jne 0x41051f
pop ebp
pop ebx
xor al, al
pop esi
mov ecx, dword [esp + 0x5a4]
xor ecx, esp
call fcn.0041139e
add esp, 0x5a8
ret
mov ecx, str.http
lea eax, [esp + 0xc4]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4104fd
test dx, dx
je 0x4104f9
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4104fd
add eax, 4
add ecx, 4
test dx, dx
jne 0x4104d7
xor eax, eax
jmp 0x410502
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x410493
pop ebx
xor al, al
pop esi
mov ecx, dword [esp + 0x5a4]
xor ecx, esp
call fcn.0041139e
add esp, 0x5a8
ret
mov eax, dword [esp + 0x48]
push edi
push 0
push 0
push 3
push 0
push 0
push eax
lea ecx, [esp + 0x1cc]
push ecx
push ebp
call dword [sym.imp.WININET.dll_InternetConnectW]
mov edi, eax
mov dword [esp + 0x14], edi
test edi, edi
jne 0x410556
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor al, al
jmp 0x4108be
movzx edx, bl
neg edx
push 0
sbb edx, edx
and edx, 0x800000
or edx, 0xc3180
push edx
push 0
push 0
push 0
lea eax, [esp + 0x3c8]
push eax
push str.POST
push edi
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, eax
test esi, esi
jne 0x41059f
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
call esi
push ebp
call esi
xor al, al
jmp 0x4108be
lea ecx, [esp + 0xa8]
push ecx
call fcn.0040ef00
lea edx, [esp + 0xac]
push edx
lea eax, [esp + 0x94]
push eax
call fcn.0040ef90
mov eax, dword [esp + 0x9c]
add esp, 0xc
cmp dword [esp + 0xa4], 8
jae 0x4105dc
lea eax, [esp + 0x90]
push 0x20000000
push 0xffffffffffffffff
push eax
push esi
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x70]
push ecx
mov ecx, dword [esp + 0x34]
lea edx, [esp + 0xac]
push edx
mov edx, dword [esp + 0x30]
push eax
push ecx
push edx
mov dword [esp + 0x9c], 0xf
mov dword [esp + 0x98], 0
mov byte [esp + 0x88], 0
call fcn.0040fa30
add esp, 0x14
test al, al
jne 0x410673
push str.gen_req_err
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [esp + 0x70]
call fcn.00406db0
lea ecx, [esp + 0x8c]
call fcn.00406de0
lea ecx, [esp + 0xa8]
call fcn.00406de0
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push edi
call esi
push ebp
call esi
xor al, al
jmp 0x4108be
mov ebx, dword [esp + 0x1c]
mov ebp, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionW]
test ebx, ebx
je 0x4106d9
push 4
push ebx
push 5
push esi
call edi
test eax, eax
jne 0x4106b0
push str.Could_not_unset_send_timeout__continuing...
call ebp
push str.Could_not_unset_send_timeout__continuing..._n
call fcn.00411a16
add eax, 0x40
push eax
call fcn.00414dc5
add esp, 8
push 4
push ebx
push 6
push esi
call edi
test eax, eax
jne 0x4106d9
push str.Could_not_unset_receive_timeout__continuing..._n
call ebp
push str.Could_not_unset_receive_timeout__continuing..._n
call fcn.00411a16
add eax, 0x40
push eax
call fcn.00414dc5
add esp, 8
mov ebx, dword [sym.imp.WININET.dll_InternetQueryOptionW]
nop
cmp dword [esp + 0x88], 0x10
mov eax, dword [esp + 0x74]
jae 0x4106f2
lea eax, [esp + 0x74]
mov ecx, dword [esp + 0x84]
push ecx
push eax
push 0
push 0
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x41078e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f0d
jne 0x410748
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x14]
push eax
push 0x1f
push esi
mov dword [esp + 0x2c], 4
call ebx
or dword [esp + 0x10], 0x100
push 4
lea ecx, [esp + 0x14]
push ecx
push 0x1f
push esi
call edi
jmp 0x4106e0
push str.Http_send_request_error_
call ebp
lea ecx, [esp + 0x70]
call fcn.00406db0
lea ecx, [esp + 0x8c]
call fcn.00406de0
lea ecx, [esp + 0xa8]
call fcn.00406de0
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
mov edx, dword [esp + 0x14]
push edx
call esi
mov eax, dword [esp + 0x18]
push eax
call esi
xor al, al
jmp 0x4108be
push str.send_request
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0xcc]
push edx
push 0x13
push esi
mov dword [esp + 0x40], 8
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x410803
push str.http_query_info...
call ebp
lea ecx, [esp + 0x70]
call fcn.00406db0
lea ecx, [esp + 0x8c]
call fcn.00406de0
lea ecx, [esp + 0xa8]
call fcn.00406de0
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
mov eax, dword [esp + 0x14]
push eax
call esi
mov ecx, dword [esp + 0x18]
push ecx
call esi
xor al, al
jmp 0x4108be
push 0xa
lea edx, [esp + 0xc8]
push 0
push edx
call fcn.00414d9a
mov edi, eax
mov eax, dword [esp + 0x30]
add esp, 0xc
test eax, eax
je 0x410823
mov dword [eax], edi
xor eax, eax
push 0xc6
push eax
lea ecx, [esp + 0xf6]
push ecx
mov word [esp + 0xf8], ax
call fcn.00414160
push edi
lea edx, [esp + 0xfc]
push str.http_response_code:_d
push edx
call fcn.0040e530
add esp, 0x18
lea eax, [esp + 0xec]
push eax
call ebp
cmp edi, 0xc8
sete bl
test bl, bl
je 0x41087d
mov ecx, dword [esp + 0x20]
push ecx
push esi
call fcn.0040f5f0
add esp, 8
mov bl, al
push str.ret_rst
call ebp
lea ecx, [esp + 0x70]
call fcn.00406db0
lea ecx, [esp + 0x8c]
call fcn.00406de0
lea ecx, [esp + 0xa8]
call fcn.00406de0
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
mov edx, dword [esp + 0x14]
push edx
call esi
mov eax, dword [esp + 0x18]
push eax
call esi
mov al, bl
mov ecx, dword [esp + 0x5b4]
pop edi
pop ebp
pop ebx
pop esi
xor ecx, esp
call fcn.0041139e
add esp, 0x5a8
ret