Function at 0x140041094
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.140083e10
sub rsp, rax
mov rax, qword [0x14010b0c0]
xor rax, rsp
mov qword [rbp + 0x2060], rax
xor r13d, r13d
mov rcx, qword [0x14011f510]
test rcx, rcx
jne 0x1400410f4
call fcn.140040d24
test al, al
je 0x1400416c0
mov rcx, qword [0x14011f510]
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 0x1400416ac
mov qword [rsp + 0x48], r13
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x14004171f
mov rax, qword [rcx]
mov qword [rsp + 0x48], r13
lea r8, [rsp + 0x48]
lea rdx, [0x1400f6278]
call qword [rax]
test eax, eax
js 0x14004169b
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], r13
lea r8, [rsp + 0x60]
lea rdx, [0x1400f5b74]
mov ecx, 0x65
call fcn.14004f3c8
mov r12, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x60]
mov ebx, 0x1000
sub r12, rdi
je 0x140041664
xor edx, edx
mov r8d, 0x2000
lea rcx, [rbp + 0x60]
call fcn.1400ae5c0
lea rdx, [rbp + 0x60]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x140041664
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 0x1400411d4
lea r8, [rbp + 0x60]
lea rcx, [rbp - 8]
call fcn.1400417d0
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 0x140041258
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 8]
mov rax, rcx
cmp rdx, rbx
jb 0x140041253
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14004172a
call fcn.140083110
movdqa xmm0, xmmword [0x1400fb6b0]
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, [0x1400f5b08]
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, [0x1400f625c]
lea rcx, [rbp - 0x28]
call fcn.140003dfc
nop
lea r8, [rbp - 0x68]
lea rdx, [rbp - 0x28]
lea rcx, [rsp + 0x78]
call fcn.14004fa98
nop
lea rcx, [rbp - 0x28]
call fcn.140018728
nop
mov rdx, qword [rbp - 0x50]
cmp rdx, r15
jbe 0x140041310
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, rbx
jb 0x14004130b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140041730
call fcn.140083110
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 0x1400415b3
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 0x140041736
cmp rsi, rcx
ja 0x1400413a2
mov qword [rbp - 0x58], rsi
mov qword [rbp - 0x50], rcx
movups xmm0, xmmword [r15]
movdqu xmmword [rbp - 0x68], xmm0
jmp 0x140041425
mov rax, rsi
or rax, rcx
cmp rax, rbx
jbe 0x1400413bd
movabs rax, 0x7fffffffffffffff
lea rcx, [rax + rax]
jmp 0x1400413ef
mov rbx, rax
mov ecx, 0xa
cmp rax, rcx
cmovb rbx, rcx
lea rcx, [rbx + 1]
movabs rax, 0x7fffffffffffffff
cmp rcx, rax
ja 0x14004173c
add rcx, rcx
cmp rcx, 0x1000
jb 0x1400413f6
call fcn.14001c12c
jmp 0x140041405
test rcx, rcx
je 0x140041402
call fcn.140083144
jmp 0x140041405
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.1400adf20
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.140040648
nop
mov r9d, 1
lea r8, [0x1400f6274]
mov rcx, rax
call fcn.1400417d0
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.14003e76c
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.14004fa98
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 0x140041544
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004153f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140041748
call fcn.140083110
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 0x1400415a4
inc esi
cmp esi, 0x32
jl 0x14004142e
lea rcx, [rbp - 0x68]
call fcn.140018728
cmp rbx, 0xffffffffffffffff
je 0x1400415da
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 0x140041655
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], r15
jbe 0x1400416f0
mov rcx, qword [rsp + 0x78]
test rcx, rcx
jne 0x1400416f0
mov rbx, r13
mov qword [rsp + 0x58], rbx
mov dword [rsp + 0x40], r13d
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140041709
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 0x14004169b
mov rdx, qword [rsp + 0x70]
sub rdx, rdi
mov rax, rdi
cmp rdx, rbx
jb 0x140041692
add rdx, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140041742
mov rcx, rdi
call fcn.140083110
nop
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x1400416ac
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x1400416bd
mov rdx, qword [rcx]
call qword [rdx + 0x10]
nop
mov al, r14b
mov rcx, qword [rbp + 0x2060]
xor rcx, rsp
call fcn.1400830f0
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 0x140041714
jmp 0x140041619
mov ecx, 0x80004003
call fcn.140080920
nop
mov ecx, 0x8007000e
call fcn.14004075c
nop
mov ecx, 0x80004003
call fcn.140080920
nop
call fcn.14008a200
int3
call fcn.14008a200
int3
call fcn.140001844
int3
call fcn.1400017ac
nop
call fcn.14008a200
nop
call fcn.14008a200
int3