Function at 0x527e10
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov rsi, qword [rsp + 0xc8]
mov rdi, qword [rsp + 0xd0]
mov r15, qword [rsp + 0xc0]
test rsi, rsi
lea r14, [rdi + 0x3c]
lea rax, [rsi + 0x3c]
cmove rax, r14
mov rbx, rcx
mov ecx, dword [rcx]
mov qword [rsp + 0x40], rdx
xor edx, edx
mov ebp, r8d
mov r12, r9
mov qword [rsp + 0x38], rax
call fcn.004f1e20
mov ecx, dword [rbx]
mov edx, 4
mov r13, rax
call fcn.004f1e20
mov ecx, dword [rbx]
mov edx, 5
mov r14, rax
call fcn.004f1e20
mov ecx, dword [rbx]
mov edx, 6
mov qword [rsp + 0x48], rax
call fcn.004f1e20
cmp qword [r15 + 8], 0
mov qword [rsp + 0x30], rax
je 0x5280f0
test rdi, rdi
je 0x52812f
test rsi, rsi
je 0x5280a0
mov rdx, qword [rdi + 0x18]
mov rcx, qword [rsi + 0x18]
call sub.msvcrt.dll_strcmp
cmp eax, 1
sbb ebx, ebx
and ebx, 0x1c
add ebx, 0x21
mov qword [r12 + 8], 0
mov rax, qword [r12 + 0x10]
cmp rax, qword [0x005ab200]
je 0x528190
mov byte [rax], 0
cmp bl, 0x21
cmovne r14, qword [rsp + 0x30]
mov rcx, r14
call sub.msvcrt.dll_strlen
mov rdx, r14
mov rcx, r12
mov r8, rax
call fcn.00472fb0
test rsi, rsi
je 0x528140
mov rax, qword [0x005aac30]
lea rdx, [rsi + 0x3c]
mov r8d, dword [rax]
mov rax, qword [0x005ab240]
mov rcx, qword [rax]
call fcn.0046ccf0
lea rdx, str._d:___s
mov rcx, r12
mov r8, rax
mov eax, dword [rsi + 0x20]
mov qword [rsp + 0x20], r8
mov r8d, ebp
lea r9d, [rax + 1]
call fcn.004737e0
cmp bl, 0x21
je 0x52816b
mov rdx, qword [r12]
test rdx, rdx
je 0x5280b8
mov rax, qword [r12 + 8]
sub rdx, rax
cmp rdx, 1
je 0x5280b8
mov rdx, qword [r12 + 0x10]
lea rcx, [rax + 1]
mov qword [r12 + 8], rcx
mov byte [rdx + rax], bl
mov rdx, qword [r12 + 0x10]
mov rax, qword [r12 + 8]
mov byte [rdx + rax], 0
cmp bl, 0x21
je 0x5281f0
test rdi, rdi
je 0x5281c0
mov rax, qword [0x005aac30]
lea rdx, [rdi + 0x3c]
mov r8d, dword [rax]
mov rax, qword [0x005ab240]
mov rcx, qword [rax]
call fcn.0046ccf0
lea rdx, str.__d:___s
mov rcx, r12
mov r8, rax
mov eax, dword [rdi + 0x20]
mov qword [rsp + 0x20], r8
mov r8d, ebp
lea r9d, [rax + 1]
call fcn.004737e0
mov rax, qword [0x005ab240]
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rax]
call fcn.004d8970
mov r14, rax
test rax, rax
je 0x52805b
cmp bl, 0x21
je 0x528210
mov rdx, qword [r12]
test rdx, rdx
je 0x5280d0
mov rax, qword [r12 + 8]
sub rdx, rax
cmp rdx, 1
je 0x5280d0
mov rdx, qword [r12 + 0x10]
lea rcx, [rax + 1]
mov r8, r12
mov qword [r12 + 8], rcx
mov ecx, 5
mov byte [rdx + rax], 0x20
mov rdx, qword [r12 + 0x10]
mov rax, qword [r12 + 8]
mov byte [rdx + rax], 0
mov rdx, r14
call fcn.00527960
mov r8, r13
mov rcx, r12
lea rdx, [0x0059ebfb]
call fcn.004737e0
mov rax, qword [rsp + 0x40]
mov rdx, qword [r12 + 8]
mov r8d, 1
mov rcx, qword [r12 + 0x10]
mov r9, qword [rax]
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sub.msvcrt.dll_fwrite
mov rax, qword [rsp + 0x48]
mov ebx, 0x3e
mov qword [rsp + 0x30], rax
jmp 0x527ecc
mov edx, 1
mov rcx, r12
call fcn.004727c0
mov rax, qword [r12 + 8]
jmp 0x527f78
mov edx, 1
mov rcx, r12
call fcn.004727c0
mov rax, qword [r12 + 8]
jmp 0x52802b
mov rax, qword [0x005aac30]
mov rdx, qword [rsp + 0x38]
mov r8d, dword [rax]
mov rax, qword [0x005ab240]
mov rcx, qword [rax]
call fcn.0046ccf0
mov rcx, rax
call sub.msvcrt.dll_strlen
mov edx, 0x2d
mov rcx, r15
mov r8, rax
call fcn.00473530
test rdi, rdi
jne 0x527eab
mov qword [rsp + 0x30], r14
mov ebx, 0x3c
jmp 0x527ecc
mov rax, qword [r15 + 0x10]
mov r8d, ebp
mov rcx, r12
lea r9, [0x0059ebcc]
lea rdx, str._s:___s
mov qword [rsp + 0x20], rax
call fcn.004737e0
cmp bl, 0x21
jne 0x527f59
mov r9, qword [rsp + 0x30]
mov r8, r13
lea rdx, [0x0059ebe2]
mov rcx, r12
call fcn.004737e0
jmp 0x527f59
cmp byte [rax], 0
je 0x527eea
mov r8d, 0xa8
lea rdx, [0x0059ebb0]
lea rcx, [0x0059ebb9]
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x527eea
mov rax, qword [r15 + 0x10]
mov r8d, ebp
mov rcx, r12
lea r9, [0x0059ebcc]
lea rdx, str.__s:___s
mov qword [rsp + 0x20], rax
call fcn.004737e0
jmp 0x527fe7
mov r9, qword [rsp + 0x48]
mov r8, r13
lea rdx, [0x0059ebe2]
mov rcx, r12
call fcn.004737e0
jmp 0x527fa0
mov r9, qword [rsp + 0x30]
mov r8, r13
lea rdx, [0x0059ebe2]
mov rcx, r12
call fcn.004737e0
jmp 0x52800c