Function at 0x14016fa90
Capabilities:
Write file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x3f0
mov rax, qword [0x1402e1040]
xor rax, rsp
mov qword [rsp + 0x3e0], rax
xor esi, esi
mov rbp, rcx
mov rcx, qword [rsp + 0x450]
mov r13, r9
mov rdi, r8
mov qword [rsp + 0x40], rcx
mov rax, qword [rbp + 0x20]
mov dword [r9], esi
mov qword [rsp + 0x38], rax
mov qword [rcx], rsi
mov rax, qword [r8 + 0x88]
test rax, rax
je 0x14016fb38
mov rbx, qword [r8 + 0x68]
sub rbx, rax
mov rax, qword [r8 + 0x68]
cmp rbx, rax
ja 0x14016fb31
je 0x14016fb31
test rbx, rbx
jne 0x14016fb10
test rax, rax
je 0x14016fb0a
mov rax, qword [r8 + 0x60]
mov byte [rax], sil
mov qword [r8 + 0x68], rsi
jmp 0x14016fb31
mov rcx, qword [r8 + 0x60]
mov r8, rbx
mov rdx, rcx
sub rdx, rbx
add rdx, rax
call sub.VCRUNTIME140.dll_memmove
mov rax, qword [rdi + 0x60]
mov qword [rdi + 0x68], rbx
mov byte [rbx + rax], sil
mov qword [rdi + 0x88], rsi
cmp qword [rdi + 0x80], rsi
jne 0x14016fbd8
mov rax, qword [rbp + 0x20]
lea rcx, [rsp + 0x48]
mov qword [rsp + 0x20], rcx
lea r8, [rsp + 0x50]
mov rcx, rbp
mov dword [rsp + 0x48], esi
mov r9d, 0x384
xor edx, edx
call qword [rax + 0x230]
test rax, rax
mov rbx, rsi
cmovns rbx, rax
mov eax, dword [rsp + 0x48]
cmp eax, 0x51
jne 0x14016fb87
xor eax, eax
jmp 0x14016fdd1
test eax, eax
jne 0x14016fdd1
test rbx, rbx
jg 0x14016fbb6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.response_reading_failed__errno:__d_
mov rcx, rbp
mov r8d, eax
call fcn.140101e00
mov eax, gethostname
jmp 0x14016fdd1
mov r8, rbx
lea rdx, [rsp + 0x50]
lea rcx, [rdi + 0x60]
call fcn.1401002b0
test eax, eax
jne 0x14016fdd1
add dword [rbp + 0x120], ebx
add qword [rdi], rbx
mov r8, qword [rdi + 0x68]
mov edx, 0xa
mov qword [rsp + 0x438], r14
mov r14, qword [rdi + 0x60]
mov rcx, r14
call sub.VCRUNTIME140.dll_memchr
mov rsi, rax
test rax, rax
je 0x14016fdb8
sub rsi, r14
inc rsi
cmp byte [rbp + 0xa56], 0
je 0x14016fcb1
cmp qword [rbp + 0x270], 0
je 0x14016fc79
mov rcx, qword [rbp + 0xd8]
test rcx, rcx
je 0x14016fc37
cmp byte [rcx + 0x22b], 0
je 0x14016fc37
mov bl, 1
jmp 0x14016fc3e
xor bl, bl
test rcx, rcx
je 0x14016fc45
mov byte [rcx + 0x22b], 1
mov rax, qword [rbp + 0x1e8]
mov r9, rsi
mov r8, r14
mov qword [rsp + 0x20], rax
mov edx, 1
mov rcx, rbp
call qword [rbp + 0x270]
mov rax, qword [rbp + 0xd8]
test rax, rax
je 0x14016fcb1
mov byte [rax + 0x22b], bl
jmp 0x14016fcb1
mov r9, qword [rbp + 0x1e0]
lea rcx, [0x14026f8a3]
mov edx, 2
mov r8d, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov r9, qword [rbp + 0x1e0]
mov r8d, 1
mov rdx, rsi
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp qword [rbp + 0x148], 0
jne 0x14016fccd
mov rcx, rbp
call fcn.140100a90
mov ebx, eax
test eax, eax
jne 0x14016fe21
mov rdx, qword [rbp + 0x148]
test rdx, rdx
jne 0x14016fce0
mov ebx, reloc.WS2_32.dll_socket
jmp 0x14016fcf9
mov rax, qword [rdx]
mov r9, r14
mov r8d, 2
mov qword [rsp + 0x20], rsi
mov rcx, rbp
call qword [rax + Ordinal_26]
mov ebx, eax
mov r9, rsi
mov dword [rsp + 0x20], ebx
mov r8d, 2
lea rdx, str.client_write_type_x__len_zu______d
mov rcx, rbp
call fcn.1401022e0
test ebx, ebx
jne 0x14016fe21
mov rdx, qword [rsp + 0x38]
mov r9, rsi
mov r8, r14
mov qword [rsp + 0x20], r13
mov rcx, rbp
call qword [rdi + 0x98]
mov rbx, qword [rdi + 0x68]
test al, al
jne 0x14016fdf3
cmp rbx, rsi
jbe 0x14016fd82
mov rax, qword [rdi + 0x68]
sub rbx, rsi
cmp rbx, rax
ja 0x14016fd97
je 0x14016fd97
test rbx, rbx
jne 0x14016fd5f
test rax, rax
jmp 0x14016fd86
mov rcx, qword [rdi + 0x60]
mov r8, rbx
mov rdx, rcx
sub rdx, rbx
add rdx, rax
call sub.VCRUNTIME140.dll_memmove
mov rax, qword [rdi + 0x60]
mov qword [rdi + 0x68], rbx
mov byte [rbx + rax], 0
jmp 0x14016fd97
cmp rbx, 0
je 0x14016fd8f
mov rax, qword [rdi + 0x60]
mov byte [rax], 0
mov qword [rdi + 0x68], 0
mov r14, qword [rdi + 0x60]
mov edx, 0xa
mov r8, qword [rdi + 0x68]
mov rcx, r14
call sub.VCRUNTIME140.dll_memchr
mov rsi, rax
test rax, rax
jne 0x14016fc01
mov qword [rdi + 0x80], 0
mov byte [rdi + 8], 0
xor eax, eax
mov r14, qword [rsp + 0x438]
mov rcx, qword [rsp + 0x3e0]
xor rcx, rsp
call fcn.140171bd0
add rsp, 0x3f0
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov qword [rdi + 0x88], rsi
cmp rbx, rsi
jbe 0x14016fe04
sub rbx, rsi
jmp 0x14016fe06
xor ebx, ebx
mov rcx, qword [rsp + 0x40]
mov qword [rdi + 0x80], rbx
mov rax, qword [rdi]
mov qword [rcx], rax
mov qword [rdi], 0
jmp 0x14016fdc3
mov eax, ebx
jmp 0x14016fdc9