Function at 0x140002280
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0x90
mov qword [rbp - 0x19], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov r14d, edx
mov rdi, rcx
cmp edx, 0xffffffff
jne 0x1400022c6
xor eax, eax
jmp 0x140002553
mov rax, qword [rcx + 0x40]
mov rdx, qword [rax]
test rdx, rdx
je 0x140002301
mov rax, qword [rcx + 0x58]
movsxd r8, dword [rax]
lea rcx, [rdx + r8]
cmp rdx, rcx
jae 0x140002301
lea ecx, [r8 - 1]
mov dword [rax], ecx
mov rdx, qword [rdi + 0x40]
mov r8, qword [rdx]
lea rcx, [r8 + 1]
mov qword [rdx], rcx
mov byte [r8], r14b
mov eax, r14d
jmp 0x140002553
cmp qword [rdi + 0x90], 0
jne 0x140002314
or rax, 0xffffffffffffffff
jmp 0x140002553
mov rax, qword [rdi + 0x18]
mov rcx, qword [rax]
lea rax, [rdi + 0x80]
cmp rcx, rax
jne 0x14000233b
mov rdx, qword [rdi + 0x68]
mov r9, qword [rdi + 0x70]
mov r8, rdx
mov rcx, rdi
call qword [sym.imp.MSVCP120.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char____ptr64__char____ptr64__char____ptr64____ptr64]
cmp qword [rdi + 0x78], 0
jne 0x140002362
movsx ecx, r14b
mov rdx, qword [rdi + 0x90]
call qword [sym.imp.MSVCR120.dll_fputc]
or rsi, 0xffffffffffffffff
cmp eax, esi
cmovne esi, r14d
jmp 0x140002551
mov byte [rbp - 1], r14b
mov edx, 0xf
mov qword [rbp + 0x1f], rdx
mov byte [rbp + 7], 0
xor ecx, ecx
mov qword [rbp + 7], rcx
mov qword [rbp + 0x17], 8
lea rax, [rbp + 7]
cmp rdx, 0x10
cmovae rax, rcx
mov byte [rax + 8], cl
or rsi, 0xffffffffffffffff
xor r12d, r12d
mov rdx, qword [rbp + 0x1f]
mov r8, qword [rbp + 0x17]
nop
lea rax, [rbp + 7]
cmp rdx, 0x10
cmovae rax, qword [rbp + 7]
lea rcx, [rbp + 7]
cmovae rcx, qword [rbp + 7]
add rax, r8
lea rdx, [rbp - 9]
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rcx
lea rax, [rbp - 0x11]
mov qword [rsp + 0x20], rax
lea r9, [rbp]
lea r8, [rbp - 1]
lea rdx, [rdi + 0x84]
mov rcx, qword [rdi + 0x78]
call qword [sym.imp.MSVCP120.dll_public:_int___cdecl_std::codecvt_char__char__int_::out_int____ptr64__char_const____ptr64__char_const____ptr64__char_const____ptr64____ptr64__char____ptr64__char____ptr64__char____ptr64____ptr64_const___ptr64]
test eax, eax
js 0x14000253d
cmp eax, 1
jg 0x140002520
lea rax, [rbp + 7]
mov r9, qword [rbp + 7]
mov rdx, qword [rbp + 0x1f]
cmp rdx, 0x10
cmovae rax, r9
mov rbx, qword [rbp - 9]
sub rbx, rax
je 0x14000244a
lea rcx, [rbp + 7]
cmp rdx, 0x10
cmovae rcx, r9
mov r9, qword [rdi + 0x90]
mov r8, rbx
mov edx, 1
call qword [sym.imp.MSVCR120.dll_fwrite]
mov rdx, qword [rbp + 0x1f]
cmp rbx, rax
jne 0x140002541
mov byte [rdi + 0x81], 1
lea rax, [rbp - 1]
cmp qword [rbp - 0x11], rax
jne 0x14000251b
mov r8, qword [rbp + 0x17]
test rbx, rbx
jne 0x1400023a0
cmp r8, 0x20
jae 0x140002541
mov rax, rsi
sub rax, r8
cmp rax, 8
jbe 0x14000250d
lea rbx, [r8 + 8]
cmp rbx, 0xfffffffffffffffe
ja 0x1400024ff
cmp rdx, rbx
jae 0x1400024ab
mov rdx, rbx
lea rcx, [rbp + 7]
call fcn.140003620
mov rdx, qword [rbp + 0x1f]
mov r8, qword [rbp + 0x17]
jmp 0x1400024c9
test rbx, rbx
jne 0x1400024d2
mov qword [rbp + 0x17], r12
lea rax, [rbp + 7]
cmp rdx, 0x10
cmovae rax, qword [rbp + 7]
mov byte [rax], r12b
jmp 0x140002397
test rbx, rbx
je 0x1400023a0
lea rax, [rbp + 7]
cmp rdx, 0x10
cmovae rax, qword [rbp + 7]
xor ecx, ecx
mov qword [r8 + rax], rcx
mov qword [rbp + 0x17], rbx
lea rax, [rbp + 7]
cmp qword [rbp + 0x1f], 0x10
cmovae rax, qword [rbp + 7]
mov byte [rbx + rax], cl
jmp 0x140002397
lea rcx, str.string_too_long
call qword [sym.imp.MSVCP120.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_]
int3
lea rcx, str.string_too_long
call qword [sym.imp.MSVCP120.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_]
int3
mov esi, r14d
jmp 0x140002541
cmp eax, 3
jne 0x14000253d
movsx ecx, byte [rbp - 1]
mov rdx, qword [rdi + 0x90]
call qword [sym.imp.MSVCR120.dll_fputc]
cmp eax, 0xffffffff
cmovne esi, r14d
mov rdx, qword [rbp + 0x1f]
cmp rdx, 0x10
jb 0x140002551
mov rcx, qword [rbp + 7]
call qword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void____ptr64_]
mov eax, esi
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.140003c50
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret