Function at 0x401ea0
Capabilities:
Get local ipv4 addresses
Get socket information
Receive data
Receive data on socket
Receive http request
Register http server url
Send data
Send data on socket
Send http request
Send http request with host header
Send http response

Disassembly:
push edi
mov eax, 0x1338
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, 0x46
sub esp, eax
lea edi, [ebp - 0x1128]
lea ebx, [ebp - 0x1010]
xor eax, eax
rep stosd dword es:[edi], eax
mov dword [esp + 0xc], 0
mov edi, ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateEventA]
mov ecx, 0x200
mov dword [ebp - 0x12bc], eax
mov eax, 0xcccccccc
sub esp, 0x10
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.httpapi.dll_HttpCreateHttpHandle]
mov dword [esp], 0
mov dword [esp + 4], 0
call edi
sub esp, 8
mov esi, eax
mov eax, 0xa8
call fcn.00401190
xor eax, eax
cmp esi, 0x57
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Unexpected_error__u._n
mov dword [esp], eax
call fcn.00401af0
lea eax, [ebp - 0x12ec]
mov dword [ebp - 0x12ec], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call edi
sub esp, 8
mov esi, eax
mov eax, 0xad
call fcn.00401190
xor eax, eax
test esi, esi
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Unexpected_ret_value__u._n
mov dword [esp], eax
call fcn.00401af0
mov eax, 0xae
call fcn.00401190
mov eax, dword [ebp - 0x12ec]
mov dword [esp + 4], str.Unexpected_handle_value__p._n
test eax, eax
mov dword [esp + 8], eax
setne al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
lea eax, [ebp - 0x12e8]
mov dword [ebp - 0x12e8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call edi
sub esp, 8
mov esi, eax
mov eax, 0xb2
call fcn.00401190
xor eax, eax
test esi, esi
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Unexpected_ret_value__u._n
mov dword [esp], eax
call fcn.00401af0
mov eax, 0xb3
call fcn.00401190
mov eax, dword [ebp - 0x12e8]
xor edx, edx
test eax, eax
je 0x40202b
xor edx, edx
cmp dword [ebp - 0x12ec], eax
setne dl
mov dword [esp], edx
mov dword [esp + 8], eax
mov dword [esp + 4], str.Unexpected_handle__p._n
mov edi, dword fs:[0x18]
call fcn.00401af0
mov eax, dword [ebp - 0x12e8]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [ebp - 0x1314], eax
call eax
sub esp, 4
mov esi, eax
mov eax, 0xb5
call fcn.00401190
mov eax, dword [edi + 0x34]
mov dword [esp], esi
mov dword [esp + 4], str.Failed_to_close_queue_handle__error__lu._n
mov dword [esp + 8], eax
call fcn.00401af0
lea eax, [ebp - 0x12e4]
mov dword [ebp - 0x12e4], 0xdeadbeef
mov dword [esp + 0x18], eax
mov eax, dword [sym.imp.httpapi.dll_HttpReceiveHttpRequest]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], 0x800
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [ebp - 0x1304], eax
call eax
sub esp, 0x20
mov esi, eax
mov eax, 0xb9
call fcn.00401190
xor eax, eax
cmp esi, 6
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Got_error__u._n
mov dword [esp], eax
call fcn.00401af0
lea ecx, [ebp - 0x12cc]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x800
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], 0
mov eax, dword [ebp - 0x1304]
call eax
sub esp, 0x20
mov esi, eax
mov eax, 0xbb
call fcn.00401190
xor eax, eax
cmp esi, 6
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Got_error__u._n
mov dword [esp], eax
call fcn.00401af0
lea ecx, [ebp - 0x12cc]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x800
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0xdeadbeef
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x12ec]
mov dword [esp], eax
mov eax, dword [ebp - 0x1304]
call eax
sub esp, 0x20
mov esi, eax
mov eax, 0xbd
call fcn.00401190
xor eax, eax
cmp esi, 0x4cd
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Got_error__u._n
mov dword [esp], eax
call fcn.00401af0
lea ecx, [ebp - 0x12cc]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], 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 - 0x12ec]
mov dword [esp], eax
mov eax, dword [ebp - 0x1304]
call eax
sub esp, 0x20
mov esi, eax
mov eax, 0xbf
call fcn.00401190
xor eax, eax
cmp esi, 0x3e5
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Got_error__u._n
mov dword [esp], eax
call fcn.00401af0
lea eax, [ebp - 0x12e4]
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 8], eax
lea eax, [ebp - 0x12cc]
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x12ec]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_GetOverlappedResult]
mov dword [ebp - 0x1308], eax
call eax
sub esp, 0x10
mov esi, eax
mov eax, 0xc3
call fcn.00401190
xor eax, eax
test esi, esi
mov dword [esp + 4], str.Expected_failure._n
sete al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0xc4
call fcn.00401190
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.Got_error__lu._n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edi + 0x34], 0x3e4
sete al
mov dword [esp], eax
call fcn.00401af0
mov eax, dword [sym.imp.httpapi.dll_HttpAddUrl]
mov dword [esp + 8], 0
mov dword [esp + 4], str.http:__localhost:50000_
mov dword [esp], 0
mov dword [ebp - 0x12fc], eax
call eax
sub esp, 0xc
mov esi, eax
mov eax, 0xc7
call fcn.00401190
cmp esi, 6
mov dword [esp + 8], esi
sete al
cmp esi, 0x57
mov dword [esp + 4], str.Got_error__u._n
sete cl
or eax, ecx
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov dword [esp + 8], 0
mov dword [esp + 4], str.http:__localhost:50000
mov eax, dword [ebp - 0x12ec]
mov dword [esp], eax
mov eax, dword [ebp - 0x12fc]
call eax
sub esp, 0xc
mov esi, eax
mov eax, 0xc9
call fcn.00401190
xor eax, eax
cmp esi, 0x57
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Got_error__u._n
mov dword [esp], eax
call fcn.00401af0
mov dword [esp + 8], 0
mov dword [esp + 4], str.localhost:50000
mov eax, dword [ebp - 0x12ec]
mov dword [esp], eax
mov eax, dword [ebp - 0x12fc]
call eax
sub esp, 0xc
mov esi, eax
mov eax, 0xcb
call fcn.00401190
xor eax, eax
cmp esi, 0x57
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Got_error__u._n
mov dword [esp], eax
call fcn.00401af0
mov dword [esp + 8], 0
mov dword [esp + 4], str.localhost:50000_
mov eax, dword [ebp - 0x12ec]
mov dword [esp], eax
mov eax, dword [ebp - 0x12fc]
call eax
sub esp, 0xc
mov esi, eax
mov eax, 0xcd
call fcn.00401190
xor eax, eax
cmp esi, 0x57
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Got_error__u._n
mov dword [esp], eax
call fcn.00401af0
mov dword [esp + 8], 0
mov dword [esp + 4], str.http:__localhost_
mov eax, dword [ebp - 0x12ec]
mov dword [esp], eax
mov eax, dword [ebp - 0x12fc]
call eax
sub esp, 0xc
mov esi, eax
mov eax, 0xcf
call fcn.00401190
xor eax, eax
cmp esi, 0x57
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Got_error__u._n
mov dword [esp], eax
call fcn.00401af0
mov dword [esp + 8], 0
mov dword [esp + 4], str.http:__localhost:_
mov eax, dword [ebp - 0x12ec]
mov dword [esp], eax
mov eax, dword [ebp - 0x12fc]
call eax
sub esp, 0xc
mov esi, eax
mov eax, 0xd1
call fcn.00401190
xor eax, eax
cmp esi, 0x57
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Got_error__u._n
mov dword [esp], eax
call fcn.00401af0
mov dword [esp + 8], 0
mov dword [esp + 4], str.http:__localhost:0_
mov eax, dword [ebp - 0x12ec]
mov dword [esp], eax
mov eax, dword [ebp - 0x12fc]
call eax
sub esp, 0xc
mov esi, eax
mov eax, 0xd3
call fcn.00401190
xor eax, eax
cmp esi, 0x57
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Got_error__u._n
mov dword [esp], eax
call fcn.00401af0
mov eax, dword [ebp - 0x12ec]
call fcn.00401d20
movzx esi, ax
mov word [ebp - 0x130e], si
mov dword [ebp - 0x12f4], esi
mov dword [esp + 0xc], esi
lea esi, [ebp - 0x12b8]
mov dword [esp + 8], 0x4121d4
mov dword [esp + 4], 0x32
mov dword [esp], esi
call fcn.00401400
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov eax, dword [ebp - 0x12ec]
mov dword [esp], eax
mov eax, dword [ebp - 0x12fc]
call eax
sub esp, 0xc
mov dword [ebp - 0x12f0], eax
mov eax, 0xd7
call fcn.00401190
mov edx, dword [ebp - 0x12f0]
xor eax, eax
mov dword [esp + 4], str.Got_error__u._n
cmp edx, 0xb7
mov dword [esp + 8], edx
sete al
mov dword [esp], eax
call fcn.00401af0
mov eax, dword [ebp - 0x12f4]
call fcn.00401b10
lea edx, [ebp - 0x12dc]
mov dword [ebp - 0x12e0], 0x10
mov ecx, eax
lea eax, [ebp - 0x12e0]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [ebp - 0x130c], ecx
mov dword [esp], ecx
call dword [sym.imp.ws2_32.dll_getsockname]
sub esp, 0xc
mov dword [ebp - 0x12f0], eax
mov eax, 0xdc
call fcn.00401190
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
mov dword [esp + 4], str.getsockname___failed__error__u._n
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x12f0]
xor eax, eax
test ecx, ecx
sete al
mov dword [esp], eax
call fcn.00401af0
lea edx, [ebp - 0x12e4]
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 8], edx
lea edx, [ebp - 0x12cc]
mov dword [esp + 4], edx
mov dword [esp + 0xc], 0
mov eax, dword [ebp - 0x12ec]
mov dword [esp], eax
mov ecx, dword [ebp - 0x1308]
call ecx
sub esp, 0x10
mov dword [ebp - 0x12f0], eax
mov eax, 0xe0
call fcn.00401190
mov dword [esp + 4], str.Expected_failure._n
xor eax, eax
mov ecx, dword [ebp - 0x12f0]
test ecx, ecx
sete al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0xe1
call fcn.00401190
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.Got_error__lu._n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edi + 0x34], 0x3e4
sete al
mov dword [esp], eax
call fcn.00401af0
mov edx, dword [ebp - 0x12f4]
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
lea edx, [ebp - 0x11f0]
mov dword [esp], edx
call fcn.00401040
lea edx, [ebp - 0x11f0]
mov dword [esp], edx
mov edx, dword [sym.imp.msvcrt.dll_strlen]
mov dword [ebp - 0x1300], edx
call edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x11f0]
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x130c]
mov dword [esp], edx
call dword [sym.imp.ws2_32.dll_send]
sub esp, 0x10
mov dword [ebp - 0x12f0], eax
mov eax, 0xe5
call fcn.00401190
lea eax, [ebp - 0x11f0]
mov dword [esp], eax
mov edx, dword [ebp - 0x1300]
call edx
mov ecx, dword [ebp - 0x12f0]
mov dword [esp + 4], str.send___returned__d._n
cmp ecx, eax
mov dword [esp + 8], ecx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov dword [esp], 0x64
call dword [sym.imp.kernel32.dll_Sleep]
lea edx, [ebp - 0x12e4]
sub esp, 4
mov dword [esp + 8], edx
lea edx, [ebp - 0x12cc]
mov dword [esp + 4], edx
mov dword [esp + 0xc], 1
mov eax, dword [ebp - 0x12ec]
mov dword [esp], eax
mov ecx, dword [ebp - 0x1308]
call ecx
sub esp, 0x10
mov dword [ebp - 0x12f0], eax
mov eax, 0xef
call fcn.00401190
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.Got_error__lu._n
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x12f0]
mov dword [esp], ecx
call fcn.00401af0
mov eax, 0xf0
call fcn.00401190
mov eax, dword [ebp - 0x12e4]
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
mov eax, 0xf2
call fcn.00401190
mov eax, dword [ebp - 0x1010]
mov dword [esp + 4], str.Got_flags__lx._n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0xf3
call fcn.00401190
mov dword [esp + 4], str.Expected_nonzero_connection_ID._n
mov eax, dword [ebp - 0x1008]
mov dword [esp], eax
call fcn.00401af0
mov eax, 0xf4
call fcn.00401190
mov dword [esp + 4], str.Expected_nonzero_connection_ID._n
mov eax, dword [ebp - 0x1000]
mov dword [esp], eax
call fcn.00401af0
mov eax, 0xf5
call fcn.00401190
mov eax, dword [ebp - 0xff4]
mov edx, dword [ebp - 0xff8]
test eax, eax
je 0x403740
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_URL_context__s._n
mov eax, dword [ebp - 0xff8]
or eax, dword [ebp - 0xff4]
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0xf6
call fcn.00401190
movzx edx, word [ebp - 0xff0]
mov dword [esp + 4], str.Got_major_version__u._n
cmp dx, 1
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0xf7
call fcn.00401190
movzx edx, word [ebp - 0xfee]
mov dword [esp + 4], str.Got_major_version__u._n
cmp dx, 1
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0xf8
call fcn.00401190
mov eax, dword [ebp - 0xfec]
mov dword [esp + 4], str.Got_verb__u._n
cmp eax, 4
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0xf9
call fcn.00401190
movzx edx, word [ebp - 0xfe8]
mov dword [esp + 4], str.Got_unknown_verb_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, 0xfa
call fcn.00401190
movzx edx, word [ebp - 0xfe6]
mov dword [esp + 4], str.Got_raw_URL_length__u._n
cmp dx, 7
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0xfb
call fcn.00401190
mov eax, dword [ebp - 0xfe4]
mov dword [esp + 4], str.Got_unknown_verb__s._n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0xfc
call fcn.00401190
mov edx, dword [ebp - 0xfe0]
mov eax, dword [sym.imp.msvcrt.dll_strcmp]
mov dword [esp + 4], str._foobar
mov dword [esp], edx
mov dword [ebp - 0x12f8], edx
mov dword [ebp - 0x12f0], eax
call eax
mov edx, dword [ebp - 0x12f8]
mov dword [esp + 4], str.Got_raw_URL__s._n
test eax, eax
sete al
mov dword [esp + 8], edx
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0xfd
call fcn.00401190
movzx edx, word [ebp - 0xfdc]
mov dword [esp + 4], str.Got_full_URL_length__u._n
cmp dx, 0x3a
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0xfe
call fcn.00401190
movzx edx, word [ebp - 0xfda]
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, 0xff
call fcn.00401190
movzx edx, word [ebp - 0xfd8]
mov dword [esp + 4], str.Got_absolute_path_length__u._n
cmp dx, 0xe
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x100
call fcn.00401190
movzx edx, word [ebp - 0xfd6]
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 - 0x12f4]
mov dword [esp], esi
mov dword [esp + 8], str.http:__localhost:_u_foobar
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x32
call fcn.00401400
mov eax, 0x102
call fcn.00401190
mov eax, dword [ebp - 0xfd4]
call fcn.00401390
mov dword [ebp - 0x12f8], eax
mov dword [esp + 4], esi
mov eax, dword [ebp - 0xfd4]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_wcscmp]
mov edx, dword [ebp - 0x12f8]
mov dword [esp + 4], str.Got_full_URL__s._n
test eax, eax
sete al
mov dword [esp + 8], edx
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x103
call fcn.00401190
mov eax, dword [ebp - 0xfd0]
call fcn.00401390
mov dword [esp + 4], str.Got_host__s._n
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xfd4]
add eax, 0xe
cmp dword [ebp - 0xfd0], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x104
call fcn.00401190
mov eax, dword [ebp - 0xfcc]
call fcn.00401390
mov dword [esp + 4], str.Got_absolute_path__s._n
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xfd4]
add eax, 0x2c
cmp dword [ebp - 0xfcc], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x106
call fcn.00401190
mov eax, dword [ebp - 0xfc8]
call fcn.00401390
mov dword [esp + 4], str.Got_query_string__s._n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0xfc8]
xor eax, eax
test edx, edx
sete al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x107
call fcn.00401190
mov eax, dword [ebp - 0x12e0]
mov dword [esp + 8], eax
lea eax, [ebp - 0x12dc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xfc4]
mov dword [esp], eax
call sub.msvcrt.dll_memcmp
mov dword [esp + 4], str.Client_addresses_didnt_match._n
test eax, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov edi, dword [ebp - 0xfc0]
mov eax, 0x109
call fcn.00401190
movsx edx, word [edi]
mov dword [esp + 4], str.Got_family__u._n
cmp dx, 2
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x10a
call fcn.00401190
movzx eax, word [edi + 2]
mov esi, dword [sym.imp.ws2_32.dll_ntohs]
mov dword [esp], eax
call esi
mov word [ebp - 0x12f8], ax
movzx eax, word [edi + 2]
sub esp, 4
mov dword [esp], eax
call esi
movzx esi, word [ebp - 0x12f8]
sub esp, 4
mov dword [esp + 8], esi
mov dword [esp + 4], str.Got_wrong_port__u._n
cmp ax, word [ebp - 0x130e]
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x10b
call fcn.00401190
mov esi, dword [edi + 4]
mov dword [esp], str.127.0.0.1
call dword [sym.imp.ws2_32.dll_inet_addr]
sub esp, 4
cmp esi, eax
sete al
mov dword [esp + 8], esi
lea esi, [ebp - 0x810]
movzx eax, al
mov dword [esp + 4], str.Got_address__08lx._n
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x10c
call fcn.00401190
movzx edx, word [ebp - 0xfbc]
mov dword [esp + 4], str.Got__u_unknown_headers._n
test dx, dx
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x10d
call fcn.00401190
mov eax, dword [ebp - 0xfb8]
mov dword [esp + 4], str.Got_unknown_headers__p._n
test eax, eax
mov dword [esp + 8], eax
sete al
xor edi, edi
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
lea esi, [esi]
cmp edi, 1
je 0x402de5
cmp edi, 0x1c
je 0x4036c0
cmp edi, 0x28
je 0x402e80
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x129
movzx edx, word [ebx + edi*8 + 0x64]
mov dword [esp + 8], edi
test dx, dx
mov dword [esp + 0xc], edx
sete al
mov dword [esp + 4], str.Header__x:_got_length__u._n
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x12b
mov eax, dword [ebx + edi*8 + 0x68]
mov dword [esp + 8], edi
test eax, eax
mov dword [esp + 0xc], eax
sete al
mov dword [esp + 4], str.Header__x:_got_value__s._n
add edi, 1
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
cmp edi, 1
jne 0x402d59
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x112
movzx edx, word [ebp - 0xfa4]
mov dword [esp + 4], str.Got_length__u._n
cmp dx, 0xa
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], 0x114
mov edx, dword [ebp - 0xfa0]
mov dword [esp + 4], str.keep_alive
mov dword [esp], edx
mov eax, dword [ebp - 0x12f0]
mov dword [ebp - 0x12f8], edx
call eax
mov edx, dword [ebp - 0x12f8]
mov dword [esp + 4], str.Got_connection__s._n
test eax, eax
sete al
mov dword [esp + 8], edx
add edi, 1
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
jmp 0x402d50
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x122
movzx edx, word [ebp - 0xe6c]
mov dword [esp + 4], str.Got_length__u._n
cmp dx, 4
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], 0x124
mov edi, dword [ebp - 0xe68]
mov dword [esp + 4], str.WINE
mov dword [esp], edi
mov eax, dword [ebp - 0x12f0]
call eax
mov dword [esp + 8], edi
test eax, eax
mov dword [esp + 4], str.Got_connection__s._n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x12f
call fcn.00401190
mov eax, dword [ebp - 0xe5c]
mov edx, dword [ebp - 0xe60]
test eax, eax
je 0x403758
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str._lx_08lx
call fcn.00401000
mov edi, eax
lea eax, [ebp - 0x11f0]
mov dword [esp], eax
mov eax, dword [ebp - 0x1300]
call eax
mov dword [esp + 8], edi
xor edx, edx
mov dword [esp + 4], str.Got__s_bytes._n
xor edx, dword [ebp - 0xe5c]
xor eax, dword [ebp - 0xe60]
or eax, edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x130
call fcn.00401190
movzx edx, word [ebp - 0xe58]
mov dword [esp + 4], str.Got__u_entity_chunks._n
test dx, dx
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x131
call fcn.00401190
mov eax, dword [ebp - 0xe54]
mov dword [esp + 4], str.Got_entity_chunks__p._n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x133
call fcn.00401190
mov eax, dword [ebp - 0xe48]
mov dword [esp + 4], str.Got_SSL_info__p._n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 3
mov dword [ebp - 0x111c], str.Im_a_teapot
mov edi, dword [sym.imp.httpapi.dll_HttpSendHttpResponse]
mov word [ebp - 0x1040], ax
lea eax, [ebp - 0x12cc]
mov dword [ebp - 0x1120], 0xc01a2
mov dword [ebp - 0x103c], 0x412775
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x1128]
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 dword [esp + 4], 0xdeadbeef
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x12ec]
mov dword [esp], eax
call edi
sub esp, 0x2c
mov dword [ebp - 0x12f0], eax
mov eax, 0x13b
call fcn.00401190
mov edx, dword [ebp - 0x12f0]
xor eax, eax
mov dword [esp + 4], str.Got_error__u._n
cmp edx, 0x4cd
mov dword [esp + 8], edx
sete al
mov dword [esp], eax
call fcn.00401af0
lea eax, [ebp - 0x12cc]
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x1128]
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 - 0x12ec]
mov dword [esp], eax
call edi
sub esp, 0x2c
mov edi, eax
mov eax, 0x13d
call fcn.00401190
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.Got_error__u._n
mov dword [esp], eax
call fcn.00401af0
lea eax, [ebp - 0x12e4]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x12cc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x12ec]
mov dword [esp], eax
mov eax, dword [ebp - 0x1308]
call eax
sub esp, 0x10
mov edi, eax
mov eax, 0x13f
call fcn.00401190
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp], edi
mov dword [esp + 4], str.Got_error__lu._n
mov dword [esp + 8], eax
call fcn.00401af0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x800
mov dword [esp + 4], esi
mov eax, dword [ebp - 0x130c]
mov dword [esp], eax
call dword [sym.imp.ws2_32.dll_recv]
sub esp, 0x10
mov edi, eax
mov eax, 0x142
call fcn.00401190
mov eax, dword [ebp - 0x12e4]
mov dword [esp + 0xc], edi
mov dword [esp + 4], str.Expected_size__lu__got__u._n
cmp eax, edi
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
cmp dword [0x410008], 1
jle 0x40321f
mov eax, 0x145
call fcn.00401190
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], str._.s_n
call fcn.00401550
mov eax, 0x147
call fcn.00401190
mov dword [esp], esi
mov dword [esp + 8], 0x1b
mov dword [esp + 4], str.HTTP_1.1_418_Im_a_teapot_r_n
call sub.msvcrt.dll_strncmp
mov dword [esp + 4], str.Got_incorrect_status_line._n
test eax, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x148
call fcn.00401190
mov edi, dword [sym.imp.msvcrt.dll_strstr]
mov dword [esp], esi
mov dword [esp + 4], str._r_nRetry_After:_120_r_n
call edi
mov dword [esp + 4], str.Missing_or_malformed_Retry_After_header._n
test eax, eax
setne al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x149
call fcn.00401190
mov dword [esp], esi
mov dword [esp + 4], str._r_nDate:
call edi
mov dword [esp + 4], str.Missing_Date_header._n
test eax, eax
setne al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
lea eax, [ebp - 0x12cc]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x800
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 - 0x12ec]
mov dword [esp], eax
mov eax, dword [ebp - 0x1304]
call eax
sub esp, 0x20
mov esi, eax
mov eax, 0x14c
call fcn.00401190
xor eax, eax
cmp esi, 0x4cd
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Got_error__u._n
lea esi, [ebp - 0x1254]
mov dword [esp], eax
call fcn.00401af0
mov eax, dword [ebp - 0x12f4]
mov dword [esp], esi
mov dword [esp + 8], 0x4121d4
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x32
call fcn.00401400
mov edx, dword [sym.imp.httpapi.dll_HttpRemoveUrl]
mov dword [esp + 4], esi
mov dword [esp], 0
mov dword [ebp - 0x12f0], edx
call edx
sub esp, 8
mov edi, eax
mov eax, 0x153
call fcn.00401190
xor eax, eax
cmp edi, 0x57
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.Got_error__u._n
mov dword [esp], eax
call fcn.00401af0
mov eax, dword [ebp - 0x12f4]
mov edi, dword [ebp - 0x12ec]
mov dword [esp], esi
mov dword [esp + 8], 0x4121d4
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x32
call fcn.00401400
mov dword [esp + 4], esi
mov dword [esp], edi
mov edx, dword [ebp - 0x12f0]
call edx
sub esp, 8
mov edi, eax
mov eax, 0x155
call fcn.00401190
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.Got_error__u._n
mov dword [esp], eax
call fcn.00401af0
mov eax, dword [ebp - 0x12f4]
mov edi, dword [ebp - 0x12ec]
mov dword [esp], esi
mov dword [esp + 8], 0x4121d4
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x32
call fcn.00401400
mov dword [esp + 4], esi
mov dword [esp], edi
mov edx, dword [ebp - 0x12f0]
call edx
sub esp, 8
mov esi, eax
mov eax, 0x157
call fcn.00401190
xor eax, eax
cmp esi, 2
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Got_error__u._n
mov dword [esp], eax
call fcn.00401af0
lea ecx, [ebp - 0x12cc]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], 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 - 0x12ec]
mov dword [esp], eax
mov eax, dword [ebp - 0x1304]
call eax
sub esp, 0x20
mov ebx, eax
mov eax, 0x15a
call fcn.00401190
xor eax, eax
cmp ebx, 0x3e5
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.Got_error__u._n
mov dword [esp], eax
mov ebx, dword fs:[0x18]
call fcn.00401af0
mov eax, dword [ebp - 0x12ec]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CancelIo]
sub esp, 4
mov esi, eax
mov eax, 0x15d
call fcn.00401190
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
mov dword [esp + 4], str.Failed_to_close_queue_handle__error__lu._n
mov dword [esp + 8], eax
call fcn.00401af0
mov dword [esp + 4], 0x64
mov eax, dword [ebp - 0x12bc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
sub esp, 8
mov esi, eax
mov eax, 0x160
call fcn.00401190
xor eax, eax
test esi, esi
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.Got__u._n
mov dword [esp], eax
call fcn.00401af0
lea eax, [ebp - 0x12e4]
mov dword [ebp - 0x12e4], 0xdeadbeef
mov dword [esp + 8], eax
lea eax, [ebp - 0x12cc]
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x12ec]
mov dword [esp], eax
mov eax, dword [ebp - 0x1308]
call eax
sub esp, 0x10
mov esi, eax
mov eax, 0x163
call fcn.00401190
xor eax, eax
test esi, esi
mov dword [esp + 4], str.Expected_failure._n
sete al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x164
call fcn.00401190
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.Got_error__lu._n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebx + 0x34], 0x3e3
sete al
mov dword [esp], eax
call fcn.00401af0
mov eax, 0x165
call fcn.00401190
mov eax, dword [ebp - 0x12e4]
mov dword [esp + 4], str.Got_size__lu._n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401af0
mov eax, dword [ebp - 0x130c]
mov dword [esp], eax
call dword [sym.imp.ws2_32.dll_closesocket]
mov eax, dword [ebp - 0x12bc]
sub esp, 4
mov dword [esp], eax
mov esi, dword [ebp - 0x1314]
call esi
mov eax, dword [ebp - 0x12ec]
sub esp, 4
mov dword [esp], eax
call esi
sub esp, 4
mov esi, eax
mov eax, 0x16a
call fcn.00401190
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
mov dword [esp + 4], str.Failed_to_close_queue_handle__error__lu._n
mov dword [esp + 8], eax
call fcn.00401af0
mov dword [esp + 8], 0
mov dword [esp + 4], str.http:__localhost:50000_
mov eax, dword [ebp - 0x12ec]
mov dword [esp], eax
mov eax, dword [ebp - 0x12fc]
call eax
sub esp, 0xc
mov ebx, eax
mov eax, 0x16d
call fcn.00401190
xor eax, eax
cmp ebx, 6
mov dword [esp + 8], ebx
sete al
mov dword [esp + 4], str.Got_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
mov eax, dword [ebp - 0x12f4]
mov dword [esp + 4], str.localhost:_u
mov dword [esp], esi
mov dword [esp + 8], eax
call fcn.00401040
call fcn.0040ded0
mov dword [eax], 0x412056
mov dword [eax + 4], 0x11b
mov dword [esp], esi
mov eax, dword [ebp - 0x1300]
call eax
mov edx, eax
movzx eax, word [ebp - 0xecc]
mov dword [esp + 4], str.Got_length__u._n
cmp eax, edx
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], 0x11d
mov edx, dword [ebp - 0xec8]
mov dword [esp + 4], esi
jmp 0x402e3c
mov dword [esp + 4], edx
mov dword [esp], 0x41248e
call fcn.00401000
jmp 0x40287a
mov dword [esp + 4], edx
mov dword [esp], 0x41248e
call fcn.00401000
mov edi, eax
jmp 0x402f32