Function at 0x4218c0
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
mov edi, eax
push esi
push ebx
mov esi, dword fs:[0x18]
sub esp, 0x2cc
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 ebx, eax
mov dword [ebp - 0x2b4], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xcef
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 ebx, ebx
setne al
mov dword [esp], eax
call fcn.00410490
mov dword [esp + 0xc], 0
mov dword [ebp - 0x2a8], edi
movzx eax, word [ebp - 0x2a8]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str.localhost
call dword [sym.imp.winhttp.dll_WinHttpConnect]
sub esp, 0x10
mov ebx, eax
mov dword [ebp - 0x2b8], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xcf2
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 ebx, ebx
setne al
mov dword [esp], eax
call fcn.00410490
mov dword [esp], ebx
lea ebx, [ebp - 0x20c]
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._redirect
mov dword [esp + 4], str.POST
call dword [sym.imp.winhttp.dll_WinHttpOpenRequest]
sub esp, 0x1c
mov edi, eax
mov dword [ebp - 0x29c], eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xcf5
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 edi, edi
setne al
mov dword [esp], eax
call fcn.00410490
xor ecx, ecx
lea eax, [ebp - 0x298]
mov dword [ebp - 0x298], 0x100
mov word [ebp - 0x20c], cx
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.winhttp.dll_WinHttpQueryOption]
mov dword [esp], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x22
mov dword [ebp - 0x2b0], eax
call eax
sub esp, 0x10
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xcfa
mov eax, dword [esi + 0x34]
lea esi, [ebp - 0x10c]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str.got__lu_n
call fcn.00410490
mov edi, dword [ebp - 0x2a8]
mov dword [esp], esi
mov dword [esp + 8], str.http:__localhost:_u_redirect
mov dword [esp + 0xc], edi
mov dword [esp + 4], pe_nt_image_headers32
call fcn.0040f800
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xcfc
mov eax, ebx
shr eax, 0x10
mov dword [ebp - 0x2a4], eax
je 0x422210
mov dword [esp + 4], 0xffffffff
mov edi, str._invalid_
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x421af9
mov edx, 0xffffffff
mov eax, ebx
call fcn.0040f890
mov edi, eax
mov eax, esi
shr eax, 0x10
mov dword [ebp - 0x2a0], eax
je 0x422236
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 0x421b35
mov edx, 0xffffffff
mov eax, esi
call fcn.0040f890
mov edx, eax
mov eax, dword [sym.imp.msvcrt.dll_wcscmp]
mov dword [ebp - 0x2bc], edx
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [ebp - 0x2ac], eax
call eax
mov dword [esp + 0xc], edi
mov edx, dword [ebp - 0x2bc]
test eax, eax
mov dword [esp + 4], str.expected__s_got__s_n
sete al
mov dword [esp + 8], edx
movzx eax, al
mov dword [esp], eax
call fcn.00410490
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 5
mov dword [esp + 0x10], 5
mov dword [esp + 0xc], str.data
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x29c]
mov dword [esp], eax
call dword [sym.imp.winhttp.dll_WinHttpSendRequest]
sub esp, 0x1c
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov edx, dword fs:[0x18]
mov dword [eax + 4], 0xcff
mov eax, dword [edx + 0x34]
mov dword [ebp - 0x2bc], edx
mov dword [esp + 8], eax
mov dword [esp], edi
mov dword [esp + 4], str.failed_to_send_request__lu_n
call fcn.00410490
lea ecx, [ebp - 0x298]
xor eax, eax
mov dword [ebp - 0x298], 0x100
mov word [ebp - 0x20c], ax
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x22
mov eax, dword [ebp - 0x29c]
mov dword [esp], eax
mov eax, dword [ebp - 0x2b0]
call eax
sub esp, 0x10
mov edi, eax
call fcn.00431c30
mov edx, dword [ebp - 0x2bc]
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xd04
mov eax, dword [edx + 0x34]
mov dword [esp + 4], str.got__lu_n
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.00410490
call fcn.00431c30
mov edx, dword [ebp - 0x2a4]
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xd05
test edx, edx
je 0x422290
mov dword [esp + 4], 0xffffffff
mov edi, str._invalid_
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x421ca8
mov edx, 0xffffffff
mov eax, ebx
call fcn.0040f890
mov edi, eax
mov eax, dword [ebp - 0x2a0]
test eax, eax
je 0x422270
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 0x421ce1
mov edx, 0xffffffff
mov eax, esi
call fcn.0040f890
mov edx, eax
mov dword [ebp - 0x2bc], edx
mov dword [esp + 4], esi
mov dword [esp], ebx
mov eax, dword [ebp - 0x2ac]
call eax
mov dword [esp + 0xc], edi
mov edx, dword [ebp - 0x2bc]
test eax, eax
mov dword [esp + 4], str.expected__s_got__s_n
sete al
mov dword [esp + 8], edx
movzx eax, al
mov dword [esp], eax
call fcn.00410490
xor eax, eax
cmp word [ebp - 0x10c], 0
mov word [ebp - 0x20c], ax
je 0x422310
mov eax, esi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x421d38
sub eax, esi
add eax, 2
mov dword [ebp - 0x298], eax
lea eax, [ebp - 0x298]
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x22
mov eax, dword [ebp - 0x29c]
mov dword [esp], eax
mov eax, dword [ebp - 0x2b0]
call eax
sub esp, 0x10
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xd0b
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 4], str.got__lu_n
mov dword [esp], edi
mov dword [esp + 8], eax
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xd0c
mov eax, dword [ebp - 0x2a4]
test eax, eax
je 0x4222f0
mov dword [esp + 4], 0xffffffff
mov edi, str._invalid_
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x421df2
mov edx, 0xffffffff
mov eax, ebx
call fcn.0040f890
mov edi, eax
mov eax, dword [ebp - 0x2a0]
test eax, eax
je 0x422250
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 0x421e2b
mov edx, 0xffffffff
mov eax, esi
call fcn.0040f890
mov edx, eax
mov dword [ebp - 0x2bc], edx
mov dword [esp + 4], esi
mov dword [esp], ebx
mov eax, dword [ebp - 0x2ac]
call eax
mov dword [esp + 0xc], edi
mov edx, dword [ebp - 0x2bc]
test eax, eax
mov dword [esp + 4], str.expected__s_got__s_n
sete al
mov dword [esp + 8], edx
movzx eax, al
mov dword [esp], eax
call fcn.00410490
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x29c]
mov dword [esp], eax
call dword [sym.imp.winhttp.dll_WinHttpReceiveResponse]
sub esp, 8
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xd0f
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x34]
mov dword [ebp - 0x2bc], edx
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_receive_response__lu_n
call fcn.00410490
lea ecx, [ebp - 0x298]
xor edx, edx
mov dword [ebp - 0x298], 0x100
mov word [ebp - 0x20c], dx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x22
mov eax, dword [ebp - 0x29c]
mov dword [esp], eax
mov eax, dword [ebp - 0x2b0]
call eax
sub esp, 0x10
mov edi, eax
call fcn.00431c30
mov edx, dword [ebp - 0x2bc]
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xd14
mov eax, dword [edx + 0x34]
mov dword [esp + 4], str.got__lu_n
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.00410490
mov eax, dword [ebp - 0x2a8]
mov dword [esp], esi
mov dword [esp + 8], str.http:__localhost:_u_temporary
mov dword [esp + 0xc], eax
mov dword [esp + 4], pe_nt_image_headers32
call fcn.0040f800
call fcn.00431c30
mov ecx, dword [ebp - 0x2a4]
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xd16
test ecx, ecx
je 0x4222d0
mov dword [esp + 4], 0xffffffff
mov edi, str._invalid_
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x421f93
mov edx, 0xffffffff
mov eax, ebx
call fcn.0040f890
mov edi, eax
mov eax, dword [ebp - 0x2a0]
test eax, eax
je 0x4222b0
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 0x421fcc
mov edx, 0xffffffff
mov eax, esi
call fcn.0040f890
mov edx, eax
mov dword [ebp - 0x2a0], edx
mov dword [esp + 4], esi
mov dword [esp], ebx
mov eax, dword [ebp - 0x2ac]
call eax
mov dword [esp + 0xc], edi
mov edx, dword [ebp - 0x2a0]
test eax, eax
mov dword [esp + 4], str.expected__s_got__s_n
sete al
mov dword [esp + 8], edx
movzx eax, al
mov dword [esp], eax
mov ebx, dword fs:[0x18]
call fcn.00410490
lea eax, [ebp - 0x298]
mov dword [ebp - 0x290], 0xdeadbeef
mov dword [ebp - 0x298], 4
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x290]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x20000013
mov edi, dword [ebp - 0x29c]
mov dword [esp], edi
lea edi, [ebp - 0x294]
call dword [sym.imp.winhttp.dll_WinHttpQueryHeaders]
sub esp, 0x18
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xd1c
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_get_status_code__lu_n
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xd1d
mov eax, dword [ebp - 0x290]
mov dword [esp + 4], str.got__lu_n
cmp eax, 0xc8
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00410490
mov dword [ebp - 0x294], 0
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x29c]
mov dword [esp], eax
call dword [sym.imp.winhttp.dll_WinHttpQueryDataAvailable]
sub esp, 8
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xd21
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str.failed_to_query_data_available__lu_n
call fcn.00410490
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xd22
mov eax, dword [ebp - 0x294]
mov dword [esp + 4], str.got__lu_n
cmp eax, 0x80
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00410490
lea eax, [ebp - 0x28c]
mov dword [ebp - 0x294], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp + 4], eax
mov edi, dword [ebp - 0x29c]
mov dword [esp], edi
call dword [sym.imp.winhttp.dll_WinHttpReadData]
sub esp, 0x10
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x438e8a
mov dword [eax + 4], 0xd27
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
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], 0xd28
mov eax, dword [ebp - 0x294]
mov dword [esp + 4], str.got__lu_n
cmp eax, 0x80
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00410490
mov ebx, dword [sym.imp.winhttp.dll_WinHttpCloseHandle]
mov dword [esp], edi
call ebx
mov eax, dword [ebp - 0x2b8]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x2b4]
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, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.0040f510
mov edi, eax
mov eax, esi
shr eax, 0x10
mov dword [ebp - 0x2a0], eax
jne 0x421b0a
movzx eax, si
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.0040f510
mov edx, eax
jmp 0x421b35
movzx eax, si
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.0040f510
mov edx, eax
jmp 0x421e2b
movzx eax, si
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.0040f510
mov edx, eax
jmp 0x421ce1
movzx eax, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.0040f510
mov edi, eax
jmp 0x421ca8
movzx eax, si
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.0040f510
mov edx, eax
jmp 0x421fcc
movzx eax, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.0040f510
mov edi, eax
jmp 0x421f93
movzx eax, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.0040f510
mov edi, eax
jmp 0x421df2
mov eax, 2
jmp 0x421d46