Function at 0x4baab0
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 0x4f7f48
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x529748]
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 dword [ebp - 0x24], edx
mov esi, ecx
mov eax, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x24]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x28], eax
xor edi, edi
mov dword [ebp - 4], 2
push edi
push edi
push edi
push edi
push dword [0x530354]
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x38], eax
test eax, eax
jne 0x4bab22
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x4bac8d
push 0
push 0
push dword [ebp + 8]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
mov dword [ebp - 0x30], ecx
test ecx, ecx
jne 0x4bab4c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov edi, eax
jmp 0x4bac88
mov edx, 0x800100
test esi, esi
mov eax, pe_nt_image_headers32
cmovne eax, edx
push eax
push dword [ebp - 0x24]
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 0x4bac66
mov ecx, dword [ebp + 0x1c]
push 0
push ecx
push ecx
push dword [ebp - 0x2c]
push 0xffffffffffffffff
push dword [ebp - 0x34]
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x4bac66
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x4bac66
push 0
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 4
push eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], edi
push eax
push 0
push 0x20000013
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x4bac66
cmp dword [ebp - 0x18], 0xc8
je 0x4babe6
mov edi, 1
jmp 0x4bac6e
push 0
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 4
push eax
push ebx
push 0
push 0x20000005
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x4bac66
mov eax, dword [ebx]
test eax, eax
je 0x4bac6e
push eax
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x1c], edi
call fcn.004bc57c
mov edi, dword [ebp - 0x28]
mov dword [edi], eax
push dword [ebx]
push 0
push eax
call fcn.004c1b90
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 0x4bac5c
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x14]
mov eax, dword [edi]
add eax, dword [ebp - 0x20]
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x4bac5c
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x20], eax
cmp dword [ebp - 0x14], 0
jne 0x4bac33
xor edi, edi
jmp 0x4bac6e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test esi, esi
je 0x4bac7d
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
jmp 0x4bac83
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [ebp - 0x30]
call esi
push dword [ebp - 0x38]
call esi
mov byte [ebp - 4], 1
or esi, 0xffffffff
mov edx, dword [ebp + 8]
mov eax, esi
add edx, 0xfffffff0
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4bacb0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, esi
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4bacd0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp + 0x10]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x4bacf1
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.004bd963
mov esp, ebp
pop ebp
ret