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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x412d78
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x41c268]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x1c]
mov esi, dword [ebp + 0x18]
mov ebx, dword [ebp + 0x2c]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x28], eax
xor edi, edi
push edi
push edi
push edi
push edi
push edi
mov dword [ebp - 4], 2
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x34], eax
test eax, eax
jne 0x40361b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x40377f
push 0
push 0
push dword [ebp + 8]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
mov dword [ebp - 0x2c], ecx
test ecx, ecx
jne 0x403645
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov edi, eax
jmp 0x40377a
cmp dword [ebp + 0x14], edi
mov edx, 0x800100
mov eax, 0x100
cmovne eax, edx
push eax
push esi
push 0
push 0
push dword [ebp + 0xc]
push dword [ebp + 0x10]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
test esi, esi
je 0x403758
mov ecx, dword [ebp + 0x24]
push 0
push ecx
push ecx
push dword [ebp - 0x24]
push 0xffffffffffffffff
push dword [ebp - 0x30]
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x403758
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x403758
push 0
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x18]
push eax
push 0
push 0x20000013
push esi
mov dword [ebp - 0x20], 4
mov dword [ebp - 0x18], edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x403758
cmp dword [ebp - 0x18], 0xc8
jne 0x403760
push 0
lea eax, [ebp - 0x20]
push eax
push ebx
push 0
push 0x20000005
push esi
mov dword [ebp - 0x20], 4
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x403758
mov eax, dword [ebx]
test eax, eax
je 0x403760
push eax
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x1c], edi
call fcn.00408447
mov edi, dword [ebp - 0x28]
mov dword [edi], eax
push dword [ebx]
push 0
push eax
call fcn.00408c30
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
add esp, 0x10
lea eax, [ebp - 0x14]
push eax
push esi
call ebx
test eax, eax
je 0x40374e
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [edi]
push dword [ebp - 0x14]
add eax, dword [ebp - 0x20]
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x40374e
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x20], eax
cmp dword [ebp - 0x14], 0
jne 0x403725
xor edi, edi
jmp 0x403760
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test esi, esi
je 0x40376f
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
jmp 0x403775
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [ebp - 0x2c]
call esi
push dword [ebp - 0x34]
call esi
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
or esi, 0xffffffff
mov byte [ebp - 4], 1
lea ecx, [edx + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4037a2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
mov ecx, esi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4037c2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0x10]
add edx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x4037e3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004087da
mov esp, ebp
pop ebp
ret