Function at 0x14008d194
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 - 0x1fe0]
mov eax, 0x20e0
call fcn.1400b1570
sub rsp, rax
mov rax, qword [0x1400ef0c8]
xor rax, rsp
mov qword [rbp + 0x1fd0], rax
mov r12, rdx
mov r13, rcx
xor r14d, r14d
mov dword [rsp + 0x54], r14d
mov r15d, r14d
mov dword [rsp + 0x48], r14d
mov rbx, qword [0x1400ef018]
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x60], rbx
mov dword [rsp + 0x50], r14d
mov dword [rsp + 0x58], r14d
add rcx, 8
mov edx, dword [r13 + 0x5c4]
call fcn.1400765a0
mov rcx, rax
lea rdx, [rbp - 0x68]
call fcn.140075d68
nop
lea rdi, [r12 + 8]
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
lea eax, [r14 + 3]
mov dword [rsp + 0x20], eax
xor r9d, r9d
mov r8d, eax
mov edx, 0x80000000
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x14008d30f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp - 0x58]
call fcn.14006d500
nop
lea rcx, [r12 + 0x20]
mov rdx, rax
call fcn.14006c8f4
nop
mov rcx, qword [rbp - 0x58]
add rcx, 0xfffffffffffffff4
cmp rcx, qword [0x1400ef010]
je 0x14008d299
or eax, esi
lock xadd dword [rcx], eax
sub eax, 1
jg 0x14008d299
mov rcx, qword [rbp - 0x58]
add rcx, 0xfffffffffffffff4
call fcn.1400b0a54
mov r8, qword [rdi]
lea rdx, str.Error_opening_file__s.
lea rcx, [rsp + 0x40]
call fcn.14006d4dc
mov rbx, qword [rsp + 0x40]
cmp dword [rbx - 0xc], r14d
jl 0x14008d2cf
mov qword [rsp + 0x68], rbx
mov r14d, 1
lock add dword [rbx - 0xc], r14d
mov rbx, qword [rsp + 0x40]
jmp 0x14008d2f3
mov rax, qword [0x1400ef018]
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.14006b5e4
lea rcx, [r13 + 0x5d8]
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x68]
call fcn.140070150
jmp 0x14008d706
mov r14d, 1
cmp dword [r12 + 0x18], 0
je 0x14008d6db
mov r8, qword [rdi]
lea rdx, str.Copying_file__s.
lea rcx, [rsp + 0x40]
call fcn.14006d4dc
mov rbx, qword [rsp + 0x40]
cmp dword [rbx - 0xc], 0
jl 0x14008d351
mov qword [rsp + 0x70], rbx
lock add dword [rbx - 0xc], r14d
mov rbx, qword [rsp + 0x40]
jmp 0x14008d375
mov rax, qword [0x1400ef018]
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.14006b5e4
add r13, 0x5d8
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x70]
mov rcx, r13
call fcn.140070150
lea rdx, [rbp - 0x48]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x14008d463
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp - 0x50]
call fcn.14006d500
nop
lea rcx, [r12 + 0x20]
mov rdx, rax
call fcn.14006c8f4
nop
mov rcx, qword [rbp - 0x50]
add rcx, 0xfffffffffffffff4
cmp rcx, qword [0x1400ef010]
je 0x14008d3ee
or eax, 0xffffffff
lock xadd dword [rcx], eax
sub eax, 1
jg 0x14008d3ee
mov rcx, qword [rbp - 0x50]
add rcx, 0xfffffffffffffff4
call fcn.1400b0a54
mov r8, qword [rdi]
lea rdx, str.Couldnt_get_file_size_of__s
lea rcx, [rsp + 0x40]
call fcn.14006d4dc
mov rbx, qword [rsp + 0x40]
cmp dword [rbx - 0xc], 0
jl 0x14008d41e
mov qword [rsp + 0x78], rbx
lock add dword [rbx - 0xc], r14d
mov rbx, qword [rsp + 0x40]
jmp 0x14008d442
mov rax, qword [0x1400ef018]
mov qword [rsp + 0x78], rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r8, rbx
mov edx, eax
lea rcx, [rsp + 0x78]
call fcn.14006b5e4
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x78]
mov rcx, r13
call fcn.140070150
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14008d706
mov rax, qword [0x1400ef018]
mov qword [rbp - 0x80], rax
mov dword [rsp + 0x54], r14d
lea rdi, [0x1400b8094]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov qword [rsp + 0x20], rdi
mov r9d, eax
mov rax, qword [rbp - 0x68]
mov r8, rax
mov edx, dword [rax - 8]
lea rcx, [rbp - 0x80]
call fcn.14006ccd0
nop
mov rax, qword [0x1400ef018]
mov qword [rbp - 0x70], rax
mov dword [rsp + 0x54], 3
mov rax, qword [r12]
mov qword [rsp + 0x20], rax
mov r9d, dword [rax - 8]
mov rdi, qword [rbp - 0x80]
mov r8, rdi
mov edx, dword [rdi - 8]
lea rcx, [rbp - 0x70]
call fcn.14006ccd0
lea rdx, [rbp - 0x70]
lea rcx, [rsp + 0x60]
call fcn.14006c8f4
nop
mov rcx, qword [rbp - 0x70]
add rcx, 0xfffffffffffffff4
cmp rcx, qword [0x1400ef010]
je 0x14008d50c
or eax, 0xffffffff
lock xadd dword [rcx], eax
sub eax, 1
jg 0x14008d503
call fcn.1400b0a54
mov rdi, qword [rbp - 0x80]
mov rbx, qword [rsp + 0x40]
lea rcx, [rdi - 0xc]
cmp rcx, qword [0x1400ef010]
je 0x14008d52f
or eax, 0xffffffff
lock xadd dword [rcx], eax
sub eax, 1
jg 0x14008d52a
call fcn.1400b0a54
mov rbx, qword [rsp + 0x40]
and qword [rsp + 0x30], 0
and dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov r8d, r14d
mov edx, 0x40000000
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
jne 0x14008d61c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp - 0x60]
call fcn.14006d500
nop
lea rcx, [r12 + 0x20]
mov rdx, rax
call fcn.14006c8f4
nop
mov rcx, qword [rbp - 0x60]
add rcx, 0xfffffffffffffff4
cmp rcx, qword [0x1400ef010]
je 0x14008d5af
or eax, r15d
lock xadd dword [rcx], eax
sub eax, 1
jg 0x14008d5af
mov rcx, qword [rbp - 0x60]
add rcx, 0xfffffffffffffff4
call fcn.1400b0a54
mov r8, qword [rsp + 0x60]
lea rdx, str.Error_creating_file__s.
lea rcx, [rsp + 0x40]
call fcn.14006d4dc
mov rbx, qword [rsp + 0x40]
cmp dword [rbx - 0xc], 0
jl 0x14008d5e0
mov qword [rbp - 0x78], rbx
lock add dword [rbx - 0xc], r14d
mov rbx, qword [rsp + 0x40]
jmp 0x14008d602
mov rax, qword [0x1400ef018]
mov qword [rbp - 0x78], rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r8, rbx
mov edx, eax
lea rcx, [rbp - 0x78]
call fcn.14006b5e4
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp - 0x78]
mov rcx, r13
call fcn.140070150
mov rcx, rsi
jmp 0x14008d6fb
xor edi, edi
jmp 0x14008d6a4
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x50]
mov r8d, 0x400
lea rdx, [rbp - 0x30]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14008d6b6
mov r8d, dword [rsp + 0x50]
test r8d, r8d
je 0x14008d6b6
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x58]
lea rdx, [rbp - 0x30]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14008d6b6
mov eax, dword [rsp + 0x58]
cmp dword [rsp + 0x50], eax
jne 0x14008d6b6
add rdi, rax
xorps xmm1, xmm1
cvtsi2ss xmm1, rdi
mulss xmm1, dword [0x1400bbfac]
xorps xmm0, xmm0
cvtsi2ss xmm0, qword [rbp - 0x48]
divss xmm1, xmm0
cvttss2si edx, xmm1
xor r8d, r8d
mov rcx, r13
call fcn.140070100
mov rcx, r13
call fcn.140070030
test al, al
je 0x14008d623
jmp 0x14008d6e9
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or rsi, 0xffffffffffffffff
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rdx, [rsp + 0x60]
lea rcx, [r12 + 8]
call fcn.14006c8f4
mov dword [rsp + 0x48], r14d
or r15, 0xffffffffffffffff
cmp rsi, r15
je 0x14008d701
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp r15, 0xffffffffffffffff
je 0x14008d701
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r15d, dword [rsp + 0x48]
mov rcx, qword [rbp - 0x68]
add rcx, 0xfffffffffffffff4
cmp rcx, qword [0x1400ef010]
je 0x14008d735
or eax, 0xffffffff
lock xadd dword [rcx], eax
sub eax, 1
jg 0x14008d730
mov rcx, qword [rbp - 0x68]
add rcx, 0xfffffffffffffff4
call fcn.1400b0a54
mov rbx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x60]
add rcx, 0xfffffffffffffff4
cmp rcx, qword [0x1400ef010]
je 0x14008d75d
or eax, 0xffffffff
lock xadd dword [rcx], eax
sub eax, 1
jg 0x14008d758
call fcn.1400b0a54
mov rbx, qword [rsp + 0x40]
lea rcx, [rbx - 0xc]
cmp rcx, qword [0x1400ef010]
je 0x14008d77b
or edx, 0xffffffff
lock xadd dword [rcx], edx
sub edx, 1
jg 0x14008d77b
call fcn.1400b0a54
mov eax, r15d
mov rcx, qword [rbp + 0x1fd0]
xor rcx, rsp
call fcn.1400b0f60
mov rbx, qword [rsp + 0x2130]
add rsp, 0x20e0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret