Function at 0x140017400
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x90
mov qword [rbp - 0x11], 0xfffffffffffffffe
mov qword [rsp + 0xe0], rbx
mov rax, qword [0x140108708]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov esi, edx
mov rbx, rcx
cmp edx, 0xffffffff
jne 0x14001744c
xor eax, eax
cmp edx, edx
cmovne eax, edx
jmp 0x1400176bf
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140017486
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140017486
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov rdx, qword [rbx + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], sil
mov eax, esi
jmp 0x1400176bf
cmp qword [rbx + 0x80], 0
jne 0x140017498
or eax, 0xffffffff
jmp 0x1400176bf
mov r8, qword [rbx + 0x18]
lea rax, [rbx + 0x70]
cmp qword [r8], rax
jne 0x1400174c5
mov rdx, qword [rbx + 0x90]
mov rcx, qword [rbx + 0x88]
mov qword [r8], rcx
mov rax, qword [rbx + 0x38]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbx + 0x50]
mov dword [rax], edx
cmp qword [rbx + 0x68], 0
jne 0x1400174e9
movsx ecx, sil
mov rdx, qword [rbx + 0x80]
call fcn.14009ac20
or ebx, 0xffffffff
cmp eax, ebx
cmovne ebx, esi
jmp 0x1400176bd
mov byte [rbp - 0x29], sil
mov edx, reloc.WS2_32.dll_ntohs
mov qword [rbp + 0xf], rdx
mov byte [rbp - 9], 0
xor ecx, ecx
mov qword [rbp - 9], rcx
mov qword [rbp + 7], 8
lea rax, [rbp - 9]
cmp rdx, 0x10
cmovae rax, rcx
mov byte [rax + 8], cl
mov rdx, qword [rbp - 9]
mov r8, qword [rbp + 0xf]
lea r9, vtable.std::codecvt_char__char__struct__Mbstatet_.0
nop word [rax + rax]
lea rcx, [rbp - 9]
cmp r8, 0x10
cmovae rcx, rdx
lea rdi, [rbp - 9]
cmovae rdi, rdx
mov r14, qword [rbx + 0x68]
mov r12, qword [rbp + 7]
add r12, rcx
mov rax, qword [r14]
mov r15, qword [rax + 0x38]
cmp rax, r9
je 0x14001763e
mov rcx, r15
call qword [fcn.1400017d0]
lea rax, [rbp - 0x19]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], rdi
lea rax, [rbp - 0x21]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x28]
lea r8, [rbp - 0x29]
lea rdx, [rbx + 0x74]
mov rcx, r14
call r15
test eax, eax
js 0x140017639
cmp eax, 1
jg 0x140017634
lea rax, [rbp - 9]
mov rdx, qword [rbp - 9]
mov r8, qword [rbp + 0xf]
cmp r8, 0x10
cmovae rax, rdx
mov rdi, qword [rbp - 0x19]
sub rdi, rax
je 0x1400175f1
lea rcx, [rbp - 9]
cmp r8, 0x10
cmovae rcx, rdx
mov r9, qword [rbx + 0x80]
mov r8, rdi
mov edx, 1
call fcn.14009f4b0
mov r8, qword [rbp + 0xf]
mov rdx, qword [rbp - 9]
cmp rdi, rax
jne 0x14001762b
mov byte [rbx + 0x71], 1
lea rax, [rbp - 0x29]
cmp qword [rbp - 0x21], rax
jne 0x140017630
test rdi, rdi
lea r9, vtable.std::codecvt_char__char__struct__Mbstatet_.0
jne 0x140017530
cmp qword [rbp + 7], 0x20
jae 0x14001762b
xor r8d, r8d
lea edx, [r8 + 8]
lea rcx, [rbp - 9]
call fcn.140019c00
jmp 0x140017517
or ebx, 0xffffffff
jmp 0x14001766a
mov ebx, esi
jmp 0x14001766a
cmp eax, 3
je 0x14001764a
or ebx, 0xffffffff
jmp 0x140017662
lea rax, [rbp - 0x29]
mov qword [rbp - 0x21], rax
mov qword [rbp - 0x19], rdi
movsx ecx, byte [rbp - 0x29]
mov rdx, qword [rbx + 0x80]
call fcn.14009ac20
or ebx, 0xffffffff
cmp eax, ebx
cmovne ebx, esi
mov rdx, qword [rbp - 9]
mov r8, qword [rbp + 0xf]
cmp r8, 0x10
jb 0x1400176bd
lea rax, [r8 + 1]
cmp rax, 0x1000
jb 0x1400176b5
test byte [rbp - 9], 0x1f
je 0x140017688
call fcn.14009eefc
int3
mov rax, qword [rdx - 8]
cmp rax, rdx
jb 0x140017697
call fcn.14009eefc
int3
sub rdx, rax
cmp rdx, 8
jae 0x1400176a6
call fcn.14009eefc
int3
cmp rdx, 0x27
jbe 0x1400176b2
call fcn.14009eefc
int3
mov rdx, rax
mov rcx, rdx
call fcn.140077f98
mov eax, ebx
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140077880
mov rbx, qword [rsp + 0xe0]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret