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

Disassembly:
push edi
mov eax, 0x1270
lea edi, [esp + 8]
and esp, 0xfffffff8
push dword [edi - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
call fcn.0040f5e0
mov ecx, 0x48
sub esp, eax
lea edi, [ebp - 0x1130]
xor eax, eax
rep stosd dword es:[edi], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateEventA]
mov esi, dword [0x413108]
mov dword [ebp - 0x11fc], eax
sub esp, 0x10
lea eax, [ebp - 0x1228]
mov dword [esp], esi
mov dword [esp + 8], 0
mov dword [esp + 4], eax
call dword [0x42501c]
sub esp, 0xc
mov ebx, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x700
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.Failed_to_create_session__error__u._n
call fcn.00401af0
lea eax, [ebp - 0x1220]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x1224]
mov eax, dword [ebp - 0x1228]
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [0x425014]
sub esp, 0x10
mov ebx, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x702
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.Failed_to_create_URL_group__error__u._n
call fcn.00401af0
lea eax, [ebp - 0x1234]
mov dword [esp], esi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
call dword [0x425018]
sub esp, 0x14
mov ebx, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x704
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.Failed_to_create_request_queue__error__u._n
call fcn.00401af0
mov eax, dword [ebp - 0x1234]
or byte [ebp - 0x1214], 1
mov dword [ebp - 0x1210], eax
lea eax, [ebp - 0x1214]
mov dword [esp + 0x10], 8
mov dword [esp + 0xc], eax
mov dword [esp + 8], 7
mov edx, dword [ebp - 0x121c]
mov eax, dword [ebp - 0x1220]
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [0x425000]
sub esp, 0x14
mov ebx, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x708
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.Failed_to_bind_request_queue__error__u._n
mov esi, dword fs:[0x18]
call fcn.00401af0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x7b
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x1234]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreateIoCompletionPort]
sub esp, 0x10
mov ebx, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x70b
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.Failed_to_create_completion_port__error__lu._n
mov dword [esp + 8], eax
xor eax, eax
test ebx, ebx
setne al
mov dword [esp], eax
call fcn.00401af0
lea eax, [ebp - 0x1238]
mov dword [esp], ebx
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x122c]
mov dword [esp + 8], eax
lea eax, [ebp - 0x1230]
mov dword [esp + 4], eax
mov eax, dword [sym.imp.kernel32.dll_GetQueuedCompletionStatus]
mov dword [esp + 0x10], 0
mov dword [ebp - 0x123c], eax
call eax
sub esp, 0x14
mov edi, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x70e
xor eax, eax
test edi, edi
sete al
mov dword [esp + 4], str.Expected_failure._n
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x70f
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.Got_error__lu._n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [esi + 0x34], 0x102
sete al
mov dword [esp], eax
call fcn.00401af0
lea edx, [ebp - 0x120c]
lea eax, [ebp - 0x1010]
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], edx
mov dword [esp + 0x14], 0x800
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x1234]
mov dword [esp], eax
call dword [sym.imp.httpapi.dll_HttpReceiveHttpRequest]
sub esp, 0x20
mov edi, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x712
xor eax, eax
cmp edi, 0x3e5
sete al
mov dword [esp + 8], edi
lea edi, [ebp - 0x1238]
mov dword [esp], eax
mov dword [esp + 4], str.Got_error__u._n
call fcn.00401af0
mov edx, dword [ebp - 0x121c]
mov eax, dword [ebp - 0x1220]
call fcn.004065f0
movzx edx, ax
mov eax, edx
mov dword [ebp - 0x1244], edx
call fcn.00401b10
mov dword [ebp - 0x1240], eax
mov dword [esp + 0xc], edi
lea edi, [ebp - 0x122c]
mov dword [esp + 8], edi
lea edi, [ebp - 0x1230]
mov dword [esp + 4], edi
mov dword [esp], ebx
mov dword [esp + 0x10], 0
mov ecx, dword [ebp - 0x123c]
call ecx
sub esp, 0x14
mov edi, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x718
xor eax, eax
test edi, edi
lea edi, [ebp - 0x1194]
sete al
mov dword [esp + 4], str.Expected_failure._n
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x719
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.Got_error__lu._n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [esi + 0x34], 0x102
sete al
mov dword [esp], eax
call fcn.00401af0
mov edx, dword [ebp - 0x1244]
mov dword [esp], edi
mov dword [esp + 4], str.GET__foobar_HTTP_1.1_r_nHost:_localhost:_u_r_nConnection:_keep_alive_r_nUser_Agent:_WINE_r_n_r_n
mov dword [esp + 8], edx
call fcn.00401040
mov ecx, dword [sym.imp.msvcrt.dll_strlen]
mov dword [esp], edi
mov dword [ebp - 0x124c], ecx
call ecx
mov dword [esp + 4], edi
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x1240]
mov dword [esp], eax
call dword [sym.imp.ws2_32.dll_send]
sub esp, 0x10
mov dword [ebp - 0x1248], eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x71d
mov dword [esp], edi
mov ecx, dword [ebp - 0x124c]
lea edi, [ebp - 0x1238]
call ecx
mov edx, dword [ebp - 0x1248]
mov dword [esp + 4], str.send___returned__d._n
cmp edx, eax
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov dword [ebp - 0x122c], 0xdeadbeef
mov dword [ebp - 0x1230], 0xdeadbeef
mov dword [esp + 0xc], edi
lea edi, [ebp - 0x122c]
mov dword [esp + 8], edi
lea edi, [ebp - 0x1230]
mov dword [esp + 4], edi
mov dword [esp], ebx
mov dword [esp + 0x10], 0x3e8
mov ecx, dword [ebp - 0x123c]
call ecx
sub esp, 0x14
mov edi, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x721
mov eax, dword [esi + 0x34]
mov dword [esp], edi
lea edi, [ebp - 0x120c]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Got_error__lu._n
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x722
xor eax, eax
mov dword [esp + 4], str.OVERLAPPED_pointers_didnt_match._n
cmp dword [ebp - 0x1238], edi
lea edi, [ebp - 0x1238]
sete al
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x723
mov eax, dword [ebp - 0x122c]
mov dword [esp + 4], str.Got_unexpected_key__Iu._n
cmp eax, 0x7b
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x724
mov eax, dword [ebp - 0x1230]
mov dword [esp + 4], str.Got_size__lu._n
cmp eax, 0x1d8
mov dword [esp + 8], eax
seta al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov dword [esp + 0xc], edi
lea edi, [ebp - 0x122c]
mov dword [esp + 8], edi
lea edi, [ebp - 0x1230]
mov dword [esp + 4], edi
mov dword [esp], ebx
mov dword [esp + 0x10], 0
mov ecx, dword [ebp - 0x123c]
call ecx
sub esp, 0x14
mov edi, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x727
xor eax, eax
test edi, edi
lea edi, [ebp - 0x120c]
sete al
mov dword [esp + 4], str.Expected_failure._n
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x728
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.Got_error__lu._n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [esi + 0x34], 0x102
sete al
mov dword [esp], eax
call fcn.00401af0
lea eax, [ebp - 0x1130]
mov dword [ebp - 0x1124], str.Im_a_teapot
mov dword [ebp - 0x1128], 0xc01a2
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov edx, dword [ebp - 0xffc]
mov eax, dword [ebp - 0x1000]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1234]
mov dword [esp], eax
call dword [sym.imp.httpapi.dll_HttpSendHttpResponse]
sub esp, 0x2c
mov edi, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x72e
xor eax, eax
test edi, edi
sete al
mov dword [esp + 8], edi
lea edi, [ebp - 0x1238]
mov dword [esp + 4], str.Got_error__u._n
mov dword [esp], eax
call fcn.00401af0
mov dword [ebp - 0x122c], 0xdeadbeef
mov dword [ebp - 0x1230], 0xdeadbeef
mov dword [esp + 0xc], edi
lea edi, [ebp - 0x122c]
mov dword [esp + 8], edi
lea edi, [ebp - 0x1230]
mov dword [esp + 4], edi
mov dword [esp], ebx
mov dword [esp + 0x10], 0x3e8
mov ecx, dword [ebp - 0x123c]
call ecx
sub esp, 0x14
mov edi, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x732
mov eax, dword [esi + 0x34]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str.Got_error__lu._n
call fcn.00401af0
call fcn.0040ded0
lea ecx, [ebp - 0x120c]
mov dword [eax], 0x412056
mov dword [eax + 4], 0x733
xor eax, eax
mov dword [esp + 4], str.OVERLAPPED_pointers_didnt_match._n
cmp dword [ebp - 0x1238], ecx
sete al
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x734
mov eax, dword [ebp - 0x122c]
mov dword [esp + 4], str.Got_unexpected_key__Iu._n
cmp eax, 0x7b
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
lea eax, [ebp - 0x810]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x800
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1240]
mov dword [esp], eax
call dword [sym.imp.ws2_32.dll_recv]
sub esp, 0x10
mov esi, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x737
mov eax, dword [ebp - 0x1230]
mov dword [esp + 0xc], esi
cmp eax, esi
mov dword [esp + 8], eax
sete al
mov dword [esp + 4], str.Expected_size__lu__got__u._n
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov edx, dword [ebp - 0x1244]
mov esi, dword [ebp - 0x1220]
mov edi, dword [ebp - 0x121c]
mov dword [esp + 8], 0x4121d4
mov dword [esp + 0xc], edx
lea edx, [ebp - 0x11f8]
mov dword [esp], edx
mov dword [esp + 4], 0x32
call fcn.00401400
lea edx, [ebp - 0x11f8]
mov dword [esp], esi
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov dword [esp + 0xc], 0
call dword [0x425004]
sub esp, 0x10
mov esi, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x73a
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.Got_error__u._n
call fcn.00401af0
mov eax, dword [ebp - 0x1240]
mov dword [esp], eax
call dword [sym.imp.ws2_32.dll_closesocket]
sub esp, 4
mov dword [esp], ebx
mov ebx, dword [sym.imp.kernel32.dll_CloseHandle]
call ebx
mov eax, dword [ebp - 0x11fc]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x1234]
sub esp, 4
mov dword [esp], eax
call dword [0x425010]
sub esp, 4
mov ebx, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x73f
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.Failed_to_close_queue_handle__error__u._n
call fcn.00401af0
mov edx, dword [ebp - 0x121c]
mov eax, dword [ebp - 0x1220]
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [0x425008]
sub esp, 8
mov ebx, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x741
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.Failed_to_close_group__error__u._n
call fcn.00401af0
mov edx, dword [ebp - 0x1224]
mov eax, dword [ebp - 0x1228]
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [0x42500c]
sub esp, 8
mov ebx, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x743
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp + 4], str.Failed_to_close_group__error__u._n
mov dword [esp], eax
call fcn.00401af0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret