Function at 0x1000a020
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Reference http user-agent string

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100466b8
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x1005e068]
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 ecx, dword [ebp + 0xc]
mov ebx, 1
mov eax, dword [ebp + 8]
mov dword [ebp - 0x58], ecx
lea ecx, [ebp - 0x48]
push eax
call fcn.10009660
push 0
push 0
push 0
push 0
push str.Mozilla_5.0__Windows_NT_10.0__Win64__x64__AppleWebKit_537.36__KHTML__like_Gecko__Chrome_64.0.3282.140_Safari_537.36_Edge_17.17134
mov dword [ebp - 4], 0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ecx, eax
mov dword [ebp - 0x54], ecx
test ecx, ecx
jne 0x1000a09a
push str.Error:Open_session__n
call fcn.10001e90
add esp, 4
or ebx, 0xffffffff
jmp 0x1000a23f
cmp dword [ebp - 0x30], 8
lea eax, [ebp - 0x44]
push 0
push dword [ebp - 0x2c]
cmovae eax, dword [ebp - 0x44]
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov edx, eax
mov dword [ebp - 0x5c], edx
test edx, edx
jne 0x1000a0d0
push str.Error:Connect_failed__n
call fcn.10001e90
add esp, 4
or ebx, 0xffffffff
jmp 0x1000a23f
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x28]
mov eax, 0x800000
cmovae ecx, dword [ebp - 0x28]
xor esi, esi
cmp dword [ebp - 0x48], 2
cmovne eax, esi
push eax
push esi
push esi
push esi
push ecx
push 0x10056af8
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
test edi, edi
jne 0x1000a115
push str.Error:OpenRequest_failed__n
call fcn.10001e90
add esp, 4
or ebx, 0xffffffff
jmp 0x1000a23f
push 0
push 0
push 0
push 0
push 0
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x1000a141
push str.Error:SendRequest_failed__n
call fcn.10001e90
add esp, 4
or ebx, 0xffffffff
jmp 0x1000a23f
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x1000a163
push str.Error:EndRequest_failed__n
call fcn.10001e90
add esp, 4
or ebx, 0xffffffff
jmp 0x1000a23f
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x50], esi
push eax
push edi
mov dword [ebp - 0x4c], esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x1000a218
nop dword [eax]
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x1000a22c
push eax
call fcn.1001fd9a
mov esi, eax
add esp, 4
test esi, esi
je 0x1000a267
push dword [ebp - 0x4c]
push 0
push esi
call fcn.10022540
add esp, 0xc
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x4c]
push esi
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x1000a1d8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__u_in_WinHttpReadData._n
call fcn.10001e90
add esp, 8
or ebx, 0xffffffff
jmp 0x1000a1ef
push dword [ebp - 0x54]
mov eax, dword [ebp - 0x4c]
add eax, esi
push eax
mov eax, dword [ebp - 0x58]
mov ecx, eax
push esi
push dword [eax + 4]
call fcn.1000b0a0
push esi
call fcn.1001fdc6
add esp, 4
cmp dword [ebp - 0x50], 0
je 0x1000a22c
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x4c], 0
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x1000a180
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__u_in_WinHttpQueryDataAvailable._n
call fcn.10001e90
add esp, 8
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push edi
call esi
push dword [ebp - 0x5c]
call esi
push dword [ebp - 0x54]
call esi
lea ecx, [ebp - 0x48]
call fcn.10009f80
mov eax, ebx
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.1001f7ed
mov esp, ebp
pop ebp
ret 8
push str.Out_of_memory_n
call fcn.10001e90
add esp, 4
jmp 0x1000a22c