Function at 0x422320
Capabilities:
Check for software breakpoints
Initialize winhttp library
Prepare http request
Read http header
Receive http response

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
movzx esi, si
mov ebx, dword fs:[0x18]
sub esp, 0xb8
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], str.winetest
call dword [sym.imp.winhttp.dll_WinHttpOpen]
sub esp, 0x14
mov edi, eax
mov dword [ebp - 0xa0], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc63
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.failed_to_open_session__lu_n
mov dword [esp + 8], eax
xor eax, eax
test edi, edi
setne al
mov dword [esp], eax
call fcn.00410490
mov dword [esp + 8], esi
mov dword [esp], edi
mov dword [esp + 0xc], 0
mov dword [esp + 4], str.localhost
call dword [sym.imp.winhttp.dll_WinHttpConnect]
sub esp, 0x10
mov esi, eax
mov dword [ebp - 0xa4], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc66
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.failed_to_open_a_connection__lu_n
mov dword [esp + 8], eax
xor eax, eax
test esi, esi
setne al
mov dword [esp], eax
call fcn.00410490
mov dword [esp], esi
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], str._no_content
mov dword [esp + 4], 0
call dword [sym.imp.winhttp.dll_WinHttpOpenRequest]
sub esp, 0x1c
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc69
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.failed_to_open_a_request__lu_n
mov dword [esp + 8], eax
xor eax, eax
test esi, esi
setne al
mov dword [esp], eax
call fcn.00410490
lea eax, [ebp - 0x98]
mov dword [ebp - 0x98], 0x3039
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp + 4], eax
mov eax, dword [sym.imp.winhttp.dll_WinHttpQueryDataAvailable]
mov dword [esp], esi
mov dword [ebp - 0x9c], eax
call eax
mov ecx, dword [0x4720d0]
sub esp, 8
mov edi, eax
mov dword [ebp - 0xa8], ecx
call fcn.00431c30
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
mov ecx, dword [ebp - 0xa8]
test ecx, ecx
setne cl
movzx ecx, cl
or edx, ecx
mov dword [eax + 0x10], edx
jmp 0x42257b
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc6f
xor eax, eax
test edi, edi
sete al
mov dword [esp + 4], str.expected_error_n
mov dword [esp], eax
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc70
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.expected_ERROR_WINHTTP_INCORRECT_HANDLE_STATE__got__lu_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebx + 0x34], 0x2ef3
sete al
mov dword [esp], eax
call fcn.00410490
call fcn.00431c30
mov edx, 1
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc72
mov eax, dword [ebp - 0x98]
cmp eax, 0x3039
je 0x42255f
xor edx, edx
mov ecx, eax
or ecx, dword [0x4720d0]
sete dl
mov dword [esp + 8], eax
mov dword [esp], edx
mov dword [esp + 4], str.expected_12345__got__lu_n
call fcn.00410490
call fcn.00431c30
shr dword [eax + 0x10], 1
call fcn.00431c30
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x4224d0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
call dword [sym.imp.winhttp.dll_WinHttpSendRequest]
sub esp, 0x1c
mov ebx, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc77
mov dword [esp], ebx
mov dword [esp + 4], str.expected_success_n
call fcn.00410490
mov dword [esp + 4], 0
mov dword [esp], esi
call dword [sym.imp.winhttp.dll_WinHttpReceiveResponse]
sub esp, 8
mov ebx, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc7a
mov dword [esp], ebx
mov dword [esp + 4], str.expected_success_n
call fcn.00410490
lea edx, [ebp - 0x90]
lea eax, [ebp - 0x98]
mov dword [ebp - 0x90], 0xdeadbeef
mov dword [ebp - 0x98], 4
mov edi, dword [sym.imp.winhttp.dll_WinHttpQueryHeaders]
mov dword [esp + 0xc], edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x20000013
mov dword [esp], esi
call edi
sub esp, 0x18
mov ebx, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc80
mov dword [esp], ebx
mov dword [esp + 4], str.expected_success_n
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc81
mov eax, dword [ebp - 0x90]
mov dword [esp + 4], str.expected_status_204__got__lu_n
cmp eax, 0xcc
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
mov ebx, dword fs:[0x18]
call fcn.00410490
lea edx, [ebp - 0x90]
lea eax, [ebp - 0x98]
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [ebp - 0x98], 4
mov dword [ebp - 0x90], 0x3039
mov dword [esp + 0xc], edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x20000005
mov dword [esp], esi
call edi
sub esp, 0x18
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc88
xor eax, eax
test edi, edi
sete al
mov dword [esp + 4], str.expected_no_content_length_header_n
mov dword [esp], eax
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc89
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.wrong_error__lu_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebx + 0x34], 0x2f76
sete al
mov dword [esp], eax
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc8a
mov eax, dword [ebp - 0x90]
mov dword [esp + 4], str.expected_0__got__lu_n
cmp eax, 0x3039
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00410490
lea eax, [ebp - 0x98]
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [ebp - 0x98], 0x3039
mov dword [esp + 4], eax
mov dword [esp], esi
mov eax, dword [ebp - 0x9c]
call eax
sub esp, 8
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc8f
mov dword [esp + 4], str.expected_success_n
mov dword [esp], edi
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc90
mov edx, dword [ebx + 0x34]
mov eax, 1
test edx, edx
je 0x422843
mov edi, dword [0x4720d0]
cmp edx, 0xdeadbeef
sete cl
xor eax, eax
test edi, edi
sete al
and eax, ecx
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], str.wrong_error__lu_n
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc92
mov eax, dword [ebp - 0x98]
mov dword [esp + 4], str.expected_0__got__lu_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
mov ebx, dword fs:[0x18]
call fcn.00410490
lea eax, [ebp - 0x94]
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x8c]
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.winhttp.dll_WinHttpReadData]
sub esp, 0x10
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc96
mov dword [esp + 4], str.expected_success_n
mov dword [esp], edi
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc97
mov edx, dword [ebx + 0x34]
mov eax, 1
test edx, edx
je 0x42291b
mov ebx, dword [0x4720d0]
cmp edx, 0xdeadbeef
sete cl
xor eax, eax
test ebx, ebx
sete al
and eax, ecx
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], str.wrong_error__lu_n
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc99
mov eax, dword [ebp - 0x94]
mov dword [esp + 4], str.expected_0__got__lu_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00410490
lea eax, [ebp - 0x98]
mov dword [ebp - 0x98], 0x3039
mov dword [esp], esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x9c]
call eax
sub esp, 8
mov ebx, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc9d
mov dword [esp], ebx
mov dword [esp + 4], str.expected_success_n
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc9e
mov eax, dword [ebp - 0x98]
mov dword [esp + 4], str.expected_0__got__lu_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
mov edi, dword fs:[0x18]
call fcn.00410490
mov ebx, dword [sym.imp.winhttp.dll_WinHttpCloseHandle]
mov dword [esp], esi
call ebx
lea ecx, [ebp - 0x98]
mov dword [edi + 0x34], 0xdeadbeef
mov dword [ebp - 0x98], 0x3039
sub esp, 4
mov dword [esp + 4], ecx
mov dword [esp], esi
mov eax, dword [ebp - 0x9c]
call eax
sub esp, 8
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xca5
xor eax, eax
test esi, esi
sete al
mov dword [esp + 4], str.expected_error_n
mov dword [esp], eax
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xca6
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.expected_ERROR_INVALID_HANDLE__got__lx_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edi + 0x34], 6
sete al
mov dword [esp], eax
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xca7
mov eax, dword [ebp - 0x98]
mov dword [esp + 4], str.expected_12345__got__lu_n
cmp eax, 0x3039
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00410490
mov eax, dword [ebp - 0xa4]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0xa0]
sub esp, 4
mov dword [esp], eax
call ebx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret