Function at 0x846c700
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 0x84f9eb8
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x184002c0]
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
mov dword [ebp - 4], 2
push edi
push edi
push edi
push edi
push dword [0x18404030]
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x34], eax
test eax, eax
jne 0x846c770
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x846c8da
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 0x846c79a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov edi, eax
jmp 0x846c8d5
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 0x846c8b3
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 0x846c8b3
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x846c8b3
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 0x846c8b3
cmp dword [ebp - 0x18], 0xc8
je 0x846c833
mov edi, 1
jmp 0x846c8bb
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 0x846c8b3
mov eax, dword [ebx]
test eax, eax
je 0x846c8bb
push eax
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x1c], edi
call fcn.0847e6ac
mov edi, dword [ebp - 0x28]
mov dword [edi], eax
push dword [ebx]
push 0
push eax
call fcn.0849dde0
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 0x846c8a9
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 0x846c8a9
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x20], eax
cmp dword [ebp - 0x14], 0
jne 0x846c880
xor edi, edi
jmp 0x846c8bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test esi, esi
je 0x846c8ca
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
jmp 0x846c8d0
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]
or esi, 0xffffffff
add edx, 0xfffffff0
mov byte [ebp - 4], 1
mov eax, esi
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x846c8fd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0xc]
mov ecx, esi
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x846c91d
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 0x846c93e
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.0849cd1e
mov esp, ebp
pop ebp
ret