Function at 0x422ae0
Capabilities:
Access peb ldr_data
Check http status code
Get process heap flags
Initialize winhttp library
Prepare http request
Read http header
Receive http response

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov edi, dword fs:[0x18]
sub esp, 0x3c
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], str.winetest
call dword [sym.imp.winhttp.dll_WinHttpOpen]
sub esp, 0x14
mov ebx, eax
mov dword [ebp - 0x20], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x4e2
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], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], str.test.winehq.org
call dword [sym.imp.winhttp.dll_WinHttpConnect]
sub esp, 0x10
mov esi, eax
mov dword [ebp - 0x1c], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x4e5
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 eax, dword [sym.imp.winhttp.dll_WinHttpOpenRequest]
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 - 0x28], eax
call eax
sub esp, 0x1c
mov ebx, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x4e8
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 ebx, ebx
setne al
mov dword [esp], eax
call fcn.00410490
mov dword [esp + 0x18], 0
mov esi, dword [sym.imp.winhttp.dll_WinHttpSendRequest]
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], ebx
call esi
mov ecx, eax
sub esp, 0x1c
mov eax, dword [edi + 0x34]
test ecx, ecx
jne 0x422c7d
cmp eax, 0x2efd
je 0x423170
cmp eax, 0x2ee2
je 0x423170
mov dword [ebp - 0x18], ecx
call fcn.00431c30
mov edi, dword fs:[0x18]
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x4f1
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.failed_to_send_request__lu_n
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x18]
mov dword [esp], ecx
call fcn.00410490
mov eax, dword [sym.imp.winhttp.dll_WinHttpReceiveResponse]
mov dword [esp], ebx
mov dword [esp + 4], 0
mov dword [ebp - 0x2c], eax
call eax
sub esp, 8
mov dword [ebp - 0x18], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x4f4
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.failed_to_receive_response__lu_n
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x18]
mov dword [esp], ecx
call fcn.00410490
lea eax, [ebp - 0x14]
mov dword [ebp - 0x10], 0xdeadbeef
mov dword [ebp - 0x14], 4
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x10]
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.winhttp.dll_WinHttpQueryHeaders]
mov dword [esp], ebx
mov dword [esp + 0x14], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x20000013
mov dword [ebp - 0x18], eax
call eax
sub esp, 0x18
mov dword [ebp - 0x24], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x4f9
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.failed_unexpectedly__lu_n
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x24]
mov dword [esp], ecx
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x4fa
mov eax, dword [ebp - 0x10]
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 eax, dword [sym.imp.winhttp.dll_WinHttpCloseHandle]
mov dword [esp], ebx
mov dword [ebp - 0x24], eax
call eax
sub esp, 4
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x43b1f0
mov dword [esp + 8], 0x43b1f0
mov dword [esp + 4], 0x43b1f0
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [ebp - 0x28]
call eax
sub esp, 0x1c
mov ebx, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x4ff
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 ebx, ebx
setne al
mov dword [esp], eax
call fcn.00410490
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], ebx
call esi
mov esi, eax
sub esp, 0x1c
mov eax, dword [edi + 0x34]
test esi, esi
jne 0x422e78
cmp eax, 0x2efd
je 0x423150
cmp eax, 0x2ee2
je 0x423150
call fcn.00431c30
mov edi, dword fs:[0x18]
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x508
mov eax, dword [edi + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_send_request__lu_n
call fcn.00410490
mov dword [esp + 4], 0
mov dword [esp], ebx
mov eax, dword [ebp - 0x2c]
call eax
sub esp, 8
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x50b
mov eax, dword [edi + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_receive_response__lu_n
call fcn.00410490
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x12
mov dword [esp], ebx
mov eax, dword [ebp - 0x18]
call eax
mov edx, dword [edi + 0x34]
sub esp, 0x18
mov esi, eax
mov dword [ebp - 0x28], edx
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x511
xor eax, eax
test esi, esi
sete al
mov dword [esp + 4], str.succeeded_unexpectedly_n
mov dword [esp], eax
call fcn.00410490
call fcn.00431c30
mov edx, dword [ebp - 0x28]
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x512
xor eax, eax
cmp edx, 0x7a
sete al
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], str.expected_ERROR_INSUFFICIENT_BUFFER__got__lu_n
call fcn.00410490
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
lea ecx, [ebp - 0x14]
sub esp, 0xc
mov esi, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x12
mov dword [esp], ebx
mov eax, dword [ebp - 0x18]
call eax
sub esp, 0x18
mov dword [ebp - 0x28], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x516
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.failed_unexpectedly__lu_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x28]
mov dword [esp], edx
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov edx, dword [ebp - 0x14]
mov dword [eax + 4], 0x517
cmp word [esi], 0
je 0x423190
mov eax, esi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x423030
sub eax, esi
sar eax, 1
mov dword [esp + 8], edx
shr edx, 1
cmp edx, eax
mov dword [esp + 4], str.unexpected_size__lu_n
sete al
movzx eax, al
mov dword [esp], eax
mov edi, dword fs:[0x18]
call fcn.00410490
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
lea eax, [ebp - 0x14]
mov dword [ebp - 0x10], 0xdeadbeef
sub esp, 0xc
mov dword [ebp - 0x14], 4
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x10]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x20000013
mov dword [esp], ebx
mov eax, dword [ebp - 0x18]
call eax
sub esp, 0x18
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x51d
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.failed_unexpectedly__lu_n
mov dword [esp + 8], eax
mov dword [esp], esi
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x51e
mov eax, dword [ebp - 0x10]
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], ebx
mov edi, dword [ebp - 0x24]
call edi
mov eax, dword [ebp - 0x1c]
sub esp, 4
mov dword [esp], eax
call edi
mov eax, dword [ebp - 0x20]
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
mov eax, 0x505
call fcn.0040fbc0
mov dword [esp], str.connection_failed__skipping_n
call fcn.0040fef0
jmp 0x42311e
mov eax, 0x4ee
call fcn.0040fbc0
mov dword [esp], str.connection_failed__skipping_n
call fcn.0040fef0
mov eax, dword [sym.imp.winhttp.dll_WinHttpCloseHandle]
mov dword [ebp - 0x24], eax
jmp 0x42311e
xor eax, eax
jmp 0x42303d