Function at 0x14004f5d0
Capabilities:
Check if file exists
Get common file path
Get file attributes
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x20a0]
mov eax, 0x21a0
call fcn.14009a740
sub rsp, rax
mov rax, qword [0x14012a098]
xor rax, rsp
mov qword [rbp + 0x2090], rax
mov rcx, qword [0x14013e6a8]
test rcx, rcx
jne 0x14004f62e
call fcn.14004f1a0
test al, al
je 0x14004fffe
mov rcx, qword [0x14013e6a8]
xor dil, dil
xor esi, esi
mov qword [rsp + 0x58], rsi
mov rax, qword [rcx]
mov qword [rsp + 0x58], rsi
lea rdx, [rsp + 0x58]
call qword [rax + 0x68]
test eax, eax
js 0x14004ffe9
mov qword [rsp + 0x50], rsi
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x14005003f
mov rax, qword [rcx]
mov qword [rsp + 0x50], rsi
lea r8, [rsp + 0x50]
lea rdx, [0x140110180]
call qword [rax]
test eax, eax
js 0x14004ffd8
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x68], xmm0
mov qword [rsp + 0x78], rsi
lea r8, [rsp + 0x68]
lea rdx, [0x14010faa0]
lea ecx, [rsi + 0x65]
call fcn.140060600
mov rax, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x68]
sub rax, rbx
mov qword [rsp + 0x60], rax
je 0x14004ffa1
xor edx, edx
mov r8d, 0x2000
lea rcx, [rbp + 0x90]
call fcn.14009c370
lea rdx, [rbp + 0x90]
mov ecx, 0x1000
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x14004ffa1
mov qword [rbp - 0x20], rsi
mov qword [rbp - 0x10], rsi
mov qword [rbp - 8], 7
mov word [rbp - 0x20], si
lea r8d, [rsi + 0x11]
lea rdx, str.FLiNGTrainer.tmp
lea rcx, [rbp - 0x20]
call fcn.140005480
nop
lea rax, [rbp + 0x90]
mov r9, 0xffffffffffffffff
inc r9
cmp word [rax + r9*2], 0
jne 0x14004f720
lea r8, [rbp + 0x90]
lea rcx, [rbp - 0x20]
call fcn.140050130
mov qword [rbp - 0x80], rsi
mov qword [rbp - 0x70], rsi
mov qword [rbp - 0x68], rsi
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x80], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x70], xmm1
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], 7
mov word [rax], si
mov rdx, qword [rbp - 8]
cmp rdx, 8
jb 0x14004f7a5
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004f7a0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14005004a
call fcn.1400998c0
mov qword [rbp - 0x10], rsi
mov qword [rbp - 8], 7
mov word [rbp - 0x20], si
mov qword [rbp - 0x60], rsi
mov qword [rbp - 0x50], rsi
mov qword [rbp - 0x48], 7
mov word [rbp - 0x60], si
mov r8d, 1
lea rdx, [0x14010fa08]
lea rcx, [rbp - 0x60]
call fcn.140005480
nop
mov qword [rbp - 0x40], rsi
mov qword [rbp - 0x30], rsi
mov qword [rbp - 0x28], 7
mov word [rbp - 0x40], si
mov r8d, 2
lea rdx, [0x14011013c]
lea rcx, [rbp - 0x40]
call fcn.140005480
nop
mov rbx, rsi
cmp qword [rbp - 0x28], 8
setae r12b
mov rdi, qword [rbp - 0x30]
mov r13, qword [rbp - 0x40]
mov r15, qword [rbp - 0x50]
nop dword [rax]
nop word [rax + rax]
lea r11, [rbp - 0x40]
test r12b, r12b
cmovne r11, r13
lea rsi, [rbp - 0x80]
cmp qword [rbp - 0x68], 8
cmovae rsi, qword [rbp - 0x80]
mov rax, qword [rbp - 0x70]
cmp rdi, rax
ja 0x14004f92c
sub rax, rdi
cmp rbx, rax
ja 0x14004f92c
test rdi, rdi
je 0x14004f8f8
lea r14, [rax + 1]
lea r14, [rsi + r14*2]
lea rbx, [rsi + rbx*2]
movzx r10d, word [r11]
nop dword [rax + rax]
mov rax, r14
sub rax, rbx
sar rax, 1
mov ecx, 0
je 0x14004f8ac
cmp word [rbx], r10w
je 0x14004f8a9
cmp rax, 1
je 0x14004f8ac
dec rax
add rbx, 2
cmp word [rbx], r10w
jne 0x14004f896
mov rcx, rbx
mov rbx, rcx
test rcx, rcx
je 0x14004f92c
mov r8, rdi
mov rax, r11
movzx ecx, word [rcx]
movzx edx, r10w
cmp cx, r10w
jb 0x14004f8ec
mov r9, rbx
sub r9, r11
cmp cx, dx
ja 0x14004f8ec
cmp r8, 1
je 0x14004f8f2
dec r8
add rax, 2
movzx ecx, word [rax + r9]
movzx edx, word [rax]
cmp cx, dx
jae 0x14004f8d0
add rbx, 2
jmp 0x14004f880
sub rbx, rsi
sar rbx, 1
cmp rbx, 0xffffffffffffffff
je 0x14004f92c
lea r9, [rbp - 0x60]
cmp qword [rbp - 0x48], 8
cmovae r9, qword [rbp - 0x60]
mov qword [rsp + 0x20], r15
mov r8, rdi
mov rdx, rbx
lea rcx, [rbp - 0x80]
call fcn.140064e70
mov r15, qword [rbp - 0x50]
add rbx, r15
jmp 0x14004f830
test r12b, r12b
je 0x14004f96b
mov rdx, qword [rbp - 0x28]
lea rdx, [rdx*2 + 2]
mov rax, r13
cmp rdx, 0x1000
jb 0x14004f962
add rdx, 0x27
mov r13, qword [r13 - 8]
sub rax, r13
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140050050
mov rcx, r13
call fcn.1400998c0
nop
mov rdx, qword [rbp - 0x48]
cmp rdx, 8
jb 0x14004f9ab
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004f9a6
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140050074
call fcn.1400998c0
lea rcx, [rbp - 0x80]
cmp qword [rbp - 0x68], 8
cmovae rcx, qword [rbp - 0x80]
xor r14d, r14d
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [r14 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x14004fea8
mov r15, qword [rbp - 0x70]
lea rbx, [rbp - 0x80]
mov rsi, qword [rbp - 0x68]
cmp rsi, 8
cmovae rbx, qword [rbp - 0x80]
movabs rdx, 0x7ffffffffffffffe
cmp r15, 8
jae 0x14004fa2c
movups xmm0, xmmword [rbx]
movups xmmword [rbp - 0x40], xmm0
mov edi, 7
mov qword [rsp + 0x48], rdi
mov r13, qword [rbp - 0x40]
jmp 0x14004fa74
mov rdi, r15
or rdi, 7
cmp rdi, rdx
cmova rdi, rdx
mov qword [rsp + 0x48], rdi
lea rdx, [rdi + 1]
lea rcx, [rbp - 0x40]
call fcn.14001dd60
mov r13, rax
mov qword [rbp - 0x40], rax
lea r8, [r15*2 + 2]
mov rdx, rbx
mov rcx, rax
call fcn.14009bcc0
mov rsi, qword [rbp - 0x68]
movabs rdx, 0x7ffffffffffffffe
mov qword [rbp - 0x28], rdi
mov qword [rbp - 0x30], r15
mov r12d, r14d
cmp rdi, 8
setae al
mov byte [rsp + 0x40], al
nop word [rax + rax]
lea r14, [rbp - 0x40]
test al, al
cmovne r14, r13
cmp r15, rsi
ja 0x14004facf
lea rdi, [rbp - 0x80]
cmp rsi, 8
cmovae rdi, qword [rbp - 0x80]
mov qword [rbp - 0x70], r15
lea rbx, [r15 + r15]
mov r8, rbx
mov rdx, r14
mov rcx, rdi
call fcn.14009bcc0
xor r14d, r14d
mov word [rdi + rbx], r14w
jmp 0x14004fb7c
cmp r15, rdx
ja 0x14005007a
mov rbx, r15
or rbx, 7
cmp rbx, rdx
jbe 0x14004fae9
mov rbx, rdx
jmp 0x14004fb0a
mov rcx, rsi
shr rcx, 1
mov rax, rdx
sub rax, rcx
cmp rsi, rax
jbe 0x14004faff
mov rbx, rdx
jmp 0x14004fb0a
lea rax, [rcx + rsi]
cmp rbx, rax
cmovb rbx, rax
lea rdx, [rbx + 1]
lea rcx, [rbp - 0x80]
call fcn.14001dd60
mov rdi, rax
mov qword [rbp - 0x70], r15
mov qword [rbp - 0x68], rbx
lea rbx, [r15 + r15]
mov r8, rbx
mov rdx, r14
mov rcx, rax
call fcn.14009bcc0
xor r14d, r14d
mov word [rdi + rbx], r14w
cmp rsi, 8
jb 0x14004fb78
lea rdx, [rsi*2 + 2]
mov rcx, qword [rbp - 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004fb73
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140050056
call fcn.1400998c0
mov qword [rbp - 0x80], rdi
lea r9, [rbp + 0x8a]
mov r8d, r12d
test r12d, r12d
jns 0x14004fbd0
neg r8d
nop
sub r9, 2
mov eax, 0xcccccccd
mul r8d
shr edx, 3
movzx eax, dx
shl ax, 2
lea ecx, [rax + rdx]
add cx, cx
sub r8w, cx
add r8w, 0x30
mov word [r9], r8w
mov r8d, edx
test edx, edx
jne 0x14004fb90
add r9, 0xfffffffffffffffe
mov eax, 0x2d
mov word [r9], ax
jmp 0x14004fc00
sub r9, 2
mov eax, 0xcccccccd
mul r8d
shr edx, 3
movzx eax, dx
shl ax, 2
lea ecx, [rax + rdx]
add cx, cx
sub r8w, cx
add r8w, 0x30
mov word [r9], r8w
mov r8d, edx
test edx, edx
jne 0x14004fbd0
mov qword [rbp + 0x20], r14
mov qword [rbp + 0x30], r14
mov qword [rbp + 0x38], 7
mov word [rbp + 0x20], r14w
lea rax, [rbp + 0x8a]
cmp r9, rax
je 0x14004fc3b
lea r8, [rbp + 0x8a]
sub r8, r9
sar r8, 1
mov rdx, r9
lea rcx, [rbp + 0x20]
call fcn.140005480
nop
mov r9d, 1
lea r8, [0x14011016c]
lea rcx, [rbp + 0x20]
call fcn.140050130
mov qword [rbp - 0x60], r14
mov qword [rbp - 0x50], r14
mov qword [rbp - 0x48], r14
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x60], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x50], xmm1
mov qword [rax + 0x10], r14
mov qword [rax + 0x18], 7
mov word [rax], r14w
mov r8d, 4
lea rdx, [0x140110170]
lea rcx, [rbp - 0x60]
call fcn.14004bf40
movups xmm0, xmmword [rax]
movups xmmword [rbp + 0x40], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0x50], xmm1
mov qword [rax + 0x10], r14
mov qword [rax + 0x18], 7
mov word [rax], r14w
mov qword [rbp], r14
mov qword [rbp + 0x10], r14
mov qword [rbp + 0x18], 7
mov word [rbp], r14w
mov r8d, 4
lea rdx, [0x140110170]
lea rcx, [rbp]
call fcn.140005480
nop
lea r8, [rbp + 0x40]
lea rdx, [rbp]
lea rcx, [rbp - 0x80]
call fcn.140060ca0
nop
mov rdx, qword [rbp + 0x18]
cmp rdx, 8
jb 0x14004fd30
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004fd2a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14005005c
call fcn.1400998c0
nop
mov rdx, qword [rbp + 0x58]
cmp rdx, 8
jb 0x14004fd71
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004fd6b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140050062
call fcn.1400998c0
nop
mov rdx, qword [rbp - 0x48]
cmp rdx, 8
jb 0x14004fdb1
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004fdac
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140050068
call fcn.1400998c0
mov qword [rbp - 0x50], r14
mov qword [rbp - 0x48], 7
mov word [rbp - 0x60], r14w
mov rdx, qword [rbp + 0x38]
cmp rdx, 8
jb 0x14004fe02
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004fdfd
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14005006e
call fcn.1400998c0
lea rcx, [rbp - 0x80]
cmp qword [rbp - 0x68], 8
cmovae rcx, qword [rbp - 0x80]
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x14004fe61
inc r12d
cmp r12d, 0x32
jge 0x14004fe61
mov rsi, qword [rbp - 0x68]
movzx eax, byte [rsp + 0x40]
movabs rdx, 0x7ffffffffffffffe
jmp 0x14004fa90
cmp byte [rsp + 0x40], 0
je 0x14004fea2
mov rdx, qword [rsp + 0x48]
lea rdx, [rdx*2 + 2]
mov rax, r13
cmp rdx, 0x1000
jb 0x14004fe9a
add rdx, 0x27
mov r13, qword [r13 - 8]
sub rax, r13
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140050074
mov rcx, r13
call fcn.1400998c0
cmp rbx, 0xffffffffffffffff
je 0x14004fed3
mov dword [rsp + 0x48], r14d
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x48]
mov r8d, dword [rsp + 0x60]
mov rdx, qword [rsp + 0x68]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp - 0x80]
cmp qword [rbp - 0x68], 8
cmovae rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14004ff59
lea rcx, [rbp - 0x80]
cmp qword [rbp - 0x68], 8
jb 0x14004ff40
mov rcx, qword [rbp - 0x80]
test rcx, rcx
jne 0x14004ff40
mov rbx, r14
mov qword [rsp + 0x60], rbx
mov dword [rsp + 0x48], r14d
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140050080
mov rax, qword [rcx]
lea r9, [rsp + 0x48]
xor r8d, r8d
mov rdx, rbx
call qword [rax + 0x190]
test eax, eax
setns dil
mov rcx, rbx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
jmp 0x14004ff5c
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov rbx, rax
mov qword [rsp + 0x60], rax
test rax, rax
je 0x140050034
jmp 0x14004ff08
xor dil, dil
mov rdx, qword [rbp - 0x68]
cmp rdx, 8
jb 0x14004ff9c
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004ff97
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14005008b
call fcn.1400998c0
mov rbx, qword [rsp + 0x68]
test rbx, rbx
je 0x14004ffd8
mov rdx, qword [rsp + 0x78]
sub rdx, rbx
mov rax, rbx
cmp rdx, 0x1000
jb 0x14004ffcf
add rdx, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14005002e
mov rcx, rbx
call fcn.1400998c0
nop
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x14004ffe9
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x14004fffa
mov rdx, qword [rcx]
call qword [rdx + 0x10]
nop
movzx eax, dil
mov rcx, qword [rbp + 0x2090]
xor rcx, rsp
call fcn.1400998a0
lea r11, [rsp + 0x21a0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.1400a03a4
nop
mov ecx, 0x8007000e
call fcn.14004eb70
nop
mov ecx, 0x80004003
call fcn.140096c90
nop
call fcn.1400a03a4
nop
call fcn.1400a03a4
nop
call fcn.1400a03a4
nop
call fcn.1400a03a4
nop
call fcn.1400a03a4
nop
call fcn.1400a03a4
nop
call fcn.1400a03a4
nop
call fcn.1400a03a4
nop
call fcn.140002380
nop
mov ecx, 0x80004003
call fcn.140096c90
nop
call fcn.1400a03a4
int3