Function at 0x402a30
Capabilities:
Check http status code
Initialize winhttp library
Prepare http request
Read http header
Receive http response

Disassembly:
push ebp
mov edx, 0x437580
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
lea eax, [ebp - 0x134]
sub esp, 0x15c
mov dword [ebp - 0x138], eax
test ebx, ebx
mov eax, 0x437460
mov dword [ebp - 0x128], 0
cmovne edx, eax
cmp ebx, 1
sbb eax, eax
shl ebx, 0x1c
and eax, 0xfffffffe
mov dword [ebp - 0x130], edx
add eax, 0x18
mov dword [ebp - 0x12c], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_CreateEventW]
sub esp, 0x10
mov dword [ebp - 0x124], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0x4361aa
call dword [sym.imp.winhttp.dll_WinHttpOpen]
sub esp, 0x14
mov ebx, eax
call fcn.00431c30
mov edi, dword fs:[0x18]
mov dword [eax], 0x436036
mov dword [eax + 4], 0x223
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x4361bc
mov dword [esp + 8], eax
xor eax, eax
test ebx, ebx
setne al
mov dword [esp], eax
call fcn.00401be0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0x402f30
mov dword [esp], ebx
call dword [sym.imp.winhttp.dll_WinHttpSetStatusCallback]
lea eax, [ebp - 0x138]
sub esp, 0x10
mov dword [esp + 0xc], 4
mov dword [esp + 8], eax
mov dword [esp + 4], 0x2d
mov dword [esp], ebx
call dword [sym.imp.winhttp.dll_WinHttpSetOption]
sub esp, 0x10
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x228
mov eax, dword [edi + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_set_context_value__lu_n
call fcn.00401be0
mov ecx, 0x22a
mov edx, 1
lea eax, [ebp - 0x134]
call fcn.00401c00
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x436528
mov dword [esp], ebx
call dword [sym.imp.winhttp.dll_WinHttpConnect]
sub esp, 0x10
mov esi, eax
mov dword [ebp - 0x148], eax
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x22c
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x4361ec
mov dword [esp + 8], eax
xor eax, eax
test esi, esi
setne al
mov dword [esp], eax
call fcn.00401be0
mov ecx, 0x22e
mov edx, 2
lea eax, [ebp - 0x134]
call fcn.00401c00
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._tests_redirect
mov dword [esp + 4], 0
call dword [sym.imp.winhttp.dll_WinHttpOpenRequest]
sub esp, 0x1c
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x230
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x43620d
mov dword [esp + 8], eax
xor eax, eax
test esi, esi
setne al
mov dword [esp], eax
call fcn.00401be0
mov edx, 3
mov ecx, 0x232
lea eax, [ebp - 0x134]
call fcn.00401c00
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]
mov edx, eax
sub esp, 0x1c
mov eax, dword [edi + 0x34]
test edx, edx
jne 0x402ce9
cmp eax, 0x2efd
je 0x402f00
cmp eax, 0x2ee2
je 0x402f00
mov dword [ebp - 0x144], edx
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x23a
mov edi, dword fs:[0x18]
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x43622b
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x144]
mov dword [esp], edx
call fcn.00401be0
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x124]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov dword [ebp - 0x144], eax
call eax
mov ecx, 0x23d
mov edx, 4
lea eax, [ebp - 0x134]
sub esp, 8
call fcn.00401c00
mov dword [esp + 4], 0
mov dword [esp], esi
call dword [sym.imp.winhttp.dll_WinHttpReceiveResponse]
sub esp, 8
mov dword [ebp - 0x14c], eax
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x23f
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x4362dc
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x14c]
mov dword [esp], edx
call fcn.00401be0
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x124]
mov dword [esp], eax
mov eax, dword [ebp - 0x144]
call eax
lea eax, [ebp - 0x140]
mov dword [ebp - 0x140], 4
mov dword [ebp - 0x13c], 0xdeadbeef
sub esp, 8
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x13c]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x20000013
mov dword [esp], esi
call dword [sym.imp.winhttp.dll_WinHttpQueryHeaders]
sub esp, 0x18
mov dword [ebp - 0x14c], eax
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x245
mov eax, dword [edi + 0x34]
mov dword [esp + 4], 0x436585
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x14c]
mov dword [esp], edx
call fcn.00401be0
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x246
mov eax, dword [ebp - 0x13c]
mov dword [esp + 4], 0x436320
cmp eax, 0xc8
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401be0
mov ecx, 0x248
mov edx, 0xd
lea eax, [ebp - 0x134]
call fcn.00401c00
mov dword [esp], esi
mov esi, dword [sym.imp.winhttp.dll_WinHttpCloseHandle]
call esi
mov eax, dword [ebp - 0x148]
sub esp, 4
mov dword [esp], eax
call esi
sub esp, 4
mov dword [esp], ebx
call esi
sub esp, 4
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x124]
mov dword [esp], eax
mov eax, dword [ebp - 0x144]
call eax
mov eax, dword [ebp - 0x124]
sub esp, 8
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
lea eax, [ebp - 0x134]
mov edx, 0x24f
sub esp, 4
call fcn.00401cc0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x237
mov dword [esp], 0x436568
call fcn.00401670
mov eax, dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov dword [ebp - 0x144], eax
jmp 0x402e8d