Function at 0x4211a0
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
push ebx
mov ebx, eax
mov edi, dword fs:[0x18]
movzx ebx, bx
sub esp, 0x13c
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 esi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x10e0
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.got__lu_n
mov dword [esp + 8], eax
xor eax, eax
test esi, esi
setne al
mov dword [esp], eax
call fcn.00410490
lea eax, [ebp - 0x110]
mov dword [ebp - 0x110], 0x10000000
mov dword [esp + 0xc], 4
mov dword [esp + 8], eax
mov dword [esp + 4], 0x53
mov dword [ebp - 0x11c], esi
mov dword [esp], esi
call dword [sym.imp.winhttp.dll_WinHttpSetOption]
sub esp, 0x10
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x10e4
mov eax, dword [edi + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str.got__lu_n
call fcn.00410490
mov dword [esp + 8], ebx
mov dword [esp + 0xc], 0
mov dword [esp + 4], str.localhost
mov esi, dword [ebp - 0x11c]
mov dword [esp], esi
call dword [sym.imp.winhttp.dll_WinHttpConnect]
sub esp, 0x10
mov ebx, eax
mov dword [ebp - 0x120], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x10e7
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.got__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 + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], str._passport
mov dword [esp + 4], 0
call dword [sym.imp.winhttp.dll_WinHttpOpenRequest]
sub esp, 0x1c
mov ebx, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x10ea
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.got__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], 0x10ed
mov eax, dword [edi + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str.got__lu_n
call fcn.00410490
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.winhttp.dll_WinHttpReceiveResponse]
mov edx, dword [edi + 0x34]
sub esp, 8
mov esi, eax
mov dword [ebp - 0x124], edx
call fcn.00431c30
test esi, esi
mov edx, dword [ebp - 0x124]
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x10f1
jne 0x421430
mov esi, dword [0x4720d0]
test esi, esi
je 0x4216d0
mov dword [esp + 8], edx
mov dword [esp + 4], str.got__lu_n
mov dword [esp], 0
call fcn.00410490
mov eax, 0x10f5
call fcn.0040fbc0
mov dword [esp], str.no_support_for_Passport_redirects_n
call fcn.00410460
jmp 0x42169e
mov dword [esp + 8], edx
mov dword [esp + 4], str.got__lu_n
mov dword [esp], 1
call fcn.00410490
lea eax, [ebp - 0x114]
mov dword [ebp - 0x118], 0xdeadbeef
mov dword [ebp - 0x114], 4
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x118]
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.winhttp.dll_WinHttpQueryHeaders]
mov dword [esp + 0x14], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x20000013
mov dword [esp], ebx
mov dword [ebp - 0x124], eax
call eax
sub esp, 0x18
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x10fc
mov eax, dword [edi + 0x34]
mov dword [esp], esi
lea esi, [ebp - 0x10c]
mov dword [esp + 8], eax
mov dword [esp + 4], str.got__lu_n
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x10fd
mov eax, dword [ebp - 0x118]
mov dword [esp + 4], str.got__lu_n
cmp eax, 0x191
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00410490
xor ecx, ecx
mov dword [ebp - 0x114], 0x100
mov word [ebp - 0x10c], cx
lea ecx, [ebp - 0x114]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp + 4], 0x14
mov dword [esp], ebx
mov eax, dword [ebp - 0x124]
call eax
sub esp, 0x18
mov dword [ebp - 0x128], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x1102
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.got__lu_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x128]
mov dword [esp], edx
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x1103
mov eax, esi
shr eax, 0x10
mov dword [ebp - 0x12c], eax
je 0x421710
mov dword [esp + 4], 0xffffffff
mov edi, str._invalid_
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x4215cd
mov edx, 0xffffffff
mov eax, esi
call fcn.0040f890
mov edi, eax
mov eax, dword [sym.imp.kernel32.dll_lstrcmpW]
mov dword [esp + 4], esi
mov dword [esp], str.Found
mov dword [ebp - 0x128], eax
call eax
mov edx, eax
sub esp, 8
mov eax, 1
test edx, edx
jne 0x421810
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], str.got__s_n
call fcn.00410490
xor edx, edx
lea eax, [ebp - 0x114]
mov dword [ebp - 0x114], 0x100
mov word [ebp - 0x10c], dx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0
mov dword [esp + 4], 0x16
mov dword [esp], ebx
mov eax, dword [ebp - 0x124]
call eax
sub esp, 0x18
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0x1109
mov eax, dword fs:[0x18]
mov edx, dword [eax + 0x34]
test edi, edi
jne 0x421730
mov ecx, dword [0x4720d0]
cmp edx, 0x7a
je 0x421888
mov dword [esp + 8], edx
mov dword [esp + 4], str.got__lu_n
mov dword [esp], 0
call fcn.00410490
mov dword [esp], ebx
mov ebx, dword [sym.imp.winhttp.dll_WinHttpCloseHandle]
call ebx
mov eax, dword [ebp - 0x120]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x11c]
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
cmp edx, 0x2eef
je 0x421840
cmp edx, 0x2f78
jne 0x4213f7
mov dword [esp + 8], 0x2f78
mov dword [esp + 4], str.got__lu_n
mov dword [esp], 1
call fcn.00410490
jmp 0x42140f
movzx eax, si
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.0040f510
mov edi, eax
jmp 0x4215cd
mov dword [esp + 8], edx
mov dword [esp + 4], str.got__lu_n
mov dword [esp], 1
call fcn.00410490
mov eax, 0x110c
call fcn.0040fbc0
mov eax, str.HTTP_1.1_401_Found_r_nContent_Length:_0_r_nLocation:___r_nWWW_Authenticate:_Passport1.4_r_n_r_n
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x421760
mov edx, dword [ebp - 0x114]
sub eax, str.HTTP_1.1_401_Found_r_nContent_Length:_0_r_nLocation:___r_nWWW_Authenticate:_Passport1.4_r_n_r_n
mov dword [esp + 4], str.got__lu_n
cmp eax, edx
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00410490
mov eax, 0x110d
call fcn.0040fbc0
mov eax, dword [ebp - 0x12c]
test eax, eax
je 0x421868
mov dword [esp + 4], 0xffffffff
mov edi, str._invalid_
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x4217d3
mov edx, 0xffffffff
mov eax, esi
call fcn.0040f890
mov edi, eax
mov dword [esp + 4], esi
mov dword [esp], str.HTTP_1.1_401_Found_r_nContent_Length:_0_r_nLocation:___r_nWWW_Authenticate:_Passport1.4_r_n_r_n
mov eax, dword [ebp - 0x128]
call eax
sub esp, 8
test eax, eax
sete al
mov dword [esp + 8], edi
movzx eax, al
mov dword [esp + 4], str.got__s_n
mov dword [esp], eax
call fcn.00410490
jmp 0x42169e
mov dword [esp + 4], esi
mov dword [esp], 0x439d32
mov eax, dword [ebp - 0x128]
call eax
sub esp, 8
or eax, dword [0x4720d0]
sete al
movzx eax, al
jmp 0x4215f7
mov dword [esp + 8], 0x2eef
mov dword [esp + 4], str.got__lu_n
mov dword [esp], 1
call fcn.00410490
jmp 0x42140f
movzx eax, si
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.0040f510
mov edi, eax
jmp 0x4217d3
test ecx, ecx
jne 0x421686
mov dword [esp + 8], 0x7a
mov dword [esp + 4], str.got__lu_n
mov dword [esp], 1
call fcn.00410490
jmp 0x42169e