Function at 0x41cf50
Capabilities:
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 ebx, eax
mov esi, dword fs:[0x18]
movzx ebx, bx
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 edi, eax
mov dword [ebp - 0x424], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xbde
mov eax, dword [esi + 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], ebx
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 edi, eax
mov dword [ebp - 0x428], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xbe1
mov eax, dword [esi + 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 dword [esp], edi
lea edi, [ebp - 0x410]
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._multiauth
mov dword [esp + 4], 0x439b8c
call dword [sym.imp.winhttp.dll_WinHttpOpenRequest]
sub esp, 0x1c
mov ebx, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xbe4
mov eax, dword [esi + 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 dword [sym.imp.winhttp.dll_WinHttpSendRequest]
sub esp, 0x1c
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xbe8
mov dword [esp], esi
mov dword [esp + 4], str.expected_success_n
call fcn.00410490
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.winhttp.dll_WinHttpReceiveResponse]
sub esp, 8
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xbeb
mov dword [esp], esi
mov dword [esp + 4], str.expected_success_n
call fcn.00410490
lea eax, [ebp - 0x418]
mov dword [ebp - 0x418], 0xdeadbeef
mov dword [ebp - 0x41c], 0xdeadbeef
mov dword [ebp - 0x420], 0xdeadbeef
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x41c]
mov dword [esp + 8], eax
lea eax, [ebp - 0x420]
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.winhttp.dll_WinHttpQueryAuthSchemes]
sub esp, 0x10
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xbef
mov dword [esp], esi
lea esi, [ebp - 0x40c]
mov dword [esp + 4], str.expected_success_n
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xbf0
mov eax, dword [ebp - 0x420]
mov dword [esp + 4], str.got__lx_n
cmp eax, 3
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xbf1
mov eax, dword [ebp - 0x418]
mov dword [esp + 4], str.got__lx_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xbf2
mov eax, dword [ebp - 0x41c]
mov dword [esp + 4], str.got__lx_n
cmp eax, 1
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00410490
lea eax, [ebp - 0x414]
mov dword [ebp - 0x410], 0
mov dword [ebp - 0x414], 0x400
mov dword [esp + 0x10], eax
mov eax, dword [sym.imp.winhttp.dll_WinHttpQueryHeaders]
mov dword [esp + 0x14], edi
mov dword [esp + 0xc], esi
mov dword [esp + 8], str.WWW_Authenticate
mov dword [esp + 4], 0xffff
mov dword [esp], ebx
mov dword [ebp - 0x42c], eax
call eax
sub esp, 0x18
mov dword [ebp - 0x430], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xbf7
mov dword [esp + 4], str.expected_success_n
mov edx, dword [ebp - 0x430]
mov dword [esp], edx
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xbf8
mov eax, esi
shr eax, 0x10
je 0x41d510
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, str._invalid_
sub esp, 8
test eax, eax
jne 0x41d303
mov edx, 0xffffffff
mov eax, esi
call fcn.0040f890
mov edx, eax
mov dword [ebp - 0x430], edx
mov dword [esp + 4], str.Bearer
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_lstrcmpW]
mov edx, dword [ebp - 0x430]
sub esp, 8
test eax, eax
sete al
mov dword [esp + 8], edx
movzx eax, al
mov dword [esp + 4], str.buf___s_n
mov dword [esp], eax
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
cmp word [ebp - 0x40c], 0
mov dword [eax + 4], 0xbf9
mov edx, dword [ebp - 0x414]
je 0x41d540
mov eax, esi
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x41d370
sub eax, esi
cmp edx, eax
mov dword [esp + 8], edx
sete al
mov dword [esp + 4], str.size___lu_n
movzx eax, al
mov dword [esp], eax
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xbfa
mov eax, dword [ebp - 0x410]
mov dword [esp + 4], str.index___lu_n
cmp eax, 1
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00410490
lea eax, [ebp - 0x414]
mov dword [ebp - 0x410], 0
mov dword [ebp - 0x414], 0xdeadbeef
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], str.WWW_Authenticate
mov dword [esp + 4], 0xffff
mov dword [esp], ebx
mov eax, dword [ebp - 0x42c]
call eax
sub esp, 0x18
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xbff
xor eax, eax
mov edx, dword fs:[0x18]
mov ecx, dword [edx + 0x34]
test edi, edi
jne 0x41d440
xor eax, eax
cmp ecx, 0x7a
sete al
mov dword [esp + 0xc], ecx
mov dword [esp], eax
mov dword [esp + 8], edi
mov dword [esp + 4], str.WinHttpQueryHeaders_returned__d__lu__n
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
cmp word [ebp - 0x40c], 0
mov dword [eax + 4], 0xc01
mov edx, dword [ebp - 0x414]
je 0x41d530
mov eax, esi
add eax, 2
cmp word [eax], 0
jne 0x41d480
sub eax, esi
add eax, 2
cmp edx, eax
mov dword [esp + 8], edx
sete al
mov dword [esp + 4], str.size___lu_n
movzx eax, al
mov dword [esp], eax
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xc02
mov eax, dword [ebp - 0x410]
mov dword [esp + 4], str.index___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], ebx
mov ebx, dword [sym.imp.winhttp.dll_WinHttpCloseHandle]
call ebx
mov eax, dword [ebp - 0x428]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x424]
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
movzx eax, si
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.0040f510
mov edx, eax
jmp 0x41d303
mov eax, 2
jmp 0x41d48e
xor eax, eax
jmp 0x41d37b