Function at 0x40a650
Capabilities:
Receive http request
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push edi
lea edi, [esp + 8]
and esp, 0xfffffff8
push dword [edi - 4]
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x9bc]
push ebx
sub esp, 0x9fc
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.httpapi.dll_HttpCreateHttpHandle]
sub esp, 8
mov ebx, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x437
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.Got_error__u._n
call fcn.00401af0
mov eax, dword [ebp - 0x9bc]
call fcn.00401d20
movzx esi, ax
mov eax, esi
call fcn.00401b10
mov dword [ebp - 0x9c4], esi
mov dword [ebp - 0x9c8], eax
mov ebx, eax
mov dword [esp + 8], esi
lea esi, [ebp - 0x8d8]
mov dword [esp + 4], str.GET__foobar_ab_HTTP_1.1_r_nHost:_localhost:_u_r_nConnection:_keep_alive_r_n_r_n
mov dword [esp], esi
call fcn.00401040
mov edi, dword [sym.imp.msvcrt.dll_strlen]
mov dword [esp], esi
mov dword [ebp - 0x9cc], edi
call edi
mov ecx, dword [sym.imp.ws2_32.dll_send]
mov dword [esp], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [ebp - 0x9d4], ecx
call ecx
sub esp, 0x10
mov ebx, eax
mov eax, 0x43d
call fcn.00401190
mov dword [esp], esi
call edi
mov dword [esp + 8], ebx
lea edi, [ebp - 0x810]
cmp ebx, eax
mov dword [esp + 4], str.send___returned__d._n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0xcccccccc
mov ecx, 0x200
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x9c0]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], ecx
lea ecx, [ebp - 0x810]
mov dword [esp + 0x10], ecx
mov ecx, dword [sym.imp.httpapi.dll_HttpReceiveHttpRequest]
mov dword [esp + 0x14], 0x800
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x9bc]
mov dword [esp], eax
mov dword [ebp - 0x9d8], ecx
call ecx
sub esp, 0x20
mov ebx, eax
mov eax, 0x441
call fcn.00401190
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.Got_error__u._n
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x442
mov eax, dword [ebp - 0x9c0]
mov dword [esp + 4], str.Got_size__lu._n
cmp eax, 0x1d0
mov dword [esp + 8], eax
seta al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x443
movzx edx, word [ebp - 0x7e6]
xor eax, eax
mov dword [esp + 4], str.Got_raw_URL_length__u._n
cmp dx, 0xb
mov dword [esp + 8], edx
sete al
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov ecx, dword [sym.imp.msvcrt.dll_strcmp]
mov dword [eax], 0x412056
mov dword [eax + 4], 0x444
mov ebx, dword [ebp - 0x7e0]
mov dword [esp + 4], str._foobar_ab
mov dword [esp], ebx
mov dword [ebp - 0x9dc], ecx
call ecx
mov dword [esp + 8], ebx
lea ebx, [ebp - 0x9a0]
test eax, eax
mov dword [esp + 4], str.Got_raw_URL__s._n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x445
movzx edx, word [ebp - 0x7dc]
xor eax, eax
mov dword [esp + 4], str.Got_full_URL_length__u._n
cmp dx, 0x42
mov dword [esp + 8], edx
sete al
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x446
movzx edx, word [ebp - 0x7da]
xor eax, eax
mov dword [esp + 4], str.Got_host_length__u._n
cmp dx, 0x1e
mov dword [esp + 8], edx
sete al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x447
call fcn.00401190
movzx edx, word [ebp - 0x7d8]
xor eax, eax
mov dword [esp + 4], str.Got_absolute_path_length__u._n
cmp dx, 0xe
mov dword [esp + 8], edx
sete al
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x448
movzx edx, word [ebp - 0x7d6]
xor eax, eax
mov dword [esp + 4], str.Got_query_string_length__u._n
cmp dx, 8
mov dword [esp + 8], edx
sete al
mov dword [esp], eax
call fcn.00401af0
mov eax, dword [ebp - 0x9c4]
mov dword [esp], ebx
mov dword [esp + 8], str.http:__localhost:_u_foobar_ab
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x32
call fcn.00401400
mov eax, 0x44a
call fcn.00401190
mov edx, dword [ebp - 0x7d4]
test edx, edx
je 0x40b360
mov eax, edx
shr eax, 0x10
je 0x40b2c0
mov dword [esp + 4], 0xffffffff
mov edi, str._invalid_
mov dword [esp], edx
mov dword [ebp - 0x9d0], edx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x40a9e3
mov eax, dword [ebp - 0x9d0]
call fcn.004011b0
mov edi, eax
mov eax, ebx
shr eax, 0x10
mov dword [ebp - 0x9d0], eax
je 0x40b1c0
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, str._invalid_
sub esp, 8
test eax, eax
jne 0x40aa1a
mov eax, ebx
call fcn.004011b0
mov edx, eax
mov dword [ebp - 0x9e4], edx
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x7d4]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll_wcscmp]
mov dword [ebp - 0x9e0], eax
call eax
mov dword [esp + 0xc], edi
mov edx, dword [ebp - 0x9e4]
test eax, eax
mov dword [esp + 4], str.Expected_full_URL__s__got__s._n
sete al
mov dword [esp + 8], edx
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x44c
mov edi, dword [ebp - 0x7d0]
test edi, edi
je 0x40b370
mov eax, edi
shr eax, 0x10
je 0x40b1e0
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x40b2e0
mov eax, edi
call fcn.004011b0
mov edi, dword [ebp - 0x7d0]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Got_host__s._n
mov eax, dword [ebp - 0x7d4]
add eax, 0xe
cmp edi, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x44d
call fcn.00401190
mov edi, dword [ebp - 0x7cc]
test edi, edi
je 0x40b350
mov eax, edi
shr eax, 0x10
je 0x40b2a0
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x40b330
mov eax, edi
call fcn.004011b0
mov edi, dword [ebp - 0x7cc]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Got_absolute_path__s._n
mov eax, dword [ebp - 0x7d4]
add eax, 0x2c
cmp edi, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x44f
mov edi, dword [ebp - 0x7c8]
test edi, edi
je 0x40b340
mov eax, edi
shr eax, 0x10
je 0x40b280
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x40b320
mov eax, edi
call fcn.004011b0
mov edi, dword [ebp - 0x7c8]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Got_query_string__s._n
mov eax, dword [ebp - 0x7d4]
add eax, 0x3a
cmp edi, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov edi, dword [ebp - 0x9c8]
mov dword [esp], edi
mov edx, dword [ebp - 0x800]
mov ecx, dword [ebp - 0x7fc]
mov eax, dword [ebp - 0x9bc]
call fcn.00401be0
mov eax, dword [ebp - 0x9c4]
mov dword [esp], esi
mov dword [esp + 4], str.GET_http:__localhost:_u__HTTP_1.1_r_nHost:_ignored_r_nConnection:_keep_alive_r_n_r_n
mov dword [esp + 8], eax
call fcn.00401040
mov dword [esp], esi
mov ecx, dword [ebp - 0x9cc]
call ecx
mov dword [esp + 4], esi
mov dword [esp], edi
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x9d4]
call edx
sub esp, 0x10
mov edi, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x456
mov dword [esp], esi
mov ecx, dword [ebp - 0x9cc]
lea esi, [ebp - 0x9c0]
call ecx
mov dword [esp + 8], edi
cmp edi, eax
mov dword [esp + 4], str.send___returned__d._n
lea edi, [ebp - 0x810]
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0xcccccccc
mov ecx, 0x200
rep stosd dword es:[edi], eax
mov dword [esp + 0x18], esi
lea esi, [ebp - 0x810]
mov dword [esp + 0x10], esi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], 0x800
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x9bc]
mov dword [esp], eax
mov ecx, dword [ebp - 0x9d8]
call ecx
sub esp, 0x20
mov esi, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x45a
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
lea esi, [ebp - 0x9b8]
mov dword [esp], eax
mov dword [esp + 4], str.Got_error__u._n
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x45b
mov eax, dword [ebp - 0x9c0]
mov dword [esp + 4], str.Got_size__lu._n
cmp eax, 0x1d0
mov dword [esp + 8], eax
seta al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x45c
movzx edx, word [ebp - 0x7e6]
mov dword [esp + 4], str.Got_raw_URL_length__u._n
cmp dx, 0x17
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, dword [ebp - 0x9c4]
mov dword [esp], esi
mov dword [esp + 4], str.http:__localhost:_u_
mov dword [esp + 8], eax
call fcn.00401040
mov eax, 0x45e
call fcn.00401190
mov edi, dword [ebp - 0x7e0]
mov dword [esp + 4], esi
mov dword [esp], edi
mov edx, dword [ebp - 0x9dc]
call edx
mov dword [esp + 0xc], edi
test eax, eax
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Expected_raw_URL___s___got___s_._n
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x45f
call fcn.00401190
movzx edx, word [ebp - 0x7dc]
mov dword [esp + 4], str.Got_full_URL_length__u._n
cmp dx, 0x2e
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x460
call fcn.00401190
movzx edx, word [ebp - 0x7da]
mov dword [esp + 4], str.Got_host_length__u._n
cmp dx, 0x1e
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x461
call fcn.00401190
movzx edx, word [ebp - 0x7d8]
mov dword [esp + 4], str.Got_absolute_path_length__u._n
cmp dx, 2
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x462
movzx edx, word [ebp - 0x7d6]
mov dword [esp + 4], str.Got_query_string_length__u._n
test dx, dx
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, dword [ebp - 0x9c4]
mov dword [esp], ebx
mov dword [esp + 8], 0x4121d4
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x32
call fcn.00401400
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x464
mov edi, dword [ebp - 0x7d4]
test edi, edi
je 0x40b3b0
mov eax, edi
shr eax, 0x10
je 0x40b200
mov dword [esp + 4], 0xffffffff
mov esi, str._invalid_
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x40aef5
mov eax, edi
call fcn.004011b0
mov esi, eax
mov eax, dword [ebp - 0x9d0]
test eax, eax
je 0x40b1a0
mov dword [esp + 4], 0xffffffff
mov edi, str._invalid_
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x40af29
mov eax, ebx
call fcn.004011b0
mov edi, eax
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x7d4]
mov dword [esp], eax
mov eax, dword [ebp - 0x9e0]
call eax
mov dword [esp + 0xc], esi
test eax, eax
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.Expected_full_URL__s__got__s._n
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x466
mov ebx, dword [ebp - 0x7d0]
test ebx, ebx
je 0x40b3a0
mov eax, ebx
shr eax, 0x10
je 0x40b260
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x40b310
mov eax, ebx
call fcn.004011b0
mov ebx, dword [ebp - 0x7d0]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Got_host__s._n
mov eax, dword [ebp - 0x7d4]
add eax, 0xe
cmp ebx, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x467
mov ebx, dword [ebp - 0x7cc]
test ebx, ebx
je 0x40b390
mov eax, ebx
shr eax, 0x10
je 0x40b240
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x40b300
mov eax, ebx
call fcn.004011b0
mov ebx, dword [ebp - 0x7cc]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Got_absolute_path__s._n
mov eax, dword [ebp - 0x7d4]
add eax, 0x2c
cmp ebx, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x469
mov ebx, dword [ebp - 0x7c8]
test ebx, ebx
je 0x40b380
mov eax, ebx
shr eax, 0x10
je 0x40b220
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x40b2f0
mov eax, ebx
call fcn.004011b0
mov ebx, dword [ebp - 0x7c8]
mov dword [esp + 8], eax
xor eax, eax
test ebx, ebx
lea ebx, [ebp - 0x93c]
sete al
mov dword [esp + 4], str.Got_query_string__s._n
mov dword [esp], eax
call fcn.00401af0
mov edi, dword [ebp - 0x9c8]
mov dword [esp], edi
mov edx, dword [ebp - 0x800]
mov ecx, dword [ebp - 0x7fc]
mov eax, dword [ebp - 0x9bc]
call fcn.00401be0
mov eax, dword [ebp - 0x9c4]
mov esi, dword [ebp - 0x9bc]
mov dword [esp], ebx
mov dword [esp + 8], 0x4121d4
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x32
call fcn.00401400
mov dword [esp + 4], ebx
mov dword [esp], esi
call dword [sym.imp.httpapi.dll_HttpRemoveUrl]
sub esp, 8
mov ebx, eax
mov eax, 0x46e
call fcn.00401190
xor eax, eax
test ebx, ebx
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.Got_error__u._n
mov dword [esp], eax
call fcn.00401af0
mov dword [esp], edi
call dword [sym.imp.ws2_32.dll_closesocket]
mov eax, dword [ebp - 0x9bc]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov ebx, eax
mov eax, 0x471
call fcn.00401190
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], str.Failed_to_close_queue_handle__error__lu._n
mov dword [esp + 8], eax
call fcn.00401af0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret
movzx eax, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401000
mov edi, eax
jmp 0x40af29
movzx eax, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401000
mov edx, eax
jmp 0x40aa1a
movzx edi, di
mov dword [esp], str._04x
mov dword [esp + 4], edi
call fcn.00401000
mov edi, dword [ebp - 0x7d0]
jmp 0x40aab4
movzx edi, di
mov dword [esp], str._04x
mov dword [esp + 4], edi
call fcn.00401000
mov esi, eax
jmp 0x40aef5
movzx ebx, bx
mov dword [esp], str._04x
mov dword [esp + 4], ebx
call fcn.00401000
mov ebx, dword [ebp - 0x7c8]
jmp 0x40b0a4
movzx ebx, bx
mov dword [esp], str._04x
mov dword [esp + 4], ebx
call fcn.00401000
mov ebx, dword [ebp - 0x7cc]
jmp 0x40b02b
movzx ebx, bx
mov dword [esp], str._04x
mov dword [esp + 4], ebx
call fcn.00401000
mov ebx, dword [ebp - 0x7d0]
jmp 0x40afb2
movzx edi, di
mov dword [esp], str._04x
mov dword [esp + 4], edi
call fcn.00401000
mov edi, dword [ebp - 0x7c8]
jmp 0x40ab9e
movzx edi, di
mov dword [esp], str._04x
mov dword [esp + 4], edi
call fcn.00401000
mov edi, dword [ebp - 0x7cc]
jmp 0x40ab25
movzx edx, dx
mov dword [esp], str._04x
mov dword [esp + 4], edx
call fcn.00401000
mov edi, eax
jmp 0x40a9e3
mov edi, dword [ebp - 0x7d0]
mov eax, str._invalid_
jmp 0x40aab4
mov ebx, dword [ebp - 0x7c8]
mov eax, str._invalid_
jmp 0x40b0a4
mov ebx, dword [ebp - 0x7cc]
mov eax, str._invalid_
jmp 0x40b02b
mov ebx, dword [ebp - 0x7d0]
mov eax, str._invalid_
jmp 0x40afb2
mov edi, dword [ebp - 0x7c8]
mov eax, str._invalid_
jmp 0x40ab9e
mov edi, dword [ebp - 0x7cc]
mov eax, str._invalid_
jmp 0x40ab25
mov eax, str._null_
jmp 0x40ab9e
mov eax, str._null_
jmp 0x40ab25
mov edi, str._null_
jmp 0x40a9e3
mov eax, str._null_
jmp 0x40aab4
mov eax, str._null_
jmp 0x40b0a4
mov eax, str._null_
jmp 0x40b02b
mov eax, str._null_
jmp 0x40afb2
mov esi, str._null_
jmp 0x40aef5