Function at 0x140004060
Capabilities:
Prepare http request
Read http header
Receive http response

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xf0
mov qword [rax - 0x30], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
movzx edi, r9b
mov rbx, r8
mov rsi, rdx
mov r14, rcx
xor r12d, r12d
mov qword [rsp + 0x88], r12
mov qword [rsp + 0xb0], r12
mov dword [rax + 0x20], 0x1f4
lea rcx, [rax - 0x80]
call qword [sym.imp.mfc120u.dll_Ordinal_296]
nop
mov rdx, rbx
lea rcx, [rsp + 0xb8]
call qword [sym.imp.mfc120u.dll_Ordinal_286]
nop
mov dword [rsp + 0x48], r12d
mov dword [rsp + 0xa4], 4
movzx eax, dil
neg al
sbb r8d, r8d
and r8d, 0x2000
or r8d, 0x1002
mov rdx, rbx
lea rcx, [rsp + 0xc0]
call qword [sym.imp.mfc120u.dll_Ordinal_486]
nop
test dil, dil
je 0x14000411a
xor edx, edx
lea r8d, [r12 + 2]
lea rcx, [rsp + 0xc0]
call qword [sym.imp.mfc120u.dll_Ordinal_12594]
mov r15d, r12d
mov rdx, rsi
lea rcx, [rsp + 0x40]
call qword [sym.imp.mfc120u.dll_Ordinal_286]
nop
xor bl, bl
lea r8, [0x140010974]
lea rdx, str.http:__
lea rcx, [rsp + 0x40]
call qword [sym.imp.mfc120u.dll_Ordinal_12313]
test eax, eax
jne 0x140004171
lea r8, [0x140010974]
lea rdx, str.https:__
lea rcx, [rsp + 0x40]
call qword [sym.imp.mfc120u.dll_Ordinal_12313]
movzx ebx, bl
mov ecx, 1
test eax, eax
cmovne ebx, ecx
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x78]
call qword [sym.imp.mfc120u.dll_Ordinal_280]
nop
xor r8d, r8d
lea rdx, [0x140010f94]
lea rcx, [rsp + 0x40]
call qword [sym.imp.mfc120u.dll_Ordinal_4467]
test eax, eax
js 0x1400041d4
mov edx, eax
lea rcx, [rsp + 0x40]
call qword [sym.imp.mfc120u.dll_Ordinal_13902]
lea r8, [0x140010974]
mov rdx, qword [rsp + 0x40]
lea rcx, [rsp + 0x78]
call qword [sym.imp.mfc120u.dll_Ordinal_12313]
mov r8, qword [rsp + 0x78]
xor edx, edx
lea rcx, [rsp + 0x98]
call qword [sym.imp.mfc120u.dll_Ordinal_7629]
xor r9d, r9d
mov rdx, qword [rsp + 0x40]
mov rcx, qword [r14 + 0x68]
test bl, bl
mov r8d, 0x1bb
jne 0x1400041ee
lea r8d, [r9 + 0x50]
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r13, rax
mov qword [rsp + 0x88], rax
test rax, rax
jne 0x140004220
mov dword [rsp + 0xa8], r12d
lea rdx, [0x140016400]
lea rcx, [rsp + 0xa8]
call sub.MSVCR120.dll__CxxThrowException
neg bl
sbb eax, eax
and eax, 0x800000
bts eax, 8
mov dword [rsp + 0x30], eax
xor ebx, ebx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
mov r8, qword [rsp + 0x98]
lea rdx, [0x140010f38]
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rsi, rax
mov qword [rsp + 0xb0], rax
test rax, rax
jne 0x14000427d
mov dword [rsp + 0x5c], ebx
lea rdx, [0x140016400]
lea rcx, [rsp + 0x5c]
call sub.MSVCR120.dll__CxxThrowException
mov qword [rsp + 0x28], rbx
lea rax, [rsp + 0xa4]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x48]
xor r8d, r8d
lea edx, [r8 + 5]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov ecx, dword [rsp + 0x48]
or edx, 0xffffffff
test eax, eax
cmove ecx, edx
mov dword [rsp + 0x48], ecx
mov edx, dword [r14 + 0x1c]
test edx, edx
je 0x1400042e4
mov r8d, dword [r14 + 0x10]
test r8d, r8d
je 0x1400042e4
mov r9d, dword [r14 + 0x14]
test r9d, r9d
je 0x1400042e4
mov eax, dword [r14 + 0x18]
test eax, eax
je 0x1400042e4
mov dword [rsp + 0x20], eax
mov rcx, qword [r14 + 0x68]
call qword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
mov dword [rsp + 0x70], 4
lea rcx, [rsp + 0x68]
call qword [sym.imp.mfc120u.dll_Ordinal_296]
nop
test dil, dil
je 0x14000430e
lea rcx, [rsp + 0xc0]
call qword [sym.imp.mfc120u.dll_Ordinal_5578]
mov r15, rax
mov dword [rsp + 0x4c], ebx
mov dword [rsp + 0x50], ebx
mov edi, 0x80c00
mov ecx, edi
call qword [sym.imp.mfc120u.dll_Ordinal_265]
mov r12, rax
lea r9d, [r15 - 1]
add r9d, edi
mov r8d, r15d
lea rdx, [0x140010f98]
lea rcx, [rsp + 0x68]
call qword [sym.imp.mfc120u.dll_Ordinal_4612]
mov rdx, qword [rsp + 0x68]
mov r8d, dword [rdx - 0x10]
test r8d, r8d
cmove rdx, rbx
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ebx
xor r9d, r9d
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x140004384
mov dword [rsp + 0x60], ebx
lea rdx, [0x140016400]
lea rcx, [rsp + 0x60]
call sub.MSVCR120.dll__CxxThrowException
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x1400043ae
mov dword [rsp + 0xa0], ebx
lea rdx, [0x140016400]
lea rcx, [rsp + 0xa0]
call sub.MSVCR120.dll__CxxThrowException
mov qword [rsp + 0x28], rbx
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x138]
xor r8d, r8d
mov edx, 0x20000013
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x1400043f5
mov dword [rsp + 0xac], ebx
lea rdx, [0x140016400]
lea rcx, [rsp + 0xac]
call sub.MSVCR120.dll__CxxThrowException
cmp dword [rsp + 0x138], 0x12c
jb 0x14000441d
mov dword [rsp + 0x80], ebx
lea rdx, [0x140016400]
lea rcx, [rsp + 0x80]
call sub.MSVCR120.dll__CxxThrowException
mov edi, ebx
mov rbx, r12
mov rax, qword [r14 + 0x48]
test rax, rax
je 0x14000444a
call rax
test al, al
jne 0x14000444a
xor r12d, r12d
mov dword [rsp + 0x54], r12d
lea rdx, [0x140016400]
lea rcx, [rsp + 0x54]
call sub.MSVCR120.dll__CxxThrowException
lea rdx, [rsp + 0x4c]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x14000447b
xor r12d, r12d
mov dword [rsp + 0x90], r12d
lea rdx, [0x140016400]
lea rcx, [rsp + 0x90]
call sub.MSVCR120.dll__CxxThrowException
lea r9, [rsp + 0x50]
mov r8d, dword [rsp + 0x4c]
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x1400044ae
xor r12d, r12d
mov dword [rsp + 0x58], r12d
lea rdx, [0x140016400]
lea rcx, [rsp + 0x58]
call sub.MSVCR120.dll__CxxThrowException
mov ecx, dword [rsp + 0x50]
add edi, ecx
add rbx, rcx
test ecx, ecx
jne 0x140004422
mov r8d, edi
mov rdx, r12
lea rcx, [rsp + 0xc0]
call qword [sym.imp.mfc120u.dll_Ordinal_14085]
lea rcx, [rsp + 0xc0]
call qword [sym.imp.mfc120u.dll_Ordinal_4596]
add r15d, edi
cmp edi, 0x80c00
mov ebx, 0
mov edi, 0x80c00
jae 0x140004326
mov rcx, r12
call qword [sym.imp.mfc120u.dll_Ordinal_1486]
nop
lea rcx, [rsp + 0x68]
call qword [sym.imp.mfc120u.dll_Ordinal_1030]
nop
lea rcx, [rsp + 0x78]
call qword [sym.imp.mfc120u.dll_Ordinal_1030]
nop
lea rcx, [rsp + 0x40]
call qword [sym.imp.mfc120u.dll_Ordinal_1030]
nop
lea rcx, [rsp + 0xc0]
call qword [sym.imp.mfc120u.dll_Ordinal_1117]
nop
jmp 0x140004549
test r13, r13
je 0x140004557
mov rcx, r13
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test rsi, rsi
je 0x140004565
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [rsp + 0x138], 0x12c
setb bl
lea rcx, [rsp + 0xb8]
call qword [sym.imp.mfc120u.dll_Ordinal_1030]
nop
lea rcx, [rsp + 0x98]
call qword [sym.imp.mfc120u.dll_Ordinal_1030]
movzx eax, bl
lea r11, [rsp + 0xf0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret