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

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1fd0]
mov eax, 0x20d0
call fcn.1400b0dd0
sub rsp, rax
mov qword [rbp - 0x48], 0xfffffffffffffffe
mov qword [rsp + 0x2120], rbx
mov rax, qword [0x1401740c0]
xor rax, rsp
mov qword [rbp + 0x1fc0], rax
mov rdi, rdx
mov r15, rcx
xor esi, esi
mov r13d, esi
mov rbx, qword [0x140174018]
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x50], rbx
mov dword [rsp + 0x48], esi
mov dword [rsp + 0x4c], esi
add rcx, 8
mov edx, dword [r15 + 0x5cc]
call fcn.140072980
mov rcx, rax
lea rdx, [rsp + 0x78]
call fcn.1400720c8
nop
lea r12, [rdi + 8]
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
lea r8d, [rsi + 3]
mov dword [rsp + 0x20], r8d
xor r9d, r9d
mov edx, 0x80000000
mov rcx, qword [r12]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x14008a995
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp - 0x78]
call fcn.140068980
nop
lea rcx, [rdi + 0x20]
mov rdx, rax
call fcn.140067f7c
nop
mov rcx, qword [rbp - 0x78]
add rcx, 0xfffffffffffffff4
cmp rcx, qword [0x140174010]
je 0x14008a926
or eax, r14d
lock xadd dword [rcx], eax
sub eax, 1
jg 0x14008a926
mov rcx, qword [rbp - 0x78]
add rcx, 0xfffffffffffffff4
call fcn.1400b0230
mov r8, qword [r12]
lea rdx, str.Error_opening_file__s.
lea rcx, [rsp + 0x40]
call fcn.14006895c
mov rbx, qword [rsp + 0x40]
cmp dword [rbx - 0xc], esi
jl 0x14008a955
mov qword [rsp + 0x58], rbx
lock inc dword [rbx - 0xc]
mov rbx, qword [rsp + 0x40]
jmp 0x14008a979
mov rax, qword [0x140174018]
mov qword [rsp + 0x58], rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r8, rbx
mov edx, eax
lea rcx, [rsp + 0x58]
call fcn.1400670f0
lea rcx, [r15 + 0x5e0]
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x58]
call fcn.14006b790
jmp 0x14008ad2d
cmp dword [rdi + 0x18], esi
je 0x14008ad04
mov r8, qword [r12]
lea rdx, str.Copying_file__s.
lea rcx, [rsp + 0x40]
call fcn.14006895c
mov rbx, qword [rsp + 0x40]
cmp dword [rbx - 0xc], esi
jl 0x14008a9cd
mov qword [rsp + 0x60], rbx
lock inc dword [rbx - 0xc]
mov rbx, qword [rsp + 0x40]
jmp 0x14008a9f1
mov rax, qword [0x140174018]
mov qword [rsp + 0x60], rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r8, rbx
mov edx, eax
lea rcx, [rsp + 0x60]
call fcn.1400670f0
add r15, 0x5e0
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, r15
call fcn.14006b790
lea rdx, [rbp - 0x50]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x14008aad7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp - 0x70]
call fcn.140068980
nop
lea rcx, [rdi + 0x20]
mov rdx, rax
call fcn.140067f7c
nop
mov rcx, qword [rbp - 0x70]
add rcx, 0xfffffffffffffff4
cmp rcx, qword [0x140174010]
je 0x14008aa69
or eax, 0xffffffff
lock xadd dword [rcx], eax
sub eax, 1
jg 0x14008aa69
mov rcx, qword [rbp - 0x70]
add rcx, 0xfffffffffffffff4
call fcn.1400b0230
mov r8, qword [r12]
lea rdx, str.Couldnt_get_file_size_of__s
lea rcx, [rsp + 0x40]
call fcn.14006895c
mov rbx, qword [rsp + 0x40]
cmp dword [rbx - 0xc], esi
jl 0x14008aa98
mov qword [rsp + 0x68], rbx
lock inc dword [rbx - 0xc]
mov rbx, qword [rsp + 0x40]
jmp 0x14008aabc
mov rax, qword [0x140174018]
mov qword [rsp + 0x68], rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r8, rbx
mov edx, eax
lea rcx, [rsp + 0x68]
call fcn.1400670f0
lea rdx, [rsp + 0x68]
xor r9d, r9d
xor r8d, r8d
mov rcx, r15
call fcn.14006b790
mov rcx, r14
jmp 0x14008ad26
lea r8, [0x1401202e4]
lea rdx, [rsp + 0x78]
lea rcx, [rbp - 0x60]
call fcn.1400680f0
nop
mov r8, rdi
mov rdx, rax
lea rcx, [rbp - 0x68]
call fcn.1400706e0
nop
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.140067f7c
nop
mov rcx, qword [rbp - 0x68]
add rcx, 0xfffffffffffffff4
cmp rcx, qword [0x140174010]
je 0x14008ab3a
or eax, 0xffffffff
lock xadd dword [rcx], eax
sub eax, 1
jg 0x14008ab35
mov rcx, qword [rbp - 0x68]
add rcx, 0xfffffffffffffff4
call fcn.1400b0230
mov rbx, qword [rsp + 0x40]
mov rcx, qword [rbp - 0x60]
add rcx, 0xfffffffffffffff4
cmp rcx, qword [0x140174010]
je 0x14008ab69
or eax, 0xffffffff
lock xadd dword [rcx], eax
sub eax, 1
jg 0x14008ab64
mov rcx, qword [rbp - 0x60]
add rcx, 0xfffffffffffffff4
call fcn.1400b0230
mov rbx, qword [rsp + 0x40]
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
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 rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x14008ac47
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp - 0x58]
call fcn.140068980
nop
lea rcx, [rdi + 0x20]
mov rdx, rax
call fcn.140067f7c
nop
mov rcx, qword [rbp - 0x58]
add rcx, 0xfffffffffffffff4
xor esi, esi
cmp rcx, qword [0x140174010]
je 0x14008abe9
or eax, 0xffffffff
lock xadd dword [rcx], eax
sub eax, 1
jg 0x14008abe9
mov rcx, qword [rbp - 0x58]
add rcx, 0xfffffffffffffff4
call fcn.1400b0230
mov r8, qword [rsp + 0x50]
lea rdx, str.Error_creating_file__s.
lea rcx, [rsp + 0x40]
call fcn.14006895c
mov rbx, qword [rsp + 0x40]
cmp dword [rbx - 0xc], esi
jl 0x14008ac19
mov qword [rsp + 0x70], rbx
lock inc dword [rbx - 0xc]
mov rbx, qword [rsp + 0x40]
jmp 0x14008ac3d
mov rax, qword [0x140174018]
mov qword [rsp + 0x70], rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r8, rbx
mov edx, eax
lea rcx, [rsp + 0x70]
call fcn.1400670f0
lea rdx, [rsp + 0x70]
jmp 0x14008aac1
xor edi, edi
jmp 0x14008accf
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x48]
mov r8d, 0x400
lea rdx, [rbp - 0x40]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14008ace1
mov r8d, dword [rsp + 0x48]
test r8d, r8d
je 0x14008ace1
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x4c]
lea rdx, [rbp - 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14008ace1
mov eax, dword [rsp + 0x4c]
cmp dword [rsp + 0x48], eax
jne 0x14008ace1
add rdi, rax
xorps xmm1, xmm1
cvtsi2ss xmm1, rdi
mulss xmm1, dword [0x1401260dc]
xorps xmm0, xmm0
cvtsi2ss xmm0, qword [rbp - 0x50]
divss xmm1, xmm0
cvttss2si edx, xmm1
xor r8d, r8d
mov rcx, r15
call fcn.14006b740
mov rcx, r15
call fcn.14006b688
test al, al
je 0x14008ac4e
jmp 0x14008ad0e
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or r14, 0xffffffffffffffff
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rsp + 0x50]
mov rcx, r12
call fcn.140067f7c
mov r13d, 1
or rsi, 0xffffffffffffffff
cmp r14, 0xffffffffffffffff
je 0x14008ad1d
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp rsi, 0xffffffffffffffff
je 0x14008ad2d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, qword [rsp + 0x78]
add rcx, 0xfffffffffffffff4
cmp rcx, qword [0x140174010]
je 0x14008ad5e
or eax, 0xffffffff
lock xadd dword [rcx], eax
sub eax, 1
jg 0x14008ad59
mov rcx, qword [rsp + 0x78]
add rcx, 0xfffffffffffffff4
call fcn.1400b0230
mov rbx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x50]
add rcx, 0xfffffffffffffff4
cmp rcx, qword [0x140174010]
je 0x14008ad86
or eax, 0xffffffff
lock xadd dword [rcx], eax
sub eax, 1
jg 0x14008ad81
call fcn.1400b0230
mov rbx, qword [rsp + 0x40]
lea rcx, [rbx - 0xc]
cmp rcx, qword [0x140174010]
je 0x14008ada4
or edx, 0xffffffff
lock xadd dword [rcx], edx
sub edx, 1
jg 0x14008ada4
call fcn.1400b0230
mov eax, r13d
mov rcx, qword [rbp + 0x1fc0]
xor rcx, rsp
call fcn.1400b0730
mov rbx, qword [rsp + 0x2120]
add rsp, 0x20d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret