Function at 0x4209c0
Capabilities:
Check http status code
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, 0x144
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
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x17e7
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 + 0xc], 0
mov dword [esp + 4], str.localhost
mov dword [ebp - 0x12c], edi
mov dword [esp], edi
call dword [sym.imp.winhttp.dll_WinHttpConnect]
sub esp, 0x10
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x17ea
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 edi, edi
setne al
mov dword [esp], eax
call fcn.00410490
mov ecx, dword [sym.imp.winhttp.dll_WinHttpOpenRequest]
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._cached
mov dword [esp + 4], 0x439b8c
mov dword [ebp - 0x118], edi
mov dword [esp], edi
mov dword [ebp - 0x11c], ecx
call ecx
sub esp, 0x1c
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x17ed
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
mov edx, dword [sym.imp.winhttp.dll_WinHttpSendRequest]
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], 0
mov dword [esp + 4], 0
mov dword [ebp - 0x120], edx
call edx
sub esp, 0x1c
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x17ef
mov eax, dword [ebx + 0x34]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_send_request__lu_n
call fcn.00410490
mov eax, dword [sym.imp.winhttp.dll_WinHttpReceiveResponse]
mov dword [esp], esi
mov dword [esp + 4], 0
mov dword [ebp - 0x124], eax
call eax
sub esp, 8
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x17f1
mov eax, dword [ebx + 0x34]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_receive_response__lu_n
call fcn.00410490
lea edx, [ebp - 0x110]
mov dword [ebp - 0x110], 4
mov dword [esp + 0x10], edx
lea edx, [ebp - 0x114]
mov dword [esp + 0xc], edx
mov edx, dword [sym.imp.winhttp.dll_WinHttpQueryHeaders]
mov dword [esp], esi
mov dword [esp + 0x14], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x20000013
mov dword [ebp - 0x128], edx
call edx
sub esp, 0x18
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x17f4
mov eax, dword [ebx + 0x34]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_query_status_code__lu_n
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x17f5
mov eax, dword [ebp - 0x114]
mov dword [esp + 4], str.request_failed_unexpectedly__lu_n
cmp eax, 0xc8
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00410490
mov edx, dword [sym.imp.winhttp.dll_WinHttpReadData]
mov dword [esp], esi
lea ecx, [ebp - 0x110]
mov dword [esp + 0xc], ecx
lea ecx, [ebp - 0x10c]
mov dword [esp + 4], ecx
mov dword [esp + 8], 0x100
mov dword [ebp - 0x134], edx
call edx
sub esp, 0x10
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x17f7
mov eax, dword [ebx + 0x34]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_read_data__lu_n
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x17f8
mov eax, dword [ebp - 0x110]
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.00410490
mov edi, dword [sym.imp.winhttp.dll_WinHttpCloseHandle]
mov dword [esp], esi
call edi
sub esp, 4
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._cached
mov dword [esp + 4], 0x439b8c
mov eax, dword [ebp - 0x118]
mov dword [esp], eax
mov ecx, dword [ebp - 0x11c]
call ecx
sub esp, 0x1c
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x17fc
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
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], 0xffffffff
mov dword [esp + 4], str.Connection:_close
mov edx, dword [ebp - 0x120]
call edx
sub esp, 0x1c
mov dword [ebp - 0x130], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x17fe
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.failed_to_send_request__lu_n
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x130]
mov dword [esp], ecx
call fcn.00410490
mov dword [esp], esi
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x124]
call eax
sub esp, 8
mov dword [ebp - 0x130], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x1800
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.failed_to_receive_response__lu_n
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x130]
mov dword [esp], ecx
call fcn.00410490
lea ecx, [ebp - 0x110]
mov dword [ebp - 0x110], 4
mov dword [esp + 0x10], ecx
lea ecx, [ebp - 0x114]
mov dword [esp + 0xc], ecx
mov dword [esp], esi
mov dword [esp + 0x14], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x20000013
mov edx, dword [ebp - 0x128]
call edx
sub esp, 0x18
mov dword [ebp - 0x130], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x1803
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.failed_to_query_status_code__lu_n
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x130]
mov dword [esp], ecx
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x1804
mov eax, dword [ebp - 0x114]
mov dword [esp + 4], str.request_failed_unexpectedly__lu_n
cmp eax, 0xc8
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00410490
lea ecx, [ebp - 0x110]
mov dword [esp], esi
mov dword [esp + 0xc], ecx
lea ecx, [ebp - 0x10c]
mov dword [esp + 4], ecx
mov dword [esp + 8], 0x100
mov edx, dword [ebp - 0x134]
call edx
sub esp, 0x10
mov dword [ebp - 0x130], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x1806
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.failed_to_read_data__lu_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x130]
mov dword [esp], edx
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x1807
mov eax, dword [ebp - 0x110]
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.00410490
mov dword [esp], esi
call edi
sub esp, 4
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._notcached
mov dword [esp + 4], 0x439b8c
mov eax, dword [ebp - 0x118]
mov dword [esp], eax
mov ecx, dword [ebp - 0x11c]
call ecx
sub esp, 0x1c
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x180b
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
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], 0xffffffff
mov dword [esp + 4], str.Connection:_close
mov edx, dword [ebp - 0x120]
call edx
sub esp, 0x1c
mov dword [ebp - 0x11c], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x180d
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.failed_to_send_request__lu_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x11c]
mov dword [esp], edx
call fcn.00410490
mov dword [esp], esi
mov dword [esp + 4], 0
mov ecx, dword [ebp - 0x124]
call ecx
sub esp, 8
mov dword [ebp - 0x11c], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x180f
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.failed_to_receive_response__lu_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x11c]
mov dword [esp], edx
call fcn.00410490
lea ecx, [ebp - 0x110]
mov dword [ebp - 0x110], 4
mov dword [esp + 0x10], ecx
lea ecx, [ebp - 0x114]
mov dword [esp + 0xc], ecx
mov dword [esp], esi
mov dword [esp + 0x14], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x20000013
mov edx, dword [ebp - 0x128]
call edx
sub esp, 0x18
mov dword [ebp - 0x11c], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x1812
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.failed_to_query_status_code__lu_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x11c]
mov dword [esp], edx
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x1813
mov eax, dword [ebp - 0x114]
mov dword [esp + 4], str.request_failed_unexpectedly__lu_n
cmp eax, 0xc8
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00410490
mov dword [esp], esi
call edi
mov eax, dword [ebp - 0x118]
sub esp, 4
mov dword [esp], eax
call edi
mov eax, dword [ebp - 0x12c]
sub esp, 4
mov dword [esp], eax
call edi
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret