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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x534]
push ebx
sub esp, 0x56c
mov dword [ebp - 0x538], eax
mov ebx, dword [sym.imp.kernel32.dll_CreateEventW]
mov dword [ebp - 0x530], 0x437340
mov dword [ebp - 0x52c], 0x16
mov dword [ebp - 0x528], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call ebx
sub esp, 0x10
mov dword [ebp - 0x524], eax
mov dword [esp + 0x10], 0x10000000
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 edi, eax
mov dword [ebp - 0x548], eax
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x27a
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 4], 0x4361bc
mov dword [esp + 8], eax
xor eax, eax
test edi, edi
setne al
mov dword [esp], eax
call fcn.00401be0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call ebx
mov ebx, dword [sym.imp.winhttp.dll_WinHttpSetOption]
mov dword [ebp - 0x544], eax
sub esp, 0x10
lea eax, [ebp - 0x544]
mov dword [esp + 0xc], 4
mov dword [esp + 8], eax
mov dword [esp + 4], 0x63
mov dword [esp], edi
call ebx
mov dword [ebp - 0x554], eax
sub esp, 0x10
test eax, eax
je 0x403ea0
mov dword [ebp - 0x554], 1
mov esi, dword fs:[0x18]
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0x402f30
mov eax, dword [ebp - 0x548]
mov dword [esp], eax
call dword [sym.imp.winhttp.dll_WinHttpSetStatusCallback]
mov esi, dword [esi + 0x34]
sub esp, 0x10
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x287
mov eax, 1
test esi, esi
je 0x4034fb
mov eax, dword [0x4720d0]
test eax, eax
sete dl
xor eax, eax
cmp esi, 0xdeadbeef
sete al
and eax, edx
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], 0x4366c3
mov edi, dword fs:[0x18]
call fcn.00401be0
lea eax, [ebp - 0x538]
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 0xc], 4
mov dword [esp + 8], eax
mov dword [esp + 4], 0x2d
mov eax, dword [ebp - 0x548]
mov dword [esp], eax
call ebx
mov ebx, dword [edi + 0x34]
sub esp, 0x10
mov esi, eax
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x28c
mov dword [esp + 8], ebx
mov dword [esp + 4], str.failed_to_set_context_value__lu_n
mov dword [esp], esi
call fcn.00401be0
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x28d
mov eax, 1
test ebx, ebx
je 0x4035a3
mov edi, dword [0x4720d0]
test edi, edi
sete dl
xor eax, eax
cmp ebx, 0xdeadbeef
sete al
and eax, edx
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], 0x4366c3
mov ebx, dword fs:[0x18]
call fcn.00401be0
mov ecx, 0x28f
mov edx, 1
lea eax, [ebp - 0x534]
call fcn.00401c00
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x436528
mov eax, dword [ebp - 0x548]
mov dword [esp], eax
call dword [sym.imp.winhttp.dll_WinHttpConnect]
mov ebx, dword [ebx + 0x34]
sub esp, 0x10
mov edi, eax
mov dword [ebp - 0x550], eax
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x293
xor eax, eax
test edi, edi
setne al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], 0x4361ec
call fcn.00401be0
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x294
mov eax, 1
test ebx, ebx
je 0x40366f
mov esi, dword [0x4720d0]
test esi, esi
sete dl
xor eax, eax
cmp ebx, 0x2726
sete al
and eax, edx
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], 0x4366c3
mov esi, dword fs:[0x18]
call fcn.00401be0
mov ecx, 0x296
mov edx, 2
lea eax, [ebp - 0x534]
call fcn.00401c00
mov dword [esi + 0x34], 0xdeadbeef
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_hello.html
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x550]
mov dword [esp], eax
call dword [sym.imp.winhttp.dll_WinHttpOpenRequest]
mov edi, dword [esi + 0x34]
sub esp, 0x1c
mov ebx, eax
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x29a
xor eax, eax
test ebx, ebx
setne al
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], 0x43620d
call fcn.00401be0
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x29b
xor eax, eax
test edi, edi
sete al
mov dword [esp + 8], edi
mov dword [esp + 4], 0x4366c3
mov dword [esp], eax
call fcn.00401be0
mov dword [esp + 0xc], 0xa0000000
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0x4366f0
mov dword [esp], ebx
call dword [sym.imp.winhttp.dll_WinHttpAddRequestHeaders]
mov edx, dword [esi + 0x34]
sub esp, 0x10
mov edi, eax
mov dword [ebp - 0x54c], edx
call fcn.00431c30
mov edx, dword [ebp - 0x54c]
mov dword [eax], 0x436036
mov dword [eax + 4], 0x29f
mov dword [esp + 0xc], edx
mov dword [esp + 8], edi
mov dword [esp], edi
mov dword [esp + 4], 0x436714
call fcn.00401be0
mov ecx, 0x2a1
mov edx, 3
lea eax, [ebp - 0x534]
call fcn.00401c00
mov dword [esi + 0x34], 0xdeadbeef
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]
mov esi, dword [esi + 0x34]
sub esp, 0x1c
mov edi, eax
test eax, eax
jne 0x40381f
cmp esi, 0x2efd
je 0x403fb0
cmp esi, 0x2ee2
je 0x403fb0
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2ae
mov dword [esp + 8], esi
mov dword [esp], edi
mov dword [esp + 4], 0x43622b
call fcn.00401be0
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2af
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
lea esi, [ebp - 0x534]
mov dword [esp], eax
mov dword [esp + 4], 0x4366c3
call fcn.00401be0
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x524]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov dword [ebp - 0x54c], eax
call eax
mov edx, 4
mov eax, esi
mov ecx, 0x2b3
sub esp, 8
call fcn.00401c00
mov ecx, dword [sym.imp.winhttp.dll_WinHttpReceiveResponse]
mov esi, dword fs:[0x18]
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 4], 0
mov dword [esp], ebx
mov dword [ebp - 0x55c], ecx
call ecx
mov edi, dword [esi + 0x34]
sub esp, 8
mov dword [ebp - 0x558], eax
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2b7
mov dword [esp + 8], edi
mov dword [esp + 4], 0x4362dc
mov edx, dword [ebp - 0x558]
mov dword [esp], edx
call fcn.00401be0
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2b8
xor eax, eax
test edi, edi
sete al
mov dword [esp + 8], edi
mov dword [esp + 4], 0x4366c3
mov dword [esp], eax
call fcn.00401be0
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 4], 0
mov dword [esp], ebx
mov ecx, dword [ebp - 0x55c]
call ecx
mov edi, dword [esi + 0x34]
sub esp, 8
mov dword [ebp - 0x558], eax
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2bd
mov dword [esp + 8], edi
mov dword [esp + 4], 0x4362dc
mov edx, dword [ebp - 0x558]
mov dword [esp], edx
call fcn.00401be0
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2be
xor eax, eax
test edi, edi
sete al
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], 0x4366c3
call fcn.00401be0
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x524]
mov dword [esp], eax
mov eax, dword [ebp - 0x54c]
call eax
lea eax, [ebp - 0x540]
mov dword [esi + 0x34], 0xdeadbeef
mov dword [ebp - 0x540], 4
sub esp, 8
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x53c]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x20000013
mov dword [esp], ebx
call dword [sym.imp.winhttp.dll_WinHttpQueryHeaders]
mov esi, dword [esi + 0x34]
sub esp, 0x18
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2c6
mov dword [esp + 8], esi
mov dword [esp + 4], 0x436585
mov dword [esp], edi
call fcn.00401be0
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2c7
mov eax, dword [ebp - 0x53c]
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
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2c8
mov eax, 1
test esi, esi
jne 0x403e48
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], 0x4366c3
mov edi, dword fs:[0x18]
call fcn.00401be0
mov ecx, 0x2ca
mov edx, 0xa
lea eax, [ebp - 0x534]
call fcn.00401c00
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.winhttp.dll_WinHttpQueryDataAvailable]
mov esi, dword [edi + 0x34]
sub esp, 8
mov dword [ebp - 0x558], eax
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2ce
mov dword [esp + 8], esi
mov dword [esp + 4], 0x436760
mov edx, dword [ebp - 0x558]
mov dword [esp], edx
call fcn.00401be0
call fcn.00431c30
test esi, esi
sete dl
cmp esi, 0x3e5
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2cf
sete al
or dl, al
mov byte [ebp - 0x558], dl
mov dword [esp + 8], esi
mov dword [esp + 4], 0x4366c3
jne 0x403db8
mov edx, dword [0x4720d0]
test edx, edx
sete dl
xor eax, eax
cmp esi, 0xdeadbeef
sete al
and eax, edx
mov dword [esp], eax
call fcn.00401be0
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x524]
mov dword [esp], eax
mov eax, dword [ebp - 0x54c]
call eax
sub esp, 8
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2d2
mov eax, dword [ebp - 0x53c]
mov dword [esp + 4], str.got_status__lx_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebp - 0x514], 0x40000
sete al
mov dword [esp], eax
call fcn.00401be0
call fcn.00431c30
xor edx, edx
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2d3
mov eax, dword [ebp - 0x518]
mov dword [esp + 8], eax
mov dword [esp], edx
mov dword [esp + 0xc], esi
mov dword [esp + 4], str.got_unexpected_thread__lx__err__lx_n
call fcn.00401be0
mov ecx, 0x2d7
mov edx, 0xb
lea eax, [ebp - 0x534]
call fcn.00401c00
lea eax, [ebp - 0x40c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x400
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.winhttp.dll_WinHttpReadData]
sub esp, 0x10
mov edi, eax
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2d9
mov dword [esp + 8], esi
mov dword [esp + 4], 0x436268
mov dword [esp], edi
call fcn.00401be0
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x524]
mov dword [esp], eax
mov eax, dword [ebp - 0x54c]
call eax
sub esp, 8
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2dd
mov eax, dword [ebp - 0x53c]
mov dword [esp + 4], str.got_status__lx_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebp - 0x514], 0x80000
sete al
mov dword [esp], eax
call fcn.00401be0
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2de
mov eax, dword [ebp - 0x518]
test esi, esi
jne 0x403e78
mov edx, dword fs:[0x18]
cmp dword [edx + 0x24], eax
sete dl
movzx edx, dl
mov dword [esp + 8], eax
mov dword [esp], edx
mov dword [esp + 0xc], esi
mov dword [esp + 4], str.got_unexpected_thread__lx__err__lx_n
call fcn.00401be0
mov ecx, 0x2e2
mov edx, 0xd
lea eax, [ebp - 0x534]
call fcn.00401c00
mov dword [esp], ebx
mov ebx, dword [sym.imp.winhttp.dll_WinHttpCloseHandle]
call ebx
mov eax, dword [ebp - 0x550]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x554]
sub esp, 4
test eax, eax
jne 0x403ec8
mov eax, dword [ebp - 0x548]
mov dword [esp], eax
call ebx
sub esp, 4
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x524]
mov dword [esp], eax
mov eax, dword [ebp - 0x54c]
call eax
mov edx, 0x2ed
lea eax, [ebp - 0x534]
sub esp, 8
call fcn.00401cc0
mov eax, dword [ebp - 0x544]
mov ebx, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x524]
sub esp, 4
mov dword [esp], eax
call ebx
lea eax, [ebp - 0x534]
mov edx, 0x2f6
sub esp, 4
call fcn.00401cc0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 1
call fcn.00401be0
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x524]
mov dword [esp], eax
mov eax, dword [ebp - 0x54c]
call eax
sub esp, 8
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2d2
mov eax, dword [ebp - 0x53c]
mov dword [esp + 4], str.got_status__lx_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebp - 0x514], 0x40000
sete al
mov dword [esp], eax
call fcn.00401be0
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2d3
mov eax, dword [ebp - 0x518]
test esi, esi
je 0x403e68
xor edx, edx
cmp dword [edi + 0x24], eax
setne dl
jmp 0x403be6
mov ecx, dword [0x4720d0]
test ecx, ecx
sete dl
xor eax, eax
cmp esi, 0xdeadbeef
sete al
and eax, edx
jmp 0x403a9b
xor edx, edx
cmp dword [edi + 0x24], eax
sete dl
jmp 0x403be6
cmp byte [ebp - 0x558], 0
je 0x404012
mov edx, dword fs:[0x18]
cmp dword [edx + 0x24], eax
setne dl
movzx edx, dl
jmp 0x403ce8
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x280
mov dword [esp], str.Unload_event_not_supported_n
call fcn.00402a00
jmp 0x40348e
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x544]
mov dword [esp], eax
mov esi, dword [ebp - 0x54c]
call esi
sub esp, 8
mov dword [ebp - 0x53c], eax
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2e9
mov eax, dword [ebp - 0x53c]
mov dword [esp + 4], 0x4367be
cmp eax, 0x102
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401be0
mov eax, dword [ebp - 0x548]
mov dword [esp], eax
call ebx
sub esp, 4
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x524]
mov dword [esp], eax
call esi
mov edx, 0x2ed
lea eax, [ebp - 0x534]
sub esp, 8
call fcn.00401cc0
mov dword [esp + 4], 0x7d0
mov eax, dword [ebp - 0x544]
mov dword [esp], eax
call esi
sub esp, 8
mov dword [ebp - 0x53c], eax
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2f2
mov eax, dword [ebp - 0x53c]
mov dword [esp + 4], 0x4367be
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401be0
jmp 0x403d79
call fcn.00431c30
mov dword [eax], 0x436036
mov dword [eax + 4], 0x2a7
mov dword [esp], 0x436568
call fcn.00401670
mov dword [esp], ebx
mov ebx, dword [sym.imp.winhttp.dll_WinHttpCloseHandle]
call ebx
mov eax, dword [ebp - 0x550]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x548]
sub esp, 4
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x524]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
xor edx, edx
jmp 0x403ce8