Function at 0x1400049e0
Capabilities:
Delete file
Read file on windows
Write file on windows

Disassembly:
push rbp
push rsi
push r12
push r14
lea rbp, [rsp - 0x3f]
sub rsp, 0xf8
mov rax, qword [0x1400b52a0]
xor rax, rsp
mov qword [rbp + 0x1f], rax
mov r14, rdx
mov qword [rsp + 0x28], rdx
lea rdx, [0x1400747d8]
mov byte [rsp + 0x20], 0
mov rsi, r8
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov r12, rax
test rax, rax
je 0x140004d66
lea rdx, [0x1400747cc]
mov qword [rsp + 0x138], rbx
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov qword [rbp - 0x69], rax
mov rbx, rax
test rax, rax
jne 0x140004a5e
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor al, al
jmp 0x140004d5e
mov edx, 1
lea rcx, [rbp + 7]
mov r9, r12
lea r8d, [rdx + 0x17]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp rax, 0x18
jne 0x140004d97
cmp byte [rbp + 7], 0x43
jne 0x140004d97
cmp byte [rbp + 8], 0x49
jne 0x140004d97
cmp byte [rbp + 9], 0x53
jne 0x140004d97
cmp byte [rbp + 0xa], 0x4f
jne 0x140004d97
mov eax, dword [rbp + 0x17]
test eax, eax
je 0x140004d97
mov r8, qword [rbp + 0xf]
test r8, r8
je 0x140004d97
mov ecx, eax
mov qword [rsp + 0xf0], rdi
mov rax, r8
mov qword [rsp + 0xe8], r13
xor edx, edx
div rcx
mov rdi, rax
lea eax, [rax*4 + 4]
movsxd rbx, eax
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ecx, dword [rbp + 0x17]
mov qword [rsp + 0x38], rax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r13, rax
mov eax, dword [rbp + 0x17]
lea ecx, [rax + rax]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rcx, qword [rsp + 0x38]
mov qword [rbp - 0x79], rax
test rcx, rcx
je 0x140004d80
test r13, r13
je 0x140004d80
test rax, rax
je 0x140004d80
mov r8, rbx
xor edx, edx
call sub.VCRUNTIME140.dll_memset
mov rcx, qword [rsp + 0x38]
mov r9, r12
mov r8, rbx
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp rax, rbx
jne 0x140004d08
xor r14d, r14d
mov qword [rsp + 0xe0], r15
mov eax, 0x51eb851f
mov qword [rbp - 0x29], r14
imul edi
mov qword [rbp - 0x21], r14
mov r15d, r14d
mov ecx, edx
mov qword [rbp - 0x19], r14
sar ecx, 5
mov eax, ecx
movsxd rdx, edi
shr eax, 0x1f
add ecx, eax
mov qword [rbp - 0x61], rdx
mov dword [rbp - 0x71], ecx
mov eax, r14d
mov dword [rsp + 0x30], eax
test edi, edi
jle 0x140004cf6
nop
dec r14d
test r14d, r14d
jg 0x140004bc2
mov r8, qword [rsi]
cdq
idiv ecx
mov r14d, ecx
mov rcx, rsi
movd xmm1, eax
cvtdq2ps xmm1, xmm1
call qword [r8 + 0xb0]
cmp byte [rsi + 0x30a], 0
je 0x140004bd7
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x138]
cmp byte [rsi + 0x309], 0
jne 0x140004cfb
mov r9d, 0x58
lea r8, str.1.2.5
lea rcx, [rbp - 0x59]
lea edx, [r9 - 0x67]
call fcn.14005ffe0
test eax, eax
jne 0x140004cfb
mov r8, qword [rsp + 0x38]
movzx ecx, byte [rbp + 0x1c]
mov edx, dword [r8 + r15*4]
mov edi, edx
btr edx, 0x1f
mov r9d, edx
shl r9d, cl
and edi, 0x80000000
je 0x140004c2c
mov ebx, dword [rbp + 0x17]
jmp 0x140004c39
mov ebx, dword [r8 + r15*4 + 4]
btr ebx, 0x1f
sub ebx, edx
shl ebx, cl
xor r8d, r8d
mov edx, r9d
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov rcx, qword [rbp - 0x79]
mov r9, r12
mov r8, rbx
mov edx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov dword [rbp - 0x51], eax
mov eax, eax
cmp rax, rbx
jne 0x140004cfb
test edi, edi
je 0x140004c80
mov rdx, qword [rbp - 0x79]
mov r8, rbx
mov rcx, r13
call sub.VCRUNTIME140.dll_memcpy
jmp 0x140004cb2
mov eax, dword [rbp + 0x17]
lea rcx, [rbp - 0x59]
mov dword [rbp - 0x41], eax
mov edx, 3
mov rax, qword [rbp - 0x79]
mov qword [rbp - 0x59], rax
mov qword [rbp - 0x49], r13
call fcn.14005e730
cmp eax, 1
jne 0x140004cfb
mov eax, dword [rbp + 0x17]
sub eax, dword [rbp - 0x41]
mov ebx, eax
cmp eax, dword [rbp + 0x17]
jne 0x140004cfb
mov r9, qword [rbp - 0x69]
mov edx, 1
movsxd rbx, ebx
mov rcx, r13
mov r8, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
cmp rax, rbx
jne 0x140004cfb
lea rcx, [rbp - 0x59]
call fcn.14005ff60
test eax, eax
jne 0x140004cfb
mov eax, dword [rsp + 0x30]
inc r15
mov ecx, dword [rbp - 0x71]
inc eax
mov dword [rsp + 0x30], eax
cmp r15, qword [rbp - 0x61]
jl 0x140004ba0
mov byte [rsp + 0x20], 1
mov r14, qword [rsp + 0x28]
mov r15, qword [rsp + 0xe0]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r13
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x79]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, qword [rbp - 0x69]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
movzx ebx, byte [rsp + 0x20]
test bl, bl
jne 0x140004d4b
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
movzx eax, bl
mov rdi, qword [rsp + 0xf0]
mov r13, qword [rsp + 0xe8]
mov rbx, qword [rsp + 0x138]
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.14005b9c0
add rsp, 0xf8
pop r14
pop r12
pop rsi
pop rbp
ret
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, qword [rbp - 0x69]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor al, al
jmp 0x140004d4e
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
xor al, al
jmp 0x140004d5e