Function at 0x140078860
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xf]
sub rsp, 0xc8
mov rax, qword [0x140653828]
xor rax, rsp
mov qword [rbp - 9], rax
mov r13d, r9d
mov r12, r8
mov r15, rdx
mov rsi, rcx
mov rdx, qword [rbp + 0x77]
mov rbx, qword [rbp + 0x7f]
xor r14d, r14d
test rdx, rdx
je 0x140078c68
xorps xmm0, xmm0
movups xmmword [rbp - 0x61], xmm0
mov qword [rbp - 0x51], r14
mov qword [rbp - 0x49], r14
mov rdi, 0xffffffffffffffff
mov r8, rdi
inc r8
cmp byte [rdx + r8], r14b
jne 0x1400788c0
lea rcx, [rbp - 0x61]
call fcn.1400038e0
nop
mov rcx, qword [rbp - 0x51]
mov rdx, qword [rbp - 0x49]
mov rax, rdx
sub rax, rcx
cmp rax, 1
jb 0x140078904
lea rax, [rcx + 1]
mov qword [rbp - 0x51], rax
lea rax, [rbp - 0x61]
cmp rdx, 0x10
cmovae rax, qword [rbp - 0x61]
mov word [rax + rcx], 0x2e
jmp 0x140078924
mov qword [rsp + 0x20], 1
lea r9, [0x14015f2ec]
xor r8d, r8d
lea edx, [r8 + 1]
lea rcx, [rbp - 0x61]
call fcn.140003cd0
test rbx, rbx
je 0x1400789a4
mov r8d, dword [rbx]
inc qword [rbx]
lea rdx, [0x14014ddfc]
lea rcx, [rbp - 0x21]
call fcn.140014760
lea rax, [rbp - 0x21]
inc rdi
cmp byte [rax + rdi], 0
jne 0x140078943
mov rcx, qword [rbp - 0x51]
mov rdx, qword [rbp - 0x49]
mov rax, rdx
sub rax, rcx
cmp rdi, rax
ja 0x14007898c
lea rax, [rdi + rcx]
mov qword [rbp - 0x51], rax
lea rbx, [rbp - 0x61]
cmp rdx, 0x10
cmovae rbx, qword [rbp - 0x61]
add rbx, rcx
mov r8, rdi
lea rdx, [rbp - 0x21]
mov rcx, rbx
call sub.VCRUNTIME140.dll_memmove
mov byte [rdi + rbx], 0
jmp 0x1400789a4
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x21]
xor r8d, r8d
mov rdx, rdi
lea rcx, [rbp - 0x61]
call fcn.140003cd0
mov rcx, qword [rbp - 0x51]
mov rdx, qword [rbp - 0x49]
mov rax, rdx
sub rax, rcx
cmp rax, 4
jb 0x1400789db
lea rax, [rcx + 4]
mov qword [rbp - 0x51], rax
lea rax, [rbp - 0x61]
cmp rdx, 0x10
cmovae rax, qword [rbp - 0x61]
mov dword [rax + rcx], 0x7761722e
mov byte [rax + rcx + 4], 0
jmp 0x1400789fb
mov qword [rsp + 0x20], 4
lea r9, str..raw
xor r8d, r8d
lea edx, [r8 + 4]
lea rcx, [rbp - 0x61]
call fcn.140003cd0
xorps xmm0, xmm0
movups xmmword [rbp - 0x41], xmm0
mov qword [rbp - 0x31], 1
mov qword [rbp - 0x29], reloc.WS2_32.dll_ntohs
mov word [rbp - 0x41], 0x3d
mov rbx, qword [rbp - 0x51]
lea r9, [rbp - 0x61]
cmp qword [rbp - 0x49], 0x10
cmovae r9, qword [rbp - 0x61]
cmp rbx, 0xe
ja 0x140078a4e
lea rax, [rbx + 1]
mov qword [rbp - 0x31], rax
mov r8, rbx
mov rdx, r9
lea rcx, [rbp - 0x40]
call sub.VCRUNTIME140.dll_memmove
mov byte [rbp + rbx - 0x40], 0
jmp 0x140078a62
mov qword [rsp + 0x20], rbx
xor r8d, r8d
mov rdx, rbx
lea rcx, [rbp - 0x41]
call fcn.140003cd0
mov rax, qword [rsi]
mov r10, qword [rax + 0x108]
lea rax, [rbp - 0x41]
cmp qword [rbp - 0x29], 0x10
cmovae rax, qword [rbp - 0x41]
mov byte [rsp + 0x30], 0
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rax
mov r9d, r13d
mov r8, r12
mov rdx, r15
mov rcx, rsi
call r10
xor r8d, r8d
lea rdx, [rbp - 0x61]
lea rcx, [rbp - 0x21]
call fcn.1400f1ff0
nop
lea rcx, [rbp - 0x21]
call fcn.140100570
movzx ebx, al
lea rcx, [rbp - 0x21]
call fcn.1400f21f0
test bl, bl
jne 0x140078bda
lea rcx, [rbp - 0x61]
cmp qword [rbp - 0x49], 0x10
cmovae rcx, qword [rbp - 0x61]
lea rdx, [0x140162638]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rbx, rax
test rax, rax
je 0x140078bda
mov eax, dword [rsi + 0x30]
cmp eax, 0x11
je 0x140078b4a
cmp eax, 0x24
je 0x140078b4a
mov qword [rbp - 0x21], r14
mov rcx, qword [rsi]
mov r9, qword [rcx + 0x1a0]
lea r8, [rbp - 0x21]
lea rdx, [rbp - 0x79]
mov rcx, rsi
call r9
cmp byte [rbp - 0x69], 0
je 0x140078b26
mov rcx, qword [rbp - 0x71]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x21]
test rcx, rcx
je 0x140078bd0
mov r8d, dword [rsi + 0x60]
mov r9, rbx
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
jmp 0x140078bd0
mov qword [rbp - 0x21], r14
mov rax, qword [rsi]
lea r8, [rbp - 0x21]
lea rdx, [rbp - 0x79]
mov rcx, rsi
call qword [rax + 0x1b0]
cmp byte [rbp - 0x69], 0
je 0x140078b72
mov rcx, qword [rbp - 0x71]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r9, qword [rbp - 0x21]
test r9, r9
je 0x140078bd0
mov eax, dword [rsi + 0x60]
mov qword [rsp + 0x28], 2
mov dword [rsp + 0x20], eax
mov r8d, dword [reloc.WS2_32.dll_accept]
mov edx, 1
lea rcx, [rbp - 0x79]
call fcn.14008c940
cmp byte [rbp - 0x69], 0
je 0x140078bb0
mov rcx, qword [rbp - 0x71]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov dword [rsi + 0x78], 1
mov r8d, dword [rsi + 0x60]
shr r8, 1
mov r9, rbx
mov edx, 2
mov rcx, qword [rbp - 0x21]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
nop
mov rdx, qword [rbp - 0x29]
cmp rdx, 0x10
jb 0x140078c18
inc rdx
mov rcx, qword [rbp - 0x41]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140078c13
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140078c13
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140131388
mov qword [rbp - 0x31], r14
mov qword [rbp - 0x29], reloc.WS2_32.dll_ntohs
mov byte [rbp - 0x41], 0
mov rdx, qword [rbp - 0x49]
cmp rdx, 0x10
jb 0x140078c7a
inc rdx
mov rcx, qword [rbp - 0x61]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140078c61
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140078c61
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140131388
jmp 0x140078c7a
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], r14
mov rdx, r15
call fcn.140078500
mov rcx, qword [rbp - 9]
xor rcx, rsp
call fcn.140131030
add rsp, 0xc8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov rax, qword [rcx + 0xc0]
cmp rax, qword [rcx + 0xb0]
je 0x140078860
mov rax, qword [rax + 0x10]
mov rcx, qword [rax + 0x10]
mov r10, qword [rcx]
jmp qword [r10 + 0x30]