Function at 0x1400020b0
Capabilities:
Initialize winhttp library
Link many functions at runtime
Prepare http request
Read http header
Receive http response
Reference http user-agent string

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xd0
mov rax, qword [0x140011040]
xor rax, rsp
mov qword [rbp + 0x2f], rax
lea rcx, str.kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rbx, rax
test rax, rax
jne 0x140002124
lea rdx, str.Failed_to_get_handle_to_kernel32.dll
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140002c60
mov rcx, rax
lea rdx, [0x140002e40]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov eax, 1
jmp 0x1400024a8
lea rdx, str.VirtualAlloc
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rsi, rax
lea rdx, str.VirtualFree
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r12, rax
lea rdx, str.VirtualProtect
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r13, rax
lea rdx, str.CreateThread
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbp - 0x59], rax
lea rdx, str.WaitForSingleObject
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbp - 0x51], rax
lea rdx, str.CloseHandle
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbp - 0x49], rax
xor ebx, ebx
mov dword [rbp - 0x41], ebx
mov dword [rbp - 0x39], 4
xorps xmm0, xmm0
movups xmmword [rbp + 0xf], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x1f], xmm1
mov r8d, 0x1a
lea rdx, str.http:__127.0.0.1:8181_test
lea rcx, [rbp + 0xf]
call fcn.140002e80
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x11], xmm0
movdqa xmm1, xmmword [0x14000dc40]
movdqu xmmword [rbp - 1], xmm1
mov word [rbp - 0x11], bx
movups xmmword [rbp - 0x31], xmm0
movdqu xmmword [rbp - 0x21], xmm1
mov word [rbp - 0x31], bx
lea r9, [rbp - 0x31]
lea r8, [rbp - 0x3d]
lea rdx, [rbp - 0x11]
lea rcx, [rbp + 0xf]
call fcn.1400017b0
test al, al
jne 0x140002236
lea rdx, str.Failed_to_parse_URL
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140002c60
mov rcx, rax
lea rdx, [0x140002e40]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov ebx, 1
jmp 0x1400023b9
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, str.Mozilla_5.0__Windows_NT_10.0__Win64__x64__MyApplication_1.0
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov r14, rax
test rax, rax
je 0x1400023b9
lea rdx, [rbp - 0x11]
cmp qword [rbp + 7], 7
cmova rdx, qword [rbp - 0x11]
xor r9d, r9d
movzx r8d, word [rbp - 0x3d]
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r15, rax
test rax, rax
je 0x1400023af
lea r8, [rbp - 0x31]
cmp qword [rbp - 0x19], 7
cmova r8, qword [rbp - 0x31]
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
xor r9d, r9d
lea rdx, [0x14000d628]
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov rdi, rax
test rax, rax
je 0x1400023a6
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ebx
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x14000239d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x14000239d
mov qword [rsp + 0x28], rbx
lea rax, [rbp - 0x39]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x41]
xor r8d, r8d
mov edx, 0x20000005
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x14000239d
mov edx, dword [rbp - 0x41]
xor ecx, ecx
mov r9d, 4
mov r8d, 0x1000
call rsi
mov rsi, rax
test rax, rax
je 0x14000239d
mov rdx, rax
mov rcx, rdi
call fcn.140001ea0
test rax, rax
je 0x14000238f
mov edx, dword [rbp - 0x41]
lea r9, [rbp - 0x3d]
mov r8d, 0x20
mov rcx, rsi
call r13
test eax, eax
je 0x14000238f
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], ebx
xor r9d, r9d
mov r8, rsi
xor edx, edx
xor ecx, ecx
call qword [rbp - 0x59]
mov rbx, rax
mov edx, 0xffffffff
mov rcx, rax
call qword [rbp - 0x51]
mov rcx, rbx
call qword [rbp - 0x49]
xor ebx, ebx
xor edx, edx
mov r8d, 0x8000
mov rcx, rsi
call r12
mov rcx, rdi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
nop
mov rdx, qword [rbp - 0x19]
cmp rdx, 7
jbe 0x1400023fc
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x31]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400023f7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400023f7
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000b0bc
movdqa xmm0, xmmword [0x14000dc40]
movdqu xmmword [rbp - 0x21], xmm0
xor edi, edi
mov word [rbp - 0x31], di
mov rdx, qword [rbp + 7]
cmp rdx, 7
jbe 0x14000245a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x11]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000244d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000244d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000b0bc
movdqa xmm0, xmmword [0x14000dc40]
movdqu xmmword [rbp - 1], xmm0
mov word [rbp - 0x11], di
mov rdx, qword [rbp + 0x27]
cmp rdx, 7
jbe 0x1400024a6
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0xf]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400024a1
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400024a1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000b0bc
mov eax, ebx
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.14000b060
lea r11, [rsp + 0xd0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret