Function at 0x57984a
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58c999
mov eax, dword fs:[0]
push eax
mov eax, 0x10018
call fcn.00531f80
mov eax, dword [0x5ee10c]
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 edi, ecx
mov dword [ebp - 0x1001c], edi
mov dword [ebp - 4], 1
lea edx, [ebp + 0x20]
cmp dword [ebp + 0x34], 8
lea eax, [ebp + 8]
cmovae edx, dword [ebp + 0x20]
cmp dword [ebp + 0x1c], 8
push edx
cmovae eax, dword [ebp + 8]
push eax
push str.makeGETRequest_http:___s_s
call fcn.00578f9d
xor ebx, ebx
lea eax, [ebp - 0x10010]
push 0x10000
push ebx
push eax
mov esi, ebx
mov dword [ebp - 0x10014], ebx
mov dword [ebp - 0x10018], ebx
call fcn.0054ae60
add esp, 0x18
push ebx
push ebx
push ebx
push ebx
push 0x5c7bfc
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ecx, eax
test ecx, ecx
jne 0x579901
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push str.Error__u_in_WinHttpOpen._n
mov esi, eax
call fcn.00579160
pop ecx
pop ecx
jmp 0x579a50
cmp dword [ebp + 0x1c], 8
lea eax, [ebp + 8]
push ebx
cmovae eax, dword [ebp + 8]
push 0x50
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
test ecx, ecx
jne 0x57992b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push str.Error__u_in_WinHttpConnect._n
jmp 0x5798f3
cmp dword [ebp + 0x34], 8
lea eax, [ebp + 0x20]
push ebx
cmovae eax, dword [ebp + 0x20]
push ebx
push ebx
push ebx
push eax
push 0x5c30a0
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov ebx, eax
test ebx, ebx
jne 0x57995b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push str.Error__u_in_WinHttpOpenRequest._n
jmp 0x5798f3
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
cmp eax, 1
je 0x579982
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
push ebx
push str.Error__u_in_WinHttpSendRequest._n
jmp 0x5798f3
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov ecx, dword [ebp - 0x10014]
xor edx, edx
test eax, eax
lea eax, [ebp - 0x10014]
push eax
cmovne ecx, edx
push ebx
mov dword [ebp - 0x10014], ecx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x5799ca
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.Error__u_in_WinHttpQueryDataAvailable._n
call fcn.00579160
pop ecx
pop ecx
jmp 0x579a4e
mov eax, dword [ebp - 0x10014]
xor edi, edi
test eax, eax
je 0x579a48
lea ecx, [ebp - 0x10018]
push ecx
push eax
lea eax, [ebp - 0x10010]
add eax, edi
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x579a18
add edi, dword [ebp - 0x10014]
lea eax, [ebp - 0x10014]
and dword [ebp - 0x10014], esi
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
mov eax, dword [ebp - 0x10014]
test eax, eax
jne 0x5799d6
jmp 0x579a2d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.Error__u_in_WinHttpReadData._n
call fcn.00579160
pop ecx
pop ecx
test edi, edi
je 0x579a48
push edi
mov edi, dword [ebp - 0x1001c]
lea eax, [ebp - 0x10010]
push eax
mov ecx, edi
call fcn.0040362e
jmp 0x579a4e
mov edi, dword [ebp - 0x1001c]
xor ebx, ebx
cmp dword [edi + 0x14], 0x10
jb 0x579a58
mov edi, dword [edi]
push esi
push edi
push str.makeGETRequest_returned__s_with_error__d
call fcn.00579160
sub esp, 0xc
mov ecx, esp
mov dword [ebp - 0x1001c], esp
push 0x5c2fd4
call fcn.004036c4
sub esp, 0x18
mov byte [ebp - 4], 2
mov ecx, esp
mov dword [ebp - 0x10020], esp
push 0x5c2d2e
call fcn.004036c4
sub esp, 0x18
mov byte [ebp - 4], 3
mov ecx, esp
push str.makeGETRequest
call fcn.004036c4
mov dl, bl
mov byte [ebp - 4], 1
mov ecx, esi
call fcn.00571a9e
add esp, 0x48
lea ecx, [ebp + 8]
push ebx
push 1
call fcn.00403a16
push ebx
push 1
lea ecx, [ebp + 0x20]
call fcn.00403a16
mov eax, esi
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.00531192
mov esp, ebp
pop ebp
ret