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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1028]
mov eax, 0x1168
call fcn.140001080
sub rsp, rax
mov rax, qword [0x140148058]
xor rax, rsp
mov qword [rbp + 0x1010], rax
mov rbx, qword [rbp + 0x10b0]
mov r15, qword [rbp + 0x10c0]
mov r13, qword [rbp + 0x10f8]
or eax, 0xffffffff
xor edi, edi
mov qword [rbp - 0x48], r9
mov qword [rbp - 0x50], r8
mov qword [rbp - 0x60], rdx
mov rsi, rcx
mov dword [rbp - 0x6c], eax
mov dword [rbp - 0x74], eax
mov dword [rbp - 0x80], edi
mov dword [rbp - 0x70], eax
cmp dword [rcx + 0x5c], edi
jne 0x1400e2424
lea eax, [rdi + 1]
jmp 0x1400e28c6
lea rax, [rcx + 8]
mov rcx, rax
mov qword [rbp - 0x58], rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [rsi + 0x50]
mov r9, qword [rsi + 0x48]
mov r12d, dword [rbp + 0x1100]
lea eax, [rdx + 1]
mov dword [rbp - 0x78], edx
mov dword [rsi + 0x50], eax
mov r14d, 1
test r9, r9
je 0x1400e25a4
test rbx, rbx
je 0x1400e248a
mov eax, dword [rsi + 0x54]
mov edx, dword [rbp + 0x10b8]
mov r8d, r14d
mov rcx, rbx
mov dword [rbp - 0x6c], eax
call qword [sym.imp.msvcrt.dll_fwrite]
cmp eax, r14d
jne 0x1400e28b5
mov eax, dword [rbp + 0x10b8]
add dword [rsi + 0x54], eax
cmp dword [rsi + 0x60], edi
je 0x1400e2576
test r15, r15
je 0x1400e2576
mov rax, qword [r15]
mov rbx, qword [rax + 0x18]
mov rcx, rbx
call qword [fcn.140015690]
lea r9, [rbp - 0x68]
xor r8d, r8d
xor edx, edx
mov rcx, r15
call rbx
test eax, eax
js 0x1400e2576
mov eax, dword [rsi + 0x54]
mov dword [rbp - 0x80], edi
mov dword [rbp - 0x74], eax
mov rax, qword [r15]
mov rbx, qword [rax + 8]
mov rcx, rbx
call qword [fcn.140015690]
lea r9, [rbp - 0x7c]
lea rdx, [rbp + 0x10]
mov r8d, 0x1000
mov rcx, r15
mov qword [rsp + 0x20], rdi
call rbx
test eax, eax
js 0x1400e2558
mov r12d, edi
cmp dword [rbp - 0x7c], edi
je 0x1400e254d
mov edx, dword [rbp - 0x7c]
mov r9, qword [rsi + 0x48]
lea rcx, [rbp + 0x10]
mov r8, r14
call qword [sym.imp.msvcrt.dll_fwrite]
cmp eax, r14d
jne 0x1400e254d
mov eax, dword [rbp - 0x7c]
add dword [rsi + 0x54], eax
add r12d, eax
mov rax, qword [r15]
mov rbx, qword [rax + 8]
mov rcx, rbx
call qword [fcn.140015690]
lea r9, [rbp - 0x7c]
lea rdx, [rbp + 0x10]
mov r8d, 0x1000
mov rcx, r15
mov qword [rsp + 0x20], rdi
call rbx
test eax, eax
jns 0x1400e24fa
mov dword [rbp - 0x80], r12d
mov r12d, dword [rbp + 0x1100]
mov rax, qword [r15]
mov rbx, qword [rax + 0x18]
mov rcx, rbx
call qword [fcn.140015690]
mov edx, dword [rbp - 0x68]
xor r9d, r9d
xor r8d, r8d
mov rcx, r15
call rbx
test r13, r13
je 0x1400e25a1
mov eax, dword [rsi + 0x54]
mov r9, qword [rsi + 0x48]
mov edx, r12d
mov r8, r14
mov rcx, r13
mov dword [rbp - 0x70], eax
call qword [sym.imp.msvcrt.dll_fwrite]
cmp eax, r14d
jne 0x1400e28b5
add dword [rsi + 0x54], r12d
mov edx, dword [rbp - 0x78]
mov rcx, qword [rsi + 0x40]
mov ebx, dword [rbp + 0x10e0]
test rcx, rcx
je 0x1400e26dc
mov r8d, edx
lea rdx, [0x1400e28f0]
call qword [sym.imp.msvcrt.dll_fwprintf]
test eax, eax
js 0x1400e28b5
mov rcx, qword [rbp - 0x48]
cmp qword [rsi + 0x30], rdi
mov r13d, dword [rbp + 0x10b8]
mov r9, qword [rbp - 0x60]
lea rax, [0x1400095c8]
lea rdx, [0x1400e2910]
mov r8, rax
cmovne r8, qword [rsi + 0x30]
test rcx, rcx
cmovne rax, rcx
mov ecx, dword [rbp - 0x70]
mov dword [rsp + 0xb0], ecx
mov ecx, dword [rbp + 0x1108]
mov dword [rsp + 0xa8], ecx
mov ecx, dword [rbp + 0x10f0]
mov dword [rsp + 0xa0], r12d
mov dword [rsp + 0x98], ecx
mov ecx, dword [rbp + 0x10e8]
mov dword [rsp + 0x90], ecx
mov ecx, dword [rbp + 0x10d8]
mov dword [rsp + 0x88], ebx
mov dword [rsp + 0x80], ecx
mov ecx, dword [rbp + 0x10d0]
mov dword [rsp + 0x78], ecx
mov ecx, dword [rbp + 0x10c8]
mov dword [rsp + 0x70], ecx
mov ecx, dword [rbp - 0x74]
mov dword [rsp + 0x68], ecx
mov ecx, dword [rbp - 0x80]
mov dword [rsp + 0x60], ecx
mov ecx, dword [rbp - 0x6c]
mov dword [rsp + 0x58], ecx
mov ecx, dword [rbp + 0x10a8]
mov dword [rsp + 0x50], r13d
mov dword [rsp + 0x48], ecx
mov ecx, dword [rbp + 0x10a0]
mov dword [rsp + 0x40], ecx
mov ecx, dword [rbp + 0x1098]
mov dword [rsp + 0x38], ecx
mov ecx, dword [rbp + 0x1090]
mov dword [rsp + 0x30], ecx
mov rcx, qword [rsi + 0x40]
mov qword [rsp + 0x28], rax
mov rax, qword [rbp - 0x50]
mov qword [rsp + 0x20], rax
call qword [sym.imp.msvcrt.dll_fwprintf]
test eax, eax
js 0x1400e28b5
mov rcx, qword [rsi + 0x40]
lea rdx, [0x1400e2c78]
call qword [sym.imp.msvcrt.dll_fwprintf]
test eax, eax
jns 0x1400e26e3
jmp 0x1400e28b5
mov r13d, dword [rbp + 0x10b8]
mov rcx, qword [rsi + 0x38]
test rcx, rcx
je 0x1400e28ba
xor r8d, r8d
xor edx, edx
call qword [sym.imp.msvcrt.dll_fseek]
test eax, eax
jne 0x1400e28b5
mov r9, qword [rsi + 0x38]
lea edx, [rax + 0x50]
lea rcx, [rbp - 0x40]
mov r8, r14
call qword [sym.imp.msvcrt.dll_fread]
mov rcx, rax
test eax, eax
jne 0x1400e273a
lea r8d, [rax + 0x50]
lea rcx, [rbp - 0x40]
xor edx, edx
call sub.msvcrt.dll_memset
mov eax, 3
mov ecx, r14d
mov dword [rbp - 0x40], eax
jmp 0x1400e273d
mov eax, dword [rbp - 0x40]
cmp ecx, r14d
jne 0x1400e28b5
cmp eax, 3
jne 0x1400e2889
mov ecx, dword [rbp - 0x34]
xor edx, edx
lea r8d, [rcx + 1]
mov eax, ecx
mov dword [rbp - 0x34], r8d
imul eax, dword [rbp - 0x3c]
add eax, dword [rbp + 0x1090]
div r8d
xor edx, edx
mov dword [rbp - 0x3c], eax
mov eax, dword [rbp - 0x38]
imul eax, ecx
add eax, dword [rbp + 0x1098]
div r8d
mov dword [rbp - 0x38], eax
test r13d, r13d
je 0x1400e27eb
mov r8d, dword [rbp - 0x20]
xor edx, edx
mov eax, r8d
lea r9d, [r8 + 1]
imul eax, dword [rbp - 0x30]
add eax, r13d
div r9d
mov dword [rbp - 0x30], eax
test r15, r15
je 0x1400e27bd
mov eax, dword [rbp - 0x1c]
xor edx, edx
lea ecx, [rax + 1]
mov dword [rbp - 0x1c], ecx
imul eax, dword [rbp - 0x2c]
add eax, dword [rbp - 0x80]
div ecx
mov dword [rbp - 0x2c], eax
mov eax, dword [rbp - 0x28]
xor edx, edx
mov dword [rbp - 0x20], r9d
imul eax, r8d
add eax, dword [rbp + 0x10c8]
div r9d
xor edx, edx
mov dword [rbp - 0x28], eax
mov eax, dword [rbp - 0x24]
imul eax, r8d
add eax, dword [rbp + 0x10a8]
div r9d
mov dword [rbp - 0x24], eax
test r12d, r12d
je 0x1400e2834
mov ecx, dword [rbp - 0xc]
xor edx, edx
lea r8d, [rcx + 1]
mov eax, ecx
mov dword [rbp - 0xc], r8d
imul eax, dword [rbp - 0x18]
add eax, r12d
div r8d
xor edx, edx
mov dword [rbp - 0x18], eax
mov eax, dword [rbp - 0x14]
imul eax, ecx
add eax, dword [rbp + 0x1108]
div r8d
xor edx, edx
mov dword [rbp - 0x14], eax
mov eax, dword [rbp - 0x10]
imul eax, ecx
add eax, dword [rbp + 0x10d8]
div r8d
mov dword [rbp - 0x10], eax
cmp ebx, 0xffffffff
je 0x1400e284f
mov eax, dword [rbp + 0xc]
xor edx, edx
lea ecx, [rax + 1]
mov dword [rbp + 0xc], ecx
imul eax, dword [rbp + 8]
add eax, ebx
div ecx
mov dword [rbp + 8], eax
cmp dword [rbp + 0x10a0], edi
jge 0x1400e285b
add dword [rbp - 8], r14d
cmp dword [rbp + 0x10d0], edi
jge 0x1400e2867
add dword [rbp - 4], r14d
cmp dword [rbp + 0x10e8], edi
jge 0x1400e2873
add dword [rbp], r14d
mov eax, dword [rbp + 0x10f0]
add eax, 0xfffffe70
cmp eax, 0xc7
ja 0x1400e2889
add dword [rbp + 4], r14d
mov rcx, qword [rsi + 0x38]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.msvcrt.dll_fseek]
test eax, eax
jne 0x1400e28b5
mov r9, qword [rsi + 0x38]
lea edx, [rax + 0x50]
lea rcx, [rbp - 0x40]
mov r8, r14
call qword [sym.imp.msvcrt.dll_fwrite]
cmp eax, r14d
je 0x1400e28ba
mov edi, 0x80004005
mov rcx, qword [rbp - 0x58]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
mov rcx, qword [rbp + 0x1010]
xor rcx, rsp
call fcn.140001000
add rsp, 0x1168
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret