Function at 0x140010f6c
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1fd0]
mov eax, 0x20d0
call fcn.140032900
sub rsp, rax
mov rax, qword [0x140045010]
xor rax, rsp
mov qword [rbp + 0x1fc0], rax
mov rbx, rdx
mov r15, rcx
xor edi, edi
mov r13d, edi
call fcn.1400016d0
mov rcx, rax
test rax, rax
je 0x1400114a5
mov rax, qword [rax]
mov rax, qword [rax + 0x18]
call qword [case.0x140013a6e.0]
add rax, 0x18
mov qword [rsp + 0x40], rax
call fcn.1400016d0
mov rcx, rax
test rax, rax
je 0x14001149a
mov rax, qword [rax]
mov rax, qword [rax + 0x18]
call qword [case.0x140013a6e.0]
add rax, 0x18
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], edi
mov dword [rsp + 0x4c], edi
lea rcx, [r15 + 8]
mov edx, dword [r15 + 0x1cc]
call fcn.140007e40
mov rcx, qword [rax + 0x10]
sub rcx, 0x18
call fcn.140001e98
add rax, 0x18
mov qword [rbp - 0x80], rax
lea r12, [rbx + 8]
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], edi
lea r8d, [rdi + 3]
mov dword [rsp + 0x20], r8d
xor r9d, r9d
mov edx, 0x80000000
mov rcx, qword [r12]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400110e8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp - 0x78]
call fcn.1400034c0
nop
lea rcx, [rbx + 0x20]
mov rdx, rax
call fcn.140004118
nop
mov rdx, qword [rbp - 0x78]
add rdx, 0xffffffffffffffe8
or eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400110a0
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x140013a6e.0]
mov r8, qword [r12]
lea rdx, str.Error_opening_file__s.
lea rcx, [rsp + 0x40]
call fcn.140004714
mov rcx, qword [rsp + 0x40]
add rcx, 0xffffffffffffffe8
call fcn.140001e98
add rax, 0x18
mov qword [rsp + 0x60], rax
lea rcx, [r15 + 0x1e0]
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x60]
call fcn.140004c54
jmp 0x1400113fa
cmp dword [rbx + 0x18], edi
je 0x1400113d2
mov r8, qword [r12]
lea rdx, str.Copying_file__s.
lea rcx, [rsp + 0x40]
call fcn.140004714
mov rcx, qword [rsp + 0x40]
add rcx, 0xffffffffffffffe8
call fcn.140001e98
add rax, 0x18
mov qword [rsp + 0x68], rax
add r15, 0x1e0
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x68]
mov rcx, r15
call fcn.140004c54
lea rdx, [rbp - 0x50]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x1400111d7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp - 0x70]
call fcn.1400034c0
nop
lea rcx, [rbx + 0x20]
mov rdx, rax
call fcn.140004118
nop
mov rdx, qword [rbp - 0x70]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140011190
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x140013a6e.0]
mov r8, qword [r12]
lea rdx, str.Couldnt_get_file_size_of__s
lea rcx, [rsp + 0x40]
call fcn.140004714
mov rcx, qword [rsp + 0x40]
add rcx, 0xffffffffffffffe8
call fcn.140001e98
add rax, 0x18
mov qword [rsp + 0x70], rax
lea rdx, [rsp + 0x70]
xor r9d, r9d
xor r8d, r8d
mov rcx, r15
call fcn.140004c54
mov rcx, rsi
jmp 0x1400113f3
lea r8, [0x14003d62c]
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 0x60]
call fcn.140003b2c
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rbp - 0x68]
call fcn.1400095d8
nop
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.140004118
nop
mov rdx, qword [rbp - 0x68]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140011230
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x140013a6e.0]
nop
mov rdx, qword [rbp - 0x60]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140011255
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x140013a6e.0]
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 1]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x140011301
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp - 0x58]
call fcn.1400034c0
nop
lea rcx, [rbx + 0x20]
mov rdx, rax
call fcn.140004118
nop
mov rdx, qword [rbp - 0x58]
add rdx, 0xffffffffffffffe8
or eax, r14d
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400112ca
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x140013a6e.0]
mov r8, qword [rsp + 0x50]
lea rdx, str.Error_creating_file__s.
lea rcx, [rsp + 0x40]
call fcn.140004714
mov rcx, qword [rsp + 0x40]
add rcx, 0xffffffffffffffe8
call fcn.140001e98
add rax, 0x18
mov qword [rsp + 0x78], rax
lea rdx, [rsp + 0x78]
jmp 0x1400111c1
mov rbx, rdi
mov rcx, r15
call fcn.140004d60
jmp 0x1400113a5
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x48]
mov r8d, 0x400
lea rdx, [rbp - 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400113af
mov r8d, dword [rsp + 0x48]
test r8d, r8d
je 0x1400113af
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x4c]
lea rdx, [rbp - 0x40]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400113af
mov eax, dword [rsp + 0x4c]
cmp dword [rsp + 0x48], eax
jne 0x1400113af
add rbx, rax
xorps xmm1, xmm1
cvtsi2ss xmm1, rbx
mulss xmm1, dword [0x14003f848]
xorps xmm0, xmm0
cvtsi2ss xmm0, qword [rbp - 0x50]
divss xmm1, xmm0
cvttss2si edi, xmm1
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [r15 + 0x48], edi
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, r15
call fcn.140004d60
xor edi, edi
test al, al
je 0x140011311
jmp 0x1400113e1
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or rsi, 0xffffffffffffffff
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rsp + 0x50]
mov rcx, r12
call fcn.140004118
mov r13d, 1
or r14, 0xffffffffffffffff
cmp rsi, r14
je 0x1400113fa
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp r14, 0xffffffffffffffff
je 0x1400113fa
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rdx, qword [rbp - 0x80]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140011420
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x140013a6e.0]
nop
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140011447
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x140013a6e.0]
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
or ecx, 0xffffffff
lock xadd dword [rdx + 0x10], ecx
sub ecx, 1
jg 0x14001146d
mov rcx, qword [rdx]
mov r8, qword [rcx]
mov rax, qword [r8 + 8]
call qword [case.0x140013a6e.0]
mov eax, r13d
mov rcx, qword [rbp + 0x1fc0]
xor rcx, rsp
call fcn.1400163d0
mov rbx, qword [rsp + 0x2120]
add rsp, 0x20d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov ecx, 0x80004005
call fcn.140001548
nop
mov ecx, 0x80004005
call fcn.140001548
int3