Function at 0x40b4b0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov eax, dword [0x00513ec0]
test eax, eax
mov qword [rsp + 0x80], rcx
mov r13, rdx
mov rsi, r8
je 0x40b733
mov rbp, qword [0x00506000]
test dword [rbp], 0x100
jne 0x40b710
cmp rsi, r13
jbe 0x40b5c8
mov rax, qword [0x00505fb0]
mov rdi, qword [0x00505fd0]
mov r15, qword [0x00505fc0]
mov qword [rsp + 0x20], rax
jmp 0x40b527
mov r12d, 1
add r13, r12
cmp rsi, r13
jbe 0x40b5c8
mov rax, qword [r15]
mov rbx, r13
sub rbx, qword [rax + 0x28]
add rbx, qword [rdi]
cmp byte [rbx], 0xfb
jne 0x40b515
test dword [rbp], 0x100
jne 0x40b5e0
movzx ecx, byte [rbx + 1]
call fcn.0040b320
test eax, eax
je 0x40b558
cmp eax, 0xd
jne 0x40b515
lea rcx, [rbx + 1]
call fcn.0040b420
lea r12d, [rax + 1]
movsxd rax, r12d
add rbx, rax
movzx ecx, byte [rbx]
call fcn.0040b320
mov r14d, eax
cmp r14d, 0x14
ja 0x40b515
mov eax, 1
mov ecx, r14d
shl rax, cl
test eax, 0x151508
jne 0x40b790
test eax, 0xa8000
jne 0x40b672
test dword [rbp], 0x100
je 0x40b515
lea rcx, [0x004cb8d4]
mov r12d, 1
call sub.msvcrt.dll_puts
add r13, r12
cmp rsi, r13
ja 0x40b527
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, str._findcall__t0x_lx:calls
mov edx, r13d
call sub.msvcrt.dll_printf
movzx ecx, byte [rbx + 1]
call fcn.0040b320
test eax, eax
mov edx, eax
je 0x40b603
cmp eax, 0xd
jne 0x40b59d
lea rcx, [rbx + 1]
mov dword [rsp + 0x28], edx
call fcn.0040b420
lea r12d, [rax + 1]
movsxd rax, r12d
add rbx, rax
movzx ecx, byte [rbx]
call fcn.0040b320
test dword [rbp], 0x100
mov r14d, eax
je 0x40b576
mov edx, dword [rsp + 0x28]
mov ecx, edx
call fcn.0040b1a0
lea rcx, [0x004cb846]
mov rdx, rax
call sub.msvcrt.dll_printf
mov ecx, r14d
call fcn.0040b1a0
lea rcx, [0x004cb85b]
mov rdx, rax
call sub.msvcrt.dll_printf
cmp r14d, 0x14
jbe 0x40b57c
jmp 0x40b59d
movzx ecx, byte [rbx]
call fcn.0040b320
lea rcx, [rbx + 1]
cmp eax, 0x11
je 0x40b770
cmp eax, 0x13
je 0x40b7d5
cmp eax, 0xf
je 0x40b7ba
mov ecx, 2
mov r14, r13
call qword [fcn.004c1900]
mov r8d, 0x1f
mov edx, 1
lea rcx, [0x004cb878]
mov r9, rax
call sub.msvcrt.dll_fwrite
mov ecx, r14d
call fcn.00409090
test eax, eax
je 0x40b59d
mov rcx, qword [0x005062c0]
mov rdx, r14
call fcn.0040a200
test rax, rax
mov r9, rax
je 0x40b59d
test dword [rbp], 0x100
jne 0x40b7ee
cmp qword [rax], r14
jne 0x40b515
xor r8d, r8d
mov rdx, r9
jmp 0x40b79a
mov rax, qword [rsp + 0x80]
mov r9d, esi
mov r8d, r13d
lea rcx, [0x004cb810]
mov rdx, qword [rax + 0x10]
call sub.msvcrt.dll_printf
jmp 0x40b4f0
lea rcx, [0x00513ee0]
mov dword [0x00513ec0], 1
call fcn.00409cd0
mov rax, qword [0x004cb8f0]
mov qword [0x00513fc8], rax
lea rax, [0x00513ee0]
mov qword [0x00513fe8], rax
jmp 0x40b4dc
mov rax, qword [0x00505fb0]
mov rax, qword [rax]
mov rax, qword [rax + 8]
call qword [rax + 0x58]
lea r14, [rax + r13 + 2]
jmp 0x40b6c1
lea rdx, [0x00513ee0]
xor r8d, r8d
mov rcx, qword [rsp + 0x80]
call fcn.00402800
mov rcx, rbx
call fcn.0040b420
add r12d, eax
movsxd r12, r12d
jmp 0x40b51b
movzx eax, byte [rbx + 1]
lea r14d, [rax - 0x80]
movzx r14d, r14b
sub r14d, 0x7f
movsxd r14, r14d
add r14, r13
jmp 0x40b6c1
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
mov rax, qword [rax + 8]
call qword [rax + 0x40]
lea r14, [rax + r13 + 4]
jmp 0x40b6c1
lea rcx, [0x004cb898]
mov edx, r14d
mov qword [rsp + 0x28], rax
call sub.msvcrt.dll_printf
mov r9, qword [rsp + 0x28]
lea rcx, [0x004cb8b0]
mov rdx, qword [r9 + 0x10]
call sub.msvcrt.dll_printf
mov r9, qword [rsp + 0x28]
lea rcx, [0x004cb8c0]
mov edx, dword [r9]
call sub.msvcrt.dll_printf
mov r9, qword [rsp + 0x28]
cmp qword [r9], r14
jne 0x40b59d
jmp 0x40b702