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

Disassembly:
push edi
mov eax, 0x117c
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
sub esp, 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 dword [ebp - 0x1140], eax
sub esp, 0x10
lea eax, [ebp - 0x1154]
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], 0x236
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
lea ebx, [ebp - 0x10d8]
mov dword [esp], eax
mov dword [esp + 4], str.Got_error__u._n
call fcn.00401af0
mov eax, dword [ebp - 0x1154]
call fcn.00401d20
movzx esi, ax
mov eax, esi
mov dword [ebp - 0x1168], esi
call fcn.00401b10
mov dword [ebp - 0x1164], eax
mov dword [esp + 8], esi
mov dword [esp], ebx
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
call fcn.00401040
mov edi, dword [sym.imp.msvcrt.dll_strlen]
mov dword [esp], ebx
call edi
mov dword [esp + 4], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x1164]
mov dword [esp], eax
call dword [sym.imp.ws2_32.dll_send]
sub esp, 0x10
mov esi, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x23c
mov dword [esp], ebx
lea ebx, [ebp - 0x1010]
call edi
mov dword [esp + 8], esi
mov edi, ebx
cmp esi, 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
mov dword [ebp - 0x1158], 1
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x1158]
mov dword [esp + 0x1c], 0
mov esi, dword [sym.imp.httpapi.dll_HttpReceiveHttpRequest]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0x1cf
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x1154]
mov dword [esp], eax
call esi
sub esp, 0x20
mov edi, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x242
xor eax, eax
cmp edi, 0x7a
sete al
mov dword [esp + 8], edi
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], 0x243
mov eax, dword [ebp - 0x1158]
mov dword [esp + 4], str.Got_size__lu._n
cmp eax, 1
mov dword [esp + 8], eax
setbe al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
lea eax, [ebp - 0x1158]
mov dword [ebp - 0x1158], 1
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 0x1d0
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x1154]
mov dword [esp], eax
call esi
sub esp, 0x20
mov edi, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x247
xor eax, eax
cmp edi, 0xea
sete al
mov dword [esp + 8], edi
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], 0x248
mov eax, dword [ebp - 0x1158]
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], 0x24a
mov eax, dword [ebp - 0x1004]
mov edx, dword [ebp - 0x1008]
test eax, eax
je 0x4091c0
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str._lx_08lx
call fcn.00401000
mov dword [esp + 8], eax
mov dword [esp + 4], str.Got_connection_ID__s._n
mov eax, dword [ebp - 0x1008]
or eax, dword [ebp - 0x1004]
setne al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x24b
mov eax, dword [ebp - 0xffc]
mov edx, dword [ebp - 0x1000]
test eax, eax
je 0x409240
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str._lx_08lx
call fcn.00401000
mov dword [esp + 8], eax
mov dword [esp + 4], str.Got_request_ID__s._n
mov eax, dword [ebp - 0x1000]
or eax, dword [ebp - 0xffc]
setne al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x24c
movzx eax, word [ebp - 0xff0]
mov dword [esp + 4], str.Got_major_version__u._n
mov edx, eax
test ax, ax
mov dword [esp + 8], eax
sete al
cmp dx, 0xcccc
sete dl
or eax, edx
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x24e
mov eax, dword [ebp - 0xe5c]
mov edx, dword [ebp - 0xe60]
test eax, eax
je 0x409220
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str._lx_08lx
call fcn.00401000
mov ecx, eax
mov eax, dword [ebp - 0xe60]
mov edx, dword [ebp - 0xe5c]
mov dword [esp + 8], ecx
mov dword [esp + 4], str.Got__s_bytes._n
mov ecx, eax
or ecx, edx
sete cl
xor edx, 0xcccccccc
xor eax, 0xcccccccc
or eax, edx
sete al
or ecx, eax
movzx ecx, cl
mov dword [esp], ecx
call fcn.00401af0
mov eax, dword [ebp - 0x1000]
mov edx, dword [ebp - 0xffc]
mov dword [ebp - 0x1160], eax
lea eax, [ebp - 0x1150]
mov dword [ebp - 0x115c], edx
mov dword [esp + 0x1c], eax
lea eax, [ebp - 0x810]
mov dword [esp + 0x18], 0
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 - 0x1154]
mov dword [esp], eax
call esi
sub esp, 0x20
mov edi, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x255
xor eax, eax
cmp edi, 0x3e5
sete al
mov dword [esp + 8], edi
mov edi, ebx
mov dword [esp], eax
mov dword [esp + 4], str.Got_error__u._n
call fcn.00401af0
mov eax, 0xcccccccc
mov ecx, 0x200
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x1158]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp - 0x1158]
mov dword [esp + 0x10], ebx
lea eax, [ecx - 1]
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], eax
mov edx, dword [ebp - 0x115c]
mov eax, dword [ebp - 0x1160]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1154]
mov dword [esp], eax
call esi
sub esp, 0x20
mov edi, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x259
xor eax, eax
cmp edi, 0xea
sete al
mov dword [esp + 8], edi
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], 0x25a
mov eax, dword [ebp - 0xffc]
mov edx, dword [ebp - 0x1000]
test eax, eax
je 0x409208
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str._lx_08lx
call fcn.00401000
mov dword [esp + 8], eax
mov edi, ebx
mov dword [esp + 4], str.Got_request_ID__s._n
mov eax, dword [ebp - 0x1160]
mov edx, dword [ebp - 0x115c]
xor eax, dword [ebp - 0x1000]
xor edx, dword [ebp - 0xffc]
or eax, edx
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 + 0x1c], 0
mov dword [esp + 0x18], 0
mov ecx, dword [ebp - 0x1158]
mov dword [esp + 0x10], ebx
lea eax, [ecx - 1]
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], eax
mov edx, dword [ebp - 0x115c]
mov eax, dword [ebp - 0x1160]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1154]
mov dword [esp], eax
call esi
sub esp, 0x20
mov edi, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x25e
xor eax, eax
cmp edi, 0xea
sete al
mov dword [esp + 8], edi
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], 0x25f
mov eax, dword [ebp - 0xffc]
mov edx, dword [ebp - 0x1000]
test eax, eax
je 0x4091f0
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str._lx_08lx
call fcn.00401000
mov dword [esp + 8], eax
mov edi, ebx
mov dword [esp + 4], str.Got_request_ID__s._n
mov eax, dword [ebp - 0x1160]
mov edx, dword [ebp - 0x115c]
xor eax, dword [ebp - 0x1000]
xor edx, dword [ebp - 0xffc]
or eax, edx
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 - 0x1158]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], ecx
mov eax, dword [ebp - 0x1158]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0
mov edx, dword [ebp - 0x115c]
mov eax, dword [ebp - 0x1160]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1154]
mov dword [esp], eax
call esi
sub esp, 0x20
mov ebx, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x263
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
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x264
mov eax, dword [ebp - 0xffc]
mov edx, dword [ebp - 0x1000]
test eax, eax
je 0x4091d8
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str._lx_08lx
call fcn.00401000
mov dword [esp + 8], eax
lea ebx, [ebp - 0x113c]
mov dword [esp + 4], str.Got_request_ID__s._n
mov eax, dword [ebp - 0x1160]
mov edx, dword [ebp - 0x115c]
xor eax, dword [ebp - 0x1000]
xor edx, dword [ebp - 0xffc]
or eax, edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, dword [ebp - 0x1154]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CancelIo]
mov eax, dword [ebp - 0x1168]
mov esi, dword [ebp - 0x1154]
sub esp, 4
mov dword [esp], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4121d4
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
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x269
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 - 0x1164]
mov dword [esp], eax
call dword [sym.imp.ws2_32.dll_closesocket]
mov eax, dword [ebp - 0x1140]
mov ebx, dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x1154]
sub esp, 4
mov dword [esp], eax
call ebx
sub esp, 4
mov ebx, eax
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x26d
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
mov dword [esp + 4], edx
mov dword [esp], 0x41248e
call fcn.00401000
jmp 0x408c10
mov dword [esp + 4], edx
mov dword [esp], 0x41248e
call fcn.00401000
jmp 0x40909c
mov dword [esp + 4], edx
mov dword [esp], 0x41248e
call fcn.00401000
jmp 0x408fa7
mov dword [esp + 4], edx
mov dword [esp], 0x41248e
call fcn.00401000
jmp 0x408ead
mov dword [esp + 4], edx
mov dword [esp], 0x41248e
call fcn.00401000
mov ecx, eax
jmp 0x408d14
mov dword [esp + 4], edx
mov dword [esp], 0x41248e
call fcn.00401000
jmp 0x408c70