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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x2098]
mov eax, 0x2170
call fcn.140085050
sub rsp, rax
mov rax, qword [0x1401110c0]
xor rax, rsp
mov qword [rbp + 0x2060], rax
xor r13d, r13d
mov rcx, qword [0x1401254e0]
test rcx, rcx
jne 0x140041394
call fcn.140040fc4
test al, al
je 0x140041960
mov rcx, qword [0x1401254e0]
mov r14b, r13b
mov qword [rsp + 0x50], r13
mov rax, qword [rcx]
mov qword [rsp + 0x50], r13
lea rdx, [rsp + 0x50]
call qword [rax + 0x68]
test eax, eax
js 0x14004194c
mov qword [rsp + 0x48], r13
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x1400419bf
mov rax, qword [rcx]
mov qword [rsp + 0x48], r13
lea r8, [rsp + 0x48]
lea rdx, [0x1400f6248]
call qword [rax]
test eax, eax
js 0x14004193b
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], r13
lea r8, [rsp + 0x60]
lea rdx, [0x1400f5b44]
mov ecx, 0x65
call fcn.1400504dc
mov r12, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x60]
mov ebx, 0x1000
sub r12, rdi
je 0x140041904
xor edx, edx
mov r8d, 0x2000
lea rcx, [rbp + 0x60]
call fcn.1400ad7d0
lea rdx, [rbp + 0x60]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x140041904
xorps xmm0, xmm0
movups xmmword [rbp - 8], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 8], xmm1
mov r8d, 0x11
lea rdx, str.FLiNGTrainer.tmp
lea rcx, [rbp - 8]
call fcn.140003dfc
nop
lea rax, [rbp + 0x60]
or r9, 0xffffffffffffffff
inc r9
cmp word [rax + r9*2], r13w
jne 0x140041474
lea r8, [rbp + 0x60]
lea rcx, [rbp - 8]
call fcn.140041a70
xorps xmm0, xmm0
movups xmmword [rsp + 0x78], xmm0
mov qword [rbp - 0x78], r13
mov qword [rbp - 0x70], r13
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x78], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x78], xmm1
mov qword [rax + 0x10], r13
mov r15d, 7
mov qword [rax + 0x18], r15
mov word [rax], r13w
mov rdx, qword [rbp + 0x10]
cmp rdx, r15
jbe 0x1400414f8
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 8]
mov rax, rcx
cmp rdx, rbx
jb 0x1400414f3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400419ca
call fcn.140084350
movdqa xmm0, xmmword [0x140100df0]
movdqu xmmword [rbp + 8], xmm0
mov word [rbp - 8], r13w
xorps xmm0, xmm0
movups xmmword [rbp - 0x68], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x58], xmm1
mov r8d, 1
lea rdx, [0x1400f5ad8]
lea rcx, [rbp - 0x68]
call fcn.140003dfc
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x28], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x18], xmm1
mov esi, 2
mov r8d, esi
lea rdx, [0x1400f622c]
lea rcx, [rbp - 0x28]
call fcn.140003dfc
nop
lea r8, [rbp - 0x68]
lea rdx, [rbp - 0x28]
lea rcx, [rsp + 0x78]
call fcn.140050bac
nop
lea rcx, [rbp - 0x28]
call fcn.140018728
nop
mov rdx, qword [rbp - 0x50]
cmp rdx, r15
jbe 0x1400415b0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, rbx
jb 0x1400415ab
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400419d0
call fcn.140084350
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], r15
cmova rcx, qword [rsp + 0x78]
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], esi
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140041853
xorps xmm0, xmm0
movups xmmword [rbp - 0x68], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x58], xmm1
mov rsi, qword [rbp - 0x78]
lea r15, [rsp + 0x78]
lea ecx, [rax + 8]
cmp qword [rbp - 0x70], rcx
cmova r15, qword [rsp + 0x78]
movabs rbx, 0x7ffffffffffffffe
cmp rsi, rbx
ja 0x1400419d6
cmp rsi, rcx
ja 0x140041642
mov qword [rbp - 0x58], rsi
mov qword [rbp - 0x50], rcx
movups xmm0, xmmword [r15]
movdqu xmmword [rbp - 0x68], xmm0
jmp 0x1400416c5
mov rax, rsi
or rax, rcx
cmp rax, rbx
jbe 0x14004165d
movabs rax, 0x7fffffffffffffff
lea rcx, [rax + rax]
jmp 0x14004168f
mov rbx, rax
mov ecx, 0xa
cmp rax, rcx
cmovb rbx, rcx
lea rcx, [rbx + 1]
movabs rax, 0x7fffffffffffffff
cmp rcx, rax
ja 0x1400419dc
add rcx, rcx
cmp rcx, 0x1000
jb 0x140041696
call fcn.14001c284
jmp 0x1400416a5
test rcx, rcx
je 0x1400416a2
call fcn.140084384
jmp 0x1400416a5
mov rax, r13
mov qword [rbp - 0x68], rax
mov qword [rbp - 0x58], rsi
mov qword [rbp - 0x50], rbx
lea r8, [rsi*2 + 2]
mov rdx, r15
mov rcx, rax
call fcn.1400ad130
nop
mov esi, r13d
mov r15d, 7
lea rdx, [rbp - 0x68]
lea rcx, [rsp + 0x78]
call fcn.140017d24
mov edx, esi
lea rcx, [rbp + 0x38]
call fcn.1400408f0
nop
mov r9d, 1
lea r8, [0x1400f6244]
mov rcx, rax
call fcn.140041a70
xorps xmm0, xmm0
movups xmmword [rbp - 0x48], xmm0
mov qword [rbp - 0x38], r13
mov qword [rbp - 0x30], r13
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x48], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x38], xmm1
mov qword [rax + 0x18], r15
mov qword [rax + 0x10], r13
mov word [rax], r13w
mov r8d, 4
lea rdx, str..tmp
lea rcx, [rbp - 0x48]
call fcn.14003ea14
movups xmm0, xmmword [rax]
movups xmmword [rbp + 0x18], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0x28], xmm1
mov qword [rax + 0x10], r13
mov qword [rax + 0x18], r15
mov word [rax], r13w
xorps xmm0, xmm0
movups xmmword [rbp - 0x28], xmm0
mov qword [rbp - 0x18], r13
mov qword [rbp - 0x10], r13
mov r8d, 4
lea rdx, str..tmp
lea rcx, [rbp - 0x28]
call fcn.140003dfc
nop
lea r8, [rbp + 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rsp + 0x78]
call fcn.140050bac
nop
lea rcx, [rbp - 0x28]
call fcn.140018728
nop
lea rcx, [rbp + 0x18]
call fcn.140018728
nop
mov rdx, qword [rbp - 0x30]
cmp rdx, r15
jbe 0x1400417e4
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400417df
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400419e8
call fcn.140084350
mov qword [rbp - 0x38], r13
mov qword [rbp - 0x30], r15
mov word [rbp - 0x48], r13w
lea rcx, [rbp + 0x38]
call fcn.140018728
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], r15
cmova rcx, qword [rsp + 0x78]
mov qword [rsp + 0x30], r13
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 0x140041844
inc esi
cmp esi, 0x32
jl 0x1400416ce
lea rcx, [rbp - 0x68]
call fcn.140018728
cmp rbx, 0xffffffffffffffff
je 0x14004187a
mov dword [rsp + 0x40], r13d
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x40]
mov r8d, r12d
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], r15
cmova rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400418f5
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], r15
jbe 0x140041990
mov rcx, qword [rsp + 0x78]
test rcx, rcx
jne 0x140041990
mov rbx, r13
mov qword [rsp + 0x58], rbx
mov dword [rsp + 0x40], r13d
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x1400419a9
mov rax, qword [rcx]
lea r9, [rsp + 0x40]
xor r8d, r8d
mov rdx, rbx
call qword [rax + 0x190]
mov r14d, eax
shr r14d, 0x1f
xor r14b, 1
mov rcx, rbx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
nop
lea rcx, [rsp + 0x78]
call fcn.140018728
mov ebx, 0x1000
test rdi, rdi
je 0x14004193b
mov rdx, qword [rsp + 0x70]
sub rdx, rdi
mov rax, rdi
cmp rdx, rbx
jb 0x140041932
add rdx, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400419e2
mov rcx, rdi
call fcn.140084350
nop
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x14004194c
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x14004195d
mov rdx, qword [rcx]
call qword [rdx + 0x10]
nop
mov al, r14b
mov rcx, qword [rbp + 0x2060]
xor rcx, rsp
call fcn.140084330
lea r11, [rsp + 0x2170]
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 qword [sym.imp.OLEAUT32.dll_SysReAllocString]
nop
mov rbx, rax
mov qword [rsp + 0x58], rax
test rax, rax
je 0x1400419b4
jmp 0x1400418b9
mov ecx, 0x80004003
call fcn.140081b60
nop
mov ecx, 0x8007000e
call fcn.140040a04
nop
mov ecx, 0x80004003
call fcn.140081b60
nop
call fcn.14008b440
int3
call fcn.14008b440
int3
call fcn.140001844
int3
call fcn.1400017ac
nop
call fcn.14008b440
nop
call fcn.14008b440
int3