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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x430]
sub rsp, 0x530
mov rax, qword [0x14002b008]
xor rax, rsp
mov qword [rbp + 0x420], rax
mov rsi, rcx
mov rcx, qword [rcx + 0x28]
cmp rcx, 0xffffffffffffffff
je 0x1400049a8
xor r12d, r12d
lea r9, [rsp + 0x30]
lea rdx, [rsp + 0x34]
mov qword [rsp + 0x20], r12
lea r8d, [r12 + 1]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400049a8
lea r13, [0x140000000]
nop word [rax + rax]
movzx eax, byte [rsp + 0x34]
cmp eax, 0xc
ja case.default.0x140004299
mov ecx, dword [r13 + rax*4 + 0x4a00]
add rcx, r13
jmp rcx
mov rcx, qword [rsi + 0x28]
lea rdx, [rsi + 0x230]
lea r9, [rsp + 0x30]
mov qword [rsp + 0x20], r12
mov r8d, 4
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400049a8
mov rcx, rsi
call fcn.140001980
mov rcx, qword [rsi + 0x28]
lea r9, [rsp + 0x54]
mov r8d, 4
mov dword [rsp + 0x40], eax
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [rsp + 0x40], r12d
je case.default.0x140004299
mov eax, r12d
lea r9, [rsp + 0x54]
cmp qword [rsi + 0x258], rax
lea rdx, [rsp + 0x40]
mov r8d, 4
setne al
mov dword [rsp + 0x40], eax
jmp 0x140004972
mov rcx, qword [rsi + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 8
mov qword [rsp + 0x20], r12
lea rdx, [rbp - 0x48]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400049a8
mov rcx, qword [rbp - 0x48]
mov rax, qword [rcx]
call qword [rax + 0x10]
jmp case.default.0x140004299
mov rcx, qword [rsi + 0x250]
test rcx, rcx
je case.default.0x140004299
mov dword [rsp + 0x48], r12d
lea rdx, [rbp - 0x80]
mov rax, qword [rcx]
call qword [rax + 0xd0]
test eax, eax
jne 0x1400044a9
mov rcx, qword [rbp - 0x80]
lea rdx, [rsp + 0x3c]
mov dword [rsp + 0x38], r12d
mov rax, qword [rcx]
call qword [rax + 0x30]
mov ecx, dword [rsp + 0x3c]
shl rcx, 3
call fcn.1400124b0
mov rcx, qword [rbp - 0x80]
lea r9, [rsp + 0x3c]
mov edx, dword [rsp + 0x3c]
mov r8, rax
mov r14, rax
mov r10, qword [rcx]
call qword [r10 + 0x38]
mov ecx, dword [rsp + 0x3c]
lea r9, [rsp + 0x44]
mov dword [rsp + 0x48], ecx
lea rdx, [rsp + 0x48]
mov rcx, qword [rsi + 0x28]
mov r8d, 4
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, r12d
cmp dword [rsp + 0x3c], r12d
jbe 0x14000448d
nop
mov rcx, qword [rsi + 0x28]
lea r9, [rsp + 0x44]
mov eax, edi
lea rdx, [rbp - 0x60]
mov r8d, 8
mov qword [rsp + 0x20], r12
lea rbx, [r14 + rax*8]
mov rax, qword [r14 + rax*8]
mov qword [rbp - 0x60], rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [rsp + 0x38], r12d
lea r9, [rbp + 0x20]
mov rcx, qword [rbx]
lea r8, [rsp + 0x38]
mov edx, 0xff
mov rax, qword [rcx]
call qword [rax + 0x98]
mov eax, dword [rsp + 0x38]
lea r9, [rsp + 0x44]
mov rcx, qword [rsi + 0x28]
lea rdx, [rsp + 0x38]
add eax, eax
mov qword [rsp + 0x20], r12
mov r8d, 4
mov dword [rsp + 0x38], eax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r8d, dword [rsp + 0x38]
lea r9, [rsp + 0x44]
mov rcx, qword [rsi + 0x28]
lea rdx, [rbp + 0x20]
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
inc edi
cmp edi, dword [rsp + 0x3c]
jb 0x1400043f0
test r14, r14
je 0x14000449a
mov rcx, r14
call fcn.140012204
mov rcx, qword [rbp - 0x80]
mov rax, qword [rcx]
call qword [rax + 0x10]
jmp case.default.0x140004299
lea r9, [rsp + 0x44]
mov r8d, 4
lea rdx, [rsp + 0x48]
jmp 0x140004972
mov rcx, qword [rsi + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 8
mov qword [rsp + 0x20], r12
lea rdx, [rbp - 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400049a8
mov rdx, qword [rbp - 0x40]
mov rcx, rsi
call fcn.1400020f0
jmp case.default.0x140004299
mov rcx, qword [rsi + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 8
mov qword [rsp + 0x20], r12
lea rdx, [rbp - 0x38]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400049a8
mov rdx, qword [rbp - 0x38]
mov rcx, rsi
call fcn.140002570
jmp case.default.0x140004299
mov rcx, qword [rsi + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 8
mov qword [rsp + 0x20], r12
lea rdx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400049a8
mov rcx, qword [rsi + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 4
mov qword [rsp + 0x20], r12
lea rdx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400049a8
mov r8d, dword [rsp + 0x58]
mov rcx, rsi
mov rdx, qword [rbp - 0x30]
call fcn.140002800
jmp case.default.0x140004299
mov rcx, qword [rsi + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 8
mov qword [rsp + 0x20], r12
lea rdx, [rbp - 0x28]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400049a8
mov rcx, qword [rsi + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 4
mov qword [rsp + 0x20], r12
lea rdx, [rsp + 0x5c]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400049a8
mov r9d, dword [rsp + 0x5c]
lea rdx, [rbp + 0x10]
mov r8, qword [rbp - 0x28]
call fcn.140003270
cmp qword [rbp + 0x10], r12
jne 0x140004648
cmp qword [rbp + 0x18], r12
jne 0x140004648
mov dword [rsp + 0x48], 0xffffffff
lea rdi, [rsp + 0x48]
mov ebx, r12d
nop word [rax + rax]
mov rcx, qword [rsi + 0x28]
lea r9, [rsp + 0x60]
mov r8d, 4
mov qword [rsp + 0x20], r12
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400049e1
mov eax, dword [rsp + 0x60]
add ebx, eax
add rdi, rax
cmp ebx, 4
jb 0x140004610
jmp case.default.0x140004299
movaps xmm0, xmmword [rbp + 0x10]
lea rdx, [rbp - 0x60]
mov rcx, rsi
movdqa xmmword [rbp - 0x60], xmm0
call fcn.1400034e0
jmp case.default.0x140004299
mov rcx, qword [rsi + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 8
mov qword [rsp + 0x20], r12
lea rdx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400049a8
mov rcx, qword [rsi + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 4
mov qword [rsp + 0x20], r12
lea rdx, [rsp + 0x64]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400049a8
mov r8d, dword [rsp + 0x64]
mov rcx, rsi
mov rdx, qword [rbp - 0x20]
call fcn.140002e50
jmp case.default.0x140004299
mov rcx, qword [rsi + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 8
mov qword [rsp + 0x20], r12
lea rdx, [rbp - 0x18]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400049a8
mov rcx, qword [rsi + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 4
mov qword [rsp + 0x20], r12
lea rdx, [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400049a8
mov r8d, dword [rsp + 0x68]
mov rcx, rsi
mov rdx, qword [rbp - 0x18]
call fcn.1400029e0
jmp case.default.0x140004299
mov rcx, qword [rsi + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 8
mov qword [rsp + 0x20], r12
lea rdx, [rbp - 0x10]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400049a8
mov rcx, qword [rsi + 0x258]
mov r14d, r12d
mov rdi, qword [rbp - 0x10]
mov qword [rsp + 0x48], r12
test rcx, rcx
je 0x14000483a
mov rax, qword [rcx]
lea rdx, [rbp - 0x50]
call qword [rax + 0x20]
test eax, eax
jne 0x14000483a
nop dword [rax]
mov rcx, qword [rbp - 0x50]
lea r9, [rsp + 0x6c]
lea r8, [rbp + 0x20]
mov edx, 0x10
mov rax, qword [rcx]
call qword [rax + 0x38]
mov r9d, dword [rsp + 0x6c]
mov edx, r12d
mov r15d, eax
test r9d, r9d
je 0x140004819
nop dword [rax + rax]
mov eax, edx
shl rax, 5
mov ebx, edx
mov r8, qword [rbp + rax + 0x20]
cmp rdi, r8
jb 0x1400047cf
mov rcx, qword [rbp + rax + 0x28]
add rcx, r8
cmp rdi, rcx
jb 0x1400047d8
inc edx
cmp edx, r9d
jb 0x1400047b0
jmp 0x140004819
mov rcx, qword [rsi + 0x28]
lea r9, [rsp + 0x70]
mov qword [rsp + 0x48], r8
lea rdx, [rsp + 0x48]
mov r14d, 1
mov qword [rsp + 0x20], r12
lea r8d, [r14 + 7]
call qword [sym.imp.KERNEL32.dll_WriteFile]
shl rbx, 5
lea rdx, [rbp - 0x60]
mov rcx, rsi
movups xmm0, xmmword [rbp + rbx + 0x30]
movaps xmmword [rbp - 0x60], xmm0
call fcn.1400034e0
test r15d, r15d
jne 0x140004827
test r14d, r14d
je 0x140004780
mov rcx, qword [rbp - 0x50]
mov rax, qword [rcx]
call qword [rax + 0x10]
test r14d, r14d
jne case.default.0x140004299
lea r9, [rsp + 0x70]
lea rdx, [rsp + 0x48]
jmp 0x14000496c
mov rcx, rsi
call fcn.140003eb0
jmp case.default.0x140004299
mov rcx, qword [rsi + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 8
mov qword [rsp + 0x20], r12
lea rdx, [rbp - 8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je case.default.0x140004299
mov rcx, qword [rsi + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 4
mov qword [rsp + 0x20], r12
lea rdx, [rsp + 0x74]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je case.default.0x140004299
mov r9d, dword [rsp + 0x74]
lea rdx, [rbp]
mov r8, qword [rbp - 8]
call fcn.140003270
cmp qword [rbp], r12
jne 0x1400048c5
cmp qword [rbp + 8], r12
je 0x14000495f
mov rcx, qword [rsi + 0x258]
test rcx, rcx
je 0x14000495f
mov rax, qword [rcx]
lea rdx, [rbp - 0x70]
call qword [rax + 0x20]
test eax, eax
jne 0x14000495f
mov rcx, qword [rbp - 0x70]
lea r9, [rsp + 0x50]
lea r8, [rbp + 0x20]
mov edx, 0x20
mov rax, qword [rcx]
call qword [rax + 0x38]
test eax, eax
jne 0x14000495f
mov edx, dword [rsp + 0x50]
test edx, edx
je 0x1400048e3
mov ebx, r12d
nop word [rax + rax]
mov eax, ebx
shl rax, 5
mov rcx, qword [rbp + rax + 0x30]
cmp qword [rbp], rcx
jne 0x140004957
mov rcx, qword [rbp + rax + 0x38]
cmp qword [rbp + 8], rcx
jne 0x140004957
mov rcx, qword [rbp + rax + 0x20]
lea r9, [rsp + 0x78]
mov qword [rbp - 0x78], rcx
lea rdx, [rbp - 0x78]
mov rcx, qword [rsi + 0x28]
mov r8d, 8
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [rsp + 0x50]
inc ebx
cmp ebx, edx
jb 0x140004910
jmp 0x1400048e3
mov qword [rbp - 0x78], r12
lea r9, [rsp + 0x78]
lea rdx, [rbp - 0x78]
mov r8d, 8
mov rcx, qword [rsi + 0x28]
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsi + 0x28]
lea r9, [rsp + 0x30]
mov r8d, 1
mov qword [rsp + 0x20], r12
lea rdx, [rsp + 0x34]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140004280
mov eax, 1
mov rcx, qword [rbp + 0x420]
xor rcx, rsp
call fcn.1400056d0
lea r11, [rsp + 0x530]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
xor eax, eax
jmp 0x1400049ad
lea rax, str.Write_Error
lea rdx, [0x14002a430]
mov qword [rbp - 0x70], rax
lea rcx, [rbp - 0x70]
call fcn.140006fb8
int3