Function at 0x420090
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Set http header

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
movzx esi, si
mov edi, dword fs:[0x18]
sub esp, 0x440
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 ebx, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xf5d
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.failed_to_open_session__lu_n
mov dword [esp + 8], eax
xor eax, eax
test ebx, ebx
setne al
mov dword [esp], eax
call fcn.00410490
mov dword [esp + 8], esi
mov dword [esp + 0xc], 0
mov dword [esp + 4], str.localhost
mov dword [esp], ebx
call dword [sym.imp.winhttp.dll_WinHttpConnect]
sub esp, 0x10
mov esi, eax
mov dword [ebp - 0x42c], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xf60
mov eax, dword [edi + 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._bad_headers
mov dword [esp + 4], str.POST
call dword [sym.imp.winhttp.dll_WinHttpOpenRequest]
sub esp, 0x1c
mov esi, eax
mov dword [ebp - 0x41c], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xf63
mov eax, dword [edi + 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
mov dword [esp], esi
mov dword [esp + 0xc], 0x20000000
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], str.Content_Type:_text_html_n_rTest1:_Value1_nTest2:_Value2_n_n_nTest3:_Value3_r_r_rTest4:_Value4_r_n_r_nCookie:_111
call dword [sym.imp.winhttp.dll_WinHttpAddRequestHeaders]
sub esp, 0x10
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xf66
mov eax, dword [edi + 0x34]
xor edi, edi
mov dword [esp + 4], str.failed_to_add_header__lu_n
mov dword [esp + 8], eax
mov dword [esp], esi
call fcn.00410490
lea eax, [ebp - 0x40c]
mov dword [ebp - 0x430], ebx
shr eax, 0x10
mov dword [ebp - 0x420], eax
mov eax, dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x428], eax
jmp 0x420386
lea eax, [ebp - 0x40c]
mov dword [esp + 4], 0xffffffff
mov esi, str._invalid_
mov dword [esp], eax
mov eax, dword [ebp - 0x428]
call eax
sub esp, 8
test eax, eax
jne 0x420287
mov edx, 0xffffffff
lea eax, [ebp - 0x40c]
call fcn.0040f890
mov esi, eax
test ebx, ebx
je 0x4204b2
mov eax, ebx
shr eax, 0x10
je 0x420518
mov eax, dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
mov dword [ebp - 0x418], eax
call eax
mov edx, str._invalid_
sub esp, 8
test eax, eax
jne 0x4202cc
mov edx, 0xffffffff
mov eax, ebx
call fcn.0040f890
mov edx, eax
mov eax, dword [edi*8 + 0x43d184]
mov dword [ebp - 0x424], edx
mov dword [esp + 4], eax
lea eax, [ebp - 0x40c]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_wcscmp]
mov dword [esp + 0xc], esi
mov edx, dword [ebp - 0x424]
test eax, eax
mov dword [esp + 4], str.header__s:_got__s_n
sete al
mov dword [esp + 8], edx
movzx eax, al
mov dword [esp], eax
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov esi, dword [ebp - 0x414]
mov dword [eax + 4], 0xf72
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
mov eax, dword [ebp - 0x418]
call eax
sub esp, 8
test eax, eax
jne 0x4205c0
mov edx, 0xffffffff
mov eax, ebx
call fcn.0040f890
mov edx, dword [ebp - 0x414]
mov dword [esp + 8], eax
xor eax, eax
cmp edx, 1
sete al
mov dword [esp + 0xc], esi
add edi, 1
mov dword [esp + 4], str.header__s:_index___lu_n
mov dword [esp], eax
call fcn.00410490
cmp edi, 6
je 0x4205e0
xor ebx, ebx
lea eax, [ebp - 0x414]
mov dword [ebp - 0x414], 0
mov word [ebp - 0x40c], bx
mov ebx, dword [edi*8 + 0x43d180]
mov dword [ebp - 0x410], 0x400
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x410]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x40c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x8000ffff
mov eax, dword [ebp - 0x41c]
mov dword [esp], eax
call dword [sym.imp.winhttp.dll_WinHttpQueryHeaders]
sub esp, 0x18
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xf6f
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [ebp - 0x418], eax
test ebx, ebx
je 0x4205d0
mov eax, ebx
shr eax, 0x10
je 0x4205a8
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x420447
mov edx, 0xffffffff
mov eax, ebx
call fcn.0040f890
mov ecx, dword [ebp - 0x418]
mov dword [esp + 8], eax
mov dword [esp + 4], str.header__s:_failed_to_query_headers__lu_n
mov dword [esp + 0xc], ecx
mov dword [esp], esi
call fcn.00410490
call fcn.00431c30
mov ecx, dword [ebp - 0x420]
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xf70
test ecx, ecx
jne 0x420250
lea eax, [ebp - 0x40c]
mov dword [ebp - 0x418], eax
movzx eax, word [ebp - 0x418]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.0040f510
mov esi, eax
test ebx, ebx
jne 0x42028f
mov eax, dword [edi*8 + 0x43d184]
mov dword [esp + 4], eax
lea eax, [ebp - 0x40c]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_wcscmp]
mov dword [esp + 0xc], esi
test eax, eax
mov dword [esp + 8], str._null_
sete al
mov dword [esp + 4], str.header__s:_got__s_n
movzx eax, al
mov dword [esp], eax
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov esi, dword [ebp - 0x414]
mov dword [eax + 4], 0xf72
mov eax, str._null_
mov edx, esi
jmp 0x42035a
movzx ebx, bx
mov dword [esp], str._04x
mov dword [esp + 4], ebx
call fcn.0040f510
mov dword [ebp - 0x418], eax
mov eax, dword [edi*8 + 0x43d184]
mov dword [esp + 4], eax
lea eax, [ebp - 0x40c]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_wcscmp]
mov dword [esp + 0xc], esi
mov edx, dword [ebp - 0x418]
test eax, eax
mov dword [esp + 4], str.header__s:_got__s_n
sete al
mov dword [esp + 8], edx
movzx eax, al
mov dword [esp], eax
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov esi, dword [ebp - 0x414]
mov dword [eax + 4], 0xf72
mov dword [esp + 4], ebx
mov dword [esp], str._04x
call fcn.0040f510
mov edx, dword [ebp - 0x414]
jmp 0x42035a
movzx eax, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.0040f510
jmp 0x420447
mov edx, dword [ebp - 0x414]
mov eax, str._invalid_
jmp 0x42035a
mov eax, str._null_
jmp 0x420447
mov ebx, dword [ebp - 0x430]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], str.Test5:_Value5_rTest6:_Value6
mov edi, dword [ebp - 0x41c]
mov esi, dword fs:[0x18]
mov dword [esp], edi
call dword [sym.imp.winhttp.dll_WinHttpSendRequest]
sub esp, 0x1c
mov dword [ebp - 0x418], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xf76
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.failed_to_send_request__lu_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x418]
mov dword [esp], edx
call fcn.00410490
mov dword [esp + 4], 0
mov dword [esp], edi
call dword [sym.imp.winhttp.dll_WinHttpReceiveResponse]
sub esp, 8
mov dword [ebp - 0x418], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xf79
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.failed_to_receive_response__lu_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x418]
mov dword [esp], edx
call fcn.00410490
lea eax, [ebp - 0x410]
mov dword [ebp - 0x410], 0x400
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x40c]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.OkHdr
mov dword [esp + 4], 0xffff
mov dword [esp], edi
call dword [sym.imp.winhttp.dll_WinHttpQueryHeaders]
sub esp, 0x18
mov dword [ebp - 0x418], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xf7d
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.got_error__lu._n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x418]
mov dword [esp], edx
call fcn.00410490
lea eax, [ebp - 0x410]
mov dword [ebp - 0x410], 0x400
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x40c]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x16
mov dword [esp], edi
call dword [sym.imp.winhttp.dll_WinHttpQueryHeaders]
sub esp, 0x18
mov dword [ebp - 0x418], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xf81
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.got_error__lu._n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x418]
mov dword [esp], edx
call fcn.00410490
call fcn.00431c30
mov edx, dword [ebp - 0x420]
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xf82
test edx, edx
je 0x420990
lea eax, [ebp - 0x40c]
mov dword [esp + 4], 0xffffffff
mov esi, str._invalid_
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x4207f0
mov edx, 0xffffffff
lea eax, [ebp - 0x40c]
call fcn.0040f890
mov esi, eax
lea eax, [ebp - 0x40c]
mov dword [esp + 4], str.HTTP_1.1_200_OK_r_nServer:_winetest_r_nSpaceAfterHdr:_bad_r_nOkHdr:_ok_r_n_r_n
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_wcscmp]
mov dword [esp + 8], esi
test eax, eax
mov dword [esp + 4], str.got__s._n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00410490
lea eax, [ebp - 0x410]
mov dword [ebp - 0x410], 0x400
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x40c]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.SpaceAfterHdr
mov dword [esp + 4], 0xffff
mov eax, dword [ebp - 0x41c]
mov dword [esp], eax
call dword [sym.imp.winhttp.dll_WinHttpQueryHeaders]
sub esp, 0x18
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xf86
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 4], str.got_error__lu._n
mov dword [esp], esi
mov dword [esp + 8], eax
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xf87
mov eax, dword [ebp - 0x420]
test eax, eax
je 0x420960
lea eax, [ebp - 0x40c]
mov dword [esp + 4], 0xffffffff
mov esi, str._invalid_
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x4208f1
mov edx, 0xffffffff
lea eax, [ebp - 0x40c]
call fcn.0040f890
mov esi, eax
lea eax, [ebp - 0x40c]
mov dword [esp + 4], 0x43af58
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_wcscmp]
mov dword [esp + 8], esi
test eax, eax
mov dword [esp + 4], str.got__s._n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00410490
mov eax, dword [ebp - 0x41c]
mov esi, dword [sym.imp.winhttp.dll_WinHttpCloseHandle]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x42c]
sub esp, 4
mov dword [esp], eax
call esi
sub esp, 4
mov dword [esp], ebx
call esi
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x40c]
mov dword [ebp - 0x418], eax
movzx eax, word [ebp - 0x418]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.0040f510
mov esi, eax
jmp 0x4208f1
lea eax, [ebp - 0x40c]
mov dword [ebp - 0x418], eax
movzx eax, word [ebp - 0x418]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.0040f510
mov esi, eax
jmp 0x4207f0