Function at 0x14003fb10
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push rbp
push rdi
push r14
lea rbp, [rsp - 0xfb0]
mov eax, 0x10b0
call fcn.140066d20
sub rsp, rax
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rsp + 0x10e0], rbx
mov qword [rsp + 0x10e8], rsi
mov rax, qword [0x14009e018]
xor rax, rsp
mov qword [rbp + 0xfa0], rax
mov r14, rdx
mov rsi, rcx
mov qword [rbp - 0x68], 7
xor edi, edi
mov qword [rbp - 0x70], rdi
mov word [rbp - 0x80], di
mov qword [rsp + 0x78], 7
mov qword [rsp + 0x70], rdi
mov word [rsp + 0x60], di
or rbx, 0xffffffffffffffff
cmp word [rcx], di
jne 0x14003fb8d
mov r8d, edi
jmp 0x14003fb9b
mov r8, rbx
inc r8
cmp word [rcx + r8*2], 0
jne 0x14003fb90
mov rdx, rsi
lea rcx, [rsp + 0x60]
call fcn.14002fff0
nop
mov r8d, 0x5c
lea rdx, [rsp + 0x60]
lea rcx, [rbp - 0x80]
call fcn.140041b20
nop
mov r8, qword [rsp + 0x78]
cmp r8, 8
jb 0x14003fbd6
inc r8
mov rdx, qword [rsp + 0x60]
call fcn.140019be0
lea rdx, [rbp - 0x80]
cmp qword [rbp - 0x68], 8
cmovae rdx, qword [rbp - 0x80]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectory]
lea r8, [0x14009339c]
mov rdx, r14
lea rcx, [rsp + 0x38]
call fcn.140058e08
cmp qword [rsp + 0x38], 0
jne 0x14003fc99
mov ecx, 0xd7b4cf1b
call fcn.14001a490
mov rdx, rax
mov ecx, 0x5017
movzx eax, word [rax]
xor ax, cx
mov word [rsp + 0x50], ax
movzx eax, word [rdx + 2]
xor ax, cx
mov word [rsp + 0x52], ax
movzx eax, word [rdx + 4]
xor ax, cx
mov word [rsp + 0x54], ax
movzx eax, word [rdx + 6]
xor ax, cx
mov word [rsp + 0x56], ax
mov word [rsp + 0x58], di
mov rcx, qword [0x1400a34c0]
test rcx, rcx
je 0x14003fc8f
lea rax, [rsp + 0x50]
lea rbx, [rbx + 1]
cmp word [rax + rbx*2], 0
jne 0x14003fc63
lea r8d, [rbx*2 + 2]
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x30]
lea rdx, [rsp + 0x50]
mov rcx, qword [rcx + 0x70]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, 0xe0010001
jmp 0x14003fdf8
lea rax, [rsp + 0x38]
mov qword [rsp + 0x30], rax
lea r8, [rsp + 0x30]
lea rcx, [rsp + 0x60]
call fcn.14003a9c0
nop
lea r8, [0x1400933a4]
mov rdx, rsi
lea rcx, [rsp + 0x40]
call fcn.140058e08
cmp qword [rsp + 0x40], 0
jne 0x14003fd66
mov ecx, 0x7b9b4fe7
call fcn.14001a490
mov rdx, rax
mov ecx, 0x5017
movzx eax, word [rax]
xor ax, cx
mov word [rsp + 0x50], ax
movzx eax, word [rdx + 2]
xor ax, cx
mov word [rsp + 0x52], ax
movzx eax, word [rdx + 4]
xor ax, cx
mov word [rsp + 0x54], ax
movzx eax, word [rdx + 6]
xor ax, cx
mov word [rsp + 0x56], ax
mov word [rsp + 0x58], di
mov rcx, qword [0x1400a34c0]
test rcx, rcx
je 0x14003fd5c
lea rax, [rsp + 0x50]
nop word [rax + rax]
lea rbx, [rbx + 1]
cmp word [rax + rbx*2], 0
jne 0x14003fd30
lea r8d, [rbx*2 + 2]
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x30]
lea rdx, [rsp + 0x50]
mov rcx, qword [rcx + 0x70]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, 0xe0010001
jmp 0x14003fde6
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
lea r8, [rsp + 0x30]
lea rcx, [rsp + 0x50]
call fcn.14003a9c0
mov r9, qword [rsp + 0x38]
mov edx, 1
mov r8d, 0x1000
lea rcx, [rbp - 0x60]
call fcn.14005967c
test rax, rax
je 0x14003fdd4
nop dword [rax]
mov r9, qword [rsp + 0x40]
mov r8, rax
mov edx, 1
lea rcx, [rbp - 0x60]
call fcn.140059378
mov r9, qword [rsp + 0x38]
mov edx, 1
mov r8d, 0x1000
lea rcx, [rbp - 0x60]
call fcn.14005967c
test rax, rax
jne 0x14003fda0
cmp byte [rsp + 0x50], 0
jne 0x14003fde6
lea rcx, [rsp + 0x50]
call fcn.140041680
nop
cmp byte [rsp + 0x60], 0
jne 0x14003fdf8
lea rcx, [rsp + 0x60]
call fcn.140041680
nop
mov r8, qword [rbp - 0x68]
cmp r8, 8
jb 0x14003fe0e
inc r8
mov rdx, qword [rbp - 0x80]
call fcn.140019be0
mov eax, edi
mov rcx, qword [rbp + 0xfa0]
xor rcx, rsp
call fcn.140051aa0
lea r11, [rsp + 0x10b0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret