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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10019168
mov eax, dword fs:[0]
push eax
sub esp, 0x8c
mov eax, dword [0x10021008]
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 - 0x8c], ecx
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x60]
mov esi, dword [ebp + 0xc]
push eax
mov dword [ebp - 0x88], 0
call fcn.10009e60
push 0
push 0
push 0
push 0
push str.Mozilla_5.0__Macintosh__Intel_Mac_OS_X_10_12_6__AppleWebKit_537.36__KHTML__like_Gecko__Chrome_73.0.3683.75_Safari_537.36
mov dword [ebp - 4], 0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ecx, eax
mov dword [ebp - 0x98], ecx
test ecx, ecx
jne 0x1000a398
push str.Error:Open_session__n
call fcn.100017a0
add esp, 4
or esi, 0xffffffff
jmp 0x1000a6cd
cmp dword [ebp - 0x48], 8
lea eax, [ebp - 0x5c]
push 0
push dword [ebp - 0x44]
cmovae eax, dword [ebp - 0x5c]
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov edx, eax
mov dword [ebp - 0x94], edx
test edx, edx
jne 0x1000a3d1
push str.Error:Connect_failed__n
call fcn.100017a0
add esp, 4
or esi, 0xffffffff
jmp 0x1000a6cd
cmp dword [ebp - 0x2c], 8
lea ecx, [ebp - 0x40]
mov eax, 0x800000
cmovae ecx, dword [ebp - 0x40]
xor edi, edi
cmp dword [ebp - 0x60], 2
cmovne eax, edi
push eax
push edi
push edi
push edi
push ecx
push str.POST
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
mov dword [ebp - 0x80], edi
test edi, edi
jne 0x1000a419
push str.Error:OpenRequest_failed__n
call fcn.100017a0
add esp, 4
or esi, 0xffffffff
jmp 0x1000a6cd
mov ecx, esi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1000a420
sub ecx, edx
mov edx, esi
push ecx
mov ecx, edi
call fcn.10009fb0
add esp, 4
test eax, eax
jne 0x1000a50d
cmp dword [ebp - 0x48], 8
lea eax, [ebp - 0x5c]
lea ecx, [ebp - 0x78]
cmovae eax, dword [ebp - 0x5c]
push eax
call fcn.10007710
lea edx, [ebp - 0x78]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.10013bd0
cmp dword [eax + 0x14], 0x10
jb 0x1000a469
mov eax, dword [eax]
push dword [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error:SendRequest_failed___d____s:_d_n
call fcn.100017a0
mov edx, dword [ebp - 0x14]
add esp, 0x10
cmp edx, 0x10
jb 0x1000a4b7
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1000a4ad
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1000a4ad
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.100174a3
add esp, 8
mov edx, dword [ebp - 0x64]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
cmp edx, 8
jb 0x1000a52e
mov ecx, dword [ebp - 0x78]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1000a4fb
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1000a4fb
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.100174a3
add esp, 8
or esi, 0xffffffff
jmp 0x1000a6cd
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x1000a536
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error:EndRequest_failed___d__n
call fcn.100017a0
add esp, 8
or esi, 0xffffffff
jmp 0x1000a6cd
xor ebx, ebx
mov dword [ebp - 0x84], 0
xor esi, esi
mov dword [ebp - 0x20], vtable.CBuffer.0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], esi
lea eax, [ebp - 0x7c]
mov byte [ebp - 4], 2
push eax
push edi
mov dword [ebp - 0x7c], esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x1000a63b
mov eax, dword [ebp - 0x7c]
test eax, eax
je 0x1000a64f
inc eax
push eax
call fcn.100175d7
mov edi, eax
add esp, 4
test edi, edi
je 0x1000a6f5
mov ecx, dword [ebp - 0x7c]
inc ecx
push ecx
push 0
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x84]
push eax
push dword [ebp - 0x7c]
push edi
push dword [ebp - 0x80]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x1000a5cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__u_in_WinHttpReadData._n
call fcn.100017a0
add esp, 8
jmp 0x1000a60d
mov eax, dword [ebp - 0x7c]
xor ecx, ecx
sub esi, ebx
mov dword [ebp - 0x90], eax
test ebx, ebx
cmove esi, ecx
lea ecx, [ebp - 0x20]
add eax, esi
push eax
call fcn.10001630
mov esi, dword [ebp - 0x18]
cmp eax, 0xffffffff
je 0x1000a60a
mov ebx, dword [ebp - 0x90]
push ebx
push edi
push esi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
add esi, ebx
mov dword [ebp - 0x18], esi
mov ebx, dword [ebp - 0x1c]
push edi
call fcn.100174d4
add esp, 4
cmp dword [ebp - 0x84], 0
je 0x1000a64f
lea eax, [ebp - 0x7c]
mov dword [ebp - 0x7c], 0
push eax
push dword [ebp - 0x80]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x1000a572
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__u_in_WinHttpQueryDataAvailable._n
call fcn.100017a0
add esp, 8
mov ecx, dword [ebp - 0x8c]
mov ecx, dword [ecx]
test ecx, ecx
je 0x1000a67c
test ebx, ebx
je 0x1000a67c
sub esi, ebx
je 0x1000a67c
mov eax, dword [ecx]
push esi
push ebx
call dword [eax + 4]
xor ecx, ecx
mov edx, 1
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x88], ecx
push dword [ebp - 0x80]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x94]
call esi
push dword [ebp - 0x98]
call esi
mov esi, dword [ebp - 0x88]
mov ecx, 0x1001b744
cmp esi, 1
mov eax, 0x1001b73c
cmovne eax, ecx
push eax
push str.____________________s__________________________________r_n
call fcn.100017a0
add esp, 8
test ebx, ebx
je 0x1000a6cd
push 0x8000
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
lea ecx, [ebp - 0x60]
call fcn.1000a710
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.10016f21
mov esp, ebp
pop ebp
ret 8
push str.Out_of_memory_n
call fcn.100017a0
add esp, 4
jmp 0x1000a64f