Function at 0x1400507b0
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 - 0x20e0]
mov eax, 0x21e0
call fcn.14009d360
sub rsp, rax
mov rax, qword [0x1401280a8]
xor rax, rsp
mov qword [rbp + 0x20d0], rax
xor r13d, r13d
mov rcx, qword [0x14013c440]
test rcx, rcx
jne 0x140050811
call fcn.140050380
test al, al
je 0x140051357
mov rcx, qword [0x14013c440]
xor dil, dil
mov dword [rsp + 0x4c], edi
mov qword [rsp + 0x58], r13
mov rax, qword [rcx]
mov qword [rsp + 0x58], r13
lea rdx, [rsp + 0x58]
call qword [rax + 0x68]
test eax, eax
js 0x140051342
mov qword [rsp + 0x50], r13
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140051398
mov rax, qword [rcx]
mov qword [rsp + 0x50], r13
lea r8, [rsp + 0x50]
lea rdx, [0x14010ec30]
call qword [rax]
test eax, eax
js 0x140051331
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x78], xmm0
mov qword [rbp - 0x78], r13
lea r8, [rsp + 0x78]
lea rdx, [0x14010e534]
mov ecx, 0x65
call fcn.140061a70
mov r12, qword [rbp - 0x80]
mov qword [rsp + 0x68], r12
mov r15, qword [rsp + 0x78]
mov qword [rsp + 0x70], r15
cmp r12, r15
je 0x1400512fb
xor edx, edx
mov r8d, 0x2000
lea rcx, [rbp + 0xd0]
call fcn.14009efa0
lea rdx, [rbp + 0xd0]
mov ecx, 0x1000
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x1400512fb
xorps xmm0, xmm0
movups xmmword [rbp + 0x10], xmm0
mov qword [rbp + 0x20], r13
mov qword [rbp + 0x28], 7
mov edx, reloc.OLEAUT32.dll_SafeArrayGetElement
lea rcx, [rbp + 0x10]
call fcn.14001f170
mov qword [rbp + 0x10], rax
mov qword [rbp + 0x20], SafeArrayUnaccessData
mov qword [rbp + 0x28], reloc.OLEAUT32.dll_SafeArrayUnaccessData
movups xmm0, xmmword [str.FLiNGTrainer.tmp]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x14010ec08]
movups xmmword [rax + 0x10], xmm1
movzx ecx, word [0x14010ec18]
mov word [rax + 0x20], cx
mov word [rax + 0x22], r13w
lea rax, [rbp + 0xd0]
mov r9, 0xffffffffffffffff
nop dword [rax + rax]
inc r9
cmp word [rax + r9*2], 0
jne 0x140050940
lea r8, [rbp + 0xd0]
lea rcx, [rbp + 0x10]
call fcn.140051480
xorps xmm0, xmm0
movups xmmword [rbp - 0x70], xmm0
mov qword [rbp - 0x60], r13
mov qword [rbp - 0x58], r13
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x70], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x60], xmm1
mov qword [rax + 0x10], r13
mov qword [rax + 0x18], 7
mov word [rax], r13w
mov rdx, qword [rbp + 0x28]
cmp rdx, 8
jb 0x1400509c9
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x10]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400509c4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400513a3
call fcn.14009c650
mov qword [rbp + 0x20], r13
mov qword [rbp + 0x28], 7
mov word [rbp + 0x10], r13w
xorps xmm0, xmm0
movups xmmword [rbp - 0x50], xmm0
mov r11d, 1
mov qword [rbp - 0x40], r11
mov edi, 7
mov qword [rbp - 0x38], rdi
mov dword [rbp - 0x50], 0x5c
movups xmmword [rbp + 0x58], xmm0
mov qword [rbp + 0x68], 2
mov qword [rbp + 0x70], rdi
mov dword [rbp + 0x58], 0x5c005c
mov word [rbp + 0x5c], r13w
mov rcx, r13
nop word [rax + rax]
lea r9, [rbp - 0x70]
mov rsi, qword [rbp - 0x70]
mov r14, qword [rbp - 0x58]
cmp r14, 8
cmovae r9, rsi
mov rax, qword [rbp - 0x60]
cmp rax, 2
jb 0x140050b01
add rax, 0xfffffffffffffffe
cmp rcx, rax
ja 0x140050b01
lea r10, [rax + 1]
lea r10, [r9 + r10*2]
lea rbx, [r9 + rcx*2]
nop dword [rax + rax]
mov rax, r10
sub rax, rbx
sar rax, 1
mov rcx, r13
je 0x140050a8a
cmp word [rbx], 0x5c
je 0x140050a87
cmp rax, 1
je 0x140050a8a
dec rax
add rbx, 2
cmp word [rbx], 0x5c
jne 0x140050a74
mov rcx, rbx
mov rbx, rcx
test rcx, rcx
je 0x140050b01
mov edx, 2
lea rcx, [rbp + 0x58]
lea rax, [rbp + 0x58]
mov r8, rbx
sub r8, rax
movzx eax, word [r8 + rcx]
cmp ax, word [rcx]
jne 0x140050af8
add rcx, 2
sub rdx, 1
jne 0x140050aa5
sub rbx, r9
sar rbx, 1
cmp rbx, 0xffffffffffffffff
je 0x140050b01
lea r9, [rbp - 0x50]
cmp rdi, 8
cmovae r9, qword [rbp - 0x50]
mov qword [rsp + 0x20], r11
lea r8d, [rdx + 2]
mov rdx, rbx
lea rcx, [rbp - 0x70]
call fcn.140065eb0
mov r11, qword [rbp - 0x40]
lea rcx, [r11 + rbx]
mov rdi, qword [rbp - 0x38]
jmp 0x140050a20
add rbx, 2
jmp 0x140050a60
cmp rdi, 8
jb 0x140050b45
lea rdx, [rdi*2 + 2]
mov rcx, qword [rbp - 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140050b38
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400513c7
call fcn.14009c650
mov r14, qword [rbp - 0x58]
mov rsi, qword [rbp - 0x70]
lea rcx, [rbp - 0x70]
cmp r14, 8
cmovae rcx, rsi
xor esi, esi
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [rsi + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140051205
xorps xmm0, xmm0
movups xmmword [rbp - 0x50], xmm0
mov qword [rbp - 0x40], rsi
mov qword [rbp - 0x38], rsi
mov r12, qword [rbp - 0x60]
lea rbx, [rbp - 0x70]
mov r14, qword [rbp - 0x58]
cmp r14, 8
cmovae rbx, qword [rbp - 0x70]
movabs rdx, 0x7ffffffffffffffe
cmp r12, rdx
ja 0x1400513a9
lea eax, [rsi + 0xa]
cmp r12, 8
jae 0x140050bec
mov qword [rbp - 0x40], r12
mov edi, 7
mov qword [rsp + 0x40], rdi
mov qword [rbp - 0x38], rdi
movups xmm0, xmmword [rbx]
movups xmmword [rbp - 0x50], xmm0
movq rsi, xmm0
mov qword [rsp + 0x60], rsi
jmp 0x140050c50
mov rdi, r12
or rdi, 7
cmp rdi, rdx
jbe 0x140050c02
mov rdi, rdx
mov qword [rsp + 0x40], rdx
jmp 0x140050c0e
cmp rdi, rax
cmovb rdi, rax
mov qword [rsp + 0x40], rdi
lea rdx, [rdi + 1]
lea rcx, [rbp - 0x50]
call fcn.14001f170
mov rsi, rax
mov qword [rsp + 0x60], rax
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x40], r12
mov qword [rbp - 0x38], rdi
lea r8, [r12*2 + 2]
mov rdx, rbx
mov rcx, rax
call fcn.14009e900
mov r14, qword [rbp - 0x58]
movabs rdx, 0x7ffffffffffffffe
xor r13d, r13d
movzx ebx, byte [rsp + 0x48]
nop dword [rax + rax]
lea r15, [rbp - 0x50]
cmp rdi, 8
cmovae r15, rsi
cmp r12, r14
ja 0x140050c9f
lea rsi, [rbp - 0x70]
cmp r14, 8
cmovae rsi, qword [rbp - 0x70]
mov qword [rbp - 0x60], r12
lea rdi, [r12 + r12]
mov r8, rdi
mov rdx, r15
mov rcx, rsi
call fcn.14009e900
xor eax, eax
mov word [rsi + rdi], ax
jmp 0x140050d4a
cmp r12, rdx
ja 0x1400513d3
mov rdi, r12
or rdi, 7
cmp rdi, rdx
jbe 0x140050cb9
mov rdi, rdx
jmp 0x140050cda
mov rcx, r14
shr rcx, 1
mov rax, rdx
sub rax, rcx
cmp r14, rax
jbe 0x140050ccf
mov rdi, rdx
jmp 0x140050cda
lea rax, [rcx + r14]
cmp rdi, rax
cmovb rdi, rax
lea rdx, [rdi + 1]
lea rcx, [rbp - 0x70]
call fcn.14001f170
mov rsi, rax
mov qword [rbp - 0x60], r12
mov qword [rbp - 0x58], rdi
lea rdi, [r12 + r12]
mov r8, rdi
mov rdx, r15
mov rcx, rax
call fcn.14009e900
xor eax, eax
mov word [rsi + rdi], ax
cmp r14, 8
jb 0x140050d46
lea rdx, [r14*2 + 2]
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140050d41
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400513af
call fcn.14009c650
mov qword [rbp - 0x70], rsi
lea r14, [rbp + 0xc2]
mov r8d, r13d
test r13d, r13d
jns 0x140050da0
neg r8d
nop dword [rax]
sub r14, 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 [r14], r8w
mov r8d, edx
test edx, edx
jne 0x140050d60
add r14, 0xfffffffffffffffe
mov word [r14], 0x2d
jmp 0x140050dd0
sub r14, 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 [r14], r8w
mov r8d, edx
test edx, edx
jne 0x140050da0
xorps xmm0, xmm0
movups xmmword [rbp - 0x30], xmm0
xor esi, esi
mov qword [rbp - 0x20], rsi
mov qword [rbp - 0x18], rsi
lea rax, [rbp + 0xc2]
cmp r14, rax
jne 0x140050e02
mov qword [rbp - 0x20], rsi
mov qword [rbp - 0x18], 7
mov word [rbp - 0x30], si
jmp 0x140050ea0
lea rdi, [rbp + 0xc2]
sub rdi, r14
sar rdi, 1
movabs rax, 0x7ffffffffffffffe
cmp rdi, rax
ja 0x1400513cd
mov qword [rbp - 0x18], 7
cmp rdi, 8
jae 0x140050e4d
mov qword [rbp - 0x20], rdi
add rdi, rdi
mov r8, rdi
mov rdx, r14
lea rcx, [rbp - 0x30]
call fcn.14009e900
mov word [rbp + rdi - 0x30], si
jmp 0x140050ea0
mov r15, rdi
or r15, 7
cmp r15, rax
jbe 0x140050e5e
mov r15, rax
jmp 0x140050e6b
cmp r15, 0xa
mov eax, 0xa
cmovb r15, rax
lea rdx, [r15 + 1]
lea rcx, [rbp - 0x30]
call fcn.14001f170
mov rsi, rax
mov qword [rbp - 0x30], rax
mov qword [rbp - 0x20], rdi
mov qword [rbp - 0x18], r15
add rdi, rdi
mov r8, rdi
mov rdx, r14
mov rcx, rax
call fcn.14009e900
xor eax, eax
mov word [rsi + rdi], ax
xor esi, esi
mov r9d, 1
lea r8, [0x14010ec2c]
lea rcx, [rbp - 0x30]
call fcn.140051480
xorps xmm0, xmm0
movups xmmword [rbp - 0x10], xmm0
mov qword [rbp], rsi
mov qword [rbp + 8], rsi
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x10], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp], xmm1
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], 7
mov word [rax], si
mov rcx, qword [rbp]
mov rdx, qword [rbp + 8]
mov rax, rdx
sub rax, rcx
cmp rax, 4
jb 0x140050f25
lea rax, [rcx + 4]
mov qword [rbp], rax
lea rax, [rbp - 0x10]
cmp rdx, 8
cmovae rax, qword [rbp - 0x10]
movabs rdx, 0x70006d0074002e
mov qword [rax + rcx*2], rdx
mov word [rax + rcx*2 + 8], si
lea rax, [rbp - 0x10]
jmp 0x140050f47
mov qword [rsp + 0x20], 4
lea r9, str..tmp
movzx r8d, bl
mov edx, 4
lea rcx, [rbp - 0x10]
call fcn.14004d110
movups xmm0, xmmword [rax]
movups xmmword [rbp + 0x38], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0x48], xmm1
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], 7
mov word [rax], si
xorps xmm0, xmm0
movups xmmword [rbp + 0x78], xmm0
mov qword [rbp + 0x88], 4
mov qword [rbp + 0x90], 7
movabs rax, 0x70006d0074002e
mov qword [rbp + 0x78], rax
mov word [rbp + 0x80], si
mov rcx, rsi
mov r11, qword [rbp + 0x48]
nop
lea r9, [rbp - 0x70]
cmp qword [rbp - 0x58], 8
cmovae r9, qword [rbp - 0x70]
mov rax, qword [rbp - 0x60]
cmp rax, 4
jb 0x14005107e
add rax, 0xfffffffffffffffc
cmp rcx, rax
ja 0x14005107e
lea r10, [rax + 1]
lea r10, [r9 + r10*2]
lea rdi, [r9 + rcx*2]
nop word [rax + rax]
mov rax, r10
sub rax, rdi
sar rax, 1
mov rcx, rsi
je 0x14005100a
cmp word [rdi], 0x2e
je 0x140051007
cmp rax, 1
je 0x14005100a
dec rax
add rdi, 2
cmp word [rdi], 0x2e
jne 0x140050ff4
mov rcx, rdi
mov rdi, rcx
test rcx, rcx
je 0x14005107e
mov edx, 4
lea rcx, [rbp + 0x78]
lea rax, [rbp + 0x78]
mov r8, rdi
sub r8, rax
movzx eax, word [rcx + r8]
cmp ax, word [rcx]
jne 0x140051075
add rcx, 2
sub rdx, 1
jne 0x140051025
sub rdi, r9
sar rdi, 1
cmp rdi, 0xffffffffffffffff
je 0x14005107e
lea r9, [rbp + 0x38]
cmp qword [rbp + 0x50], 8
cmovae r9, qword [rbp + 0x38]
mov qword [rsp + 0x20], r11
lea r8d, [rdx + 4]
mov rdx, rdi
lea rcx, [rbp - 0x70]
call fcn.140065eb0
mov r11, qword [rbp + 0x48]
lea rcx, [rdi + r11]
jmp 0x140050fa0
add rdi, 2
jmp 0x140050fe0
mov rdx, qword [rbp + 0x50]
cmp rdx, 8
jb 0x1400510bf
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400510b9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400513b5
call fcn.14009c650
nop
mov rdx, qword [rbp + 8]
cmp rdx, 8
jb 0x1400510ff
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x10]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400510fa
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400513bb
call fcn.14009c650
mov qword [rbp], rsi
mov qword [rbp + 8], 7
mov word [rbp - 0x10], si
mov rdx, qword [rbp - 0x18]
cmp rdx, 8
jb 0x14005114f
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005114a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400513c1
call fcn.14009c650
lea rcx, [rbp - 0x70]
cmp qword [rbp - 0x58], 8
cmovae rcx, qword [rbp - 0x70]
mov qword [rsp + 0x30], rsi
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 rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400511b3
inc r13d
cmp r13d, 0x32
jge 0x1400511b3
mov r14, qword [rbp - 0x58]
mov rdi, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x60]
movabs rdx, 0x7ffffffffffffffe
jmp 0x140050c60
mov rdx, qword [rsp + 0x40]
cmp rdx, 8
jb 0x1400511f5
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400511f0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400513c7
call fcn.14009c650
mov r15, qword [rsp + 0x70]
cmp rdi, 0xffffffffffffffff
je 0x14005122e
mov r12, qword [rsp + 0x68]
mov dword [rsp + 0x40], esi
sub r12, r15
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x40]
mov r8d, r12d
mov rdx, r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp - 0x70]
cmp qword [rbp - 0x58], 8
cmovae rcx, qword [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400512b6
lea rcx, [rbp - 0x70]
cmp qword [rbp - 0x58], 8
jb 0x14005129d
mov rcx, qword [rbp - 0x70]
test rcx, rcx
jne 0x14005129d
mov rbx, rsi
mov qword [rsp + 0x68], rbx
mov dword [rsp + 0x40], esi
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x1400513d9
mov rax, qword [rcx]
lea r9, [rsp + 0x40]
xor r8d, r8d
mov rdx, rbx
call qword [rax + 0x190]
mov edi, eax
shr edi, 0x1f
xor dil, 1
mov rcx, rbx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
jmp 0x1400512ba
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov rbx, rax
mov qword [rsp + 0x68], rax
test rax, rax
je 0x14005138d
jmp 0x140051263
mov edi, dword [rsp + 0x4c]
mov rdx, qword [rbp - 0x58]
cmp rdx, 8
jb 0x1400512fb
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400512f5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400513e4
call fcn.14009c650
nop
test r15, r15
je 0x140051331
mov rdx, qword [rbp - 0x78]
sub rdx, r15
mov rax, r15
cmp rdx, 0x1000
jb 0x140051328
add rdx, 0x27
mov r15, qword [r15 - 8]
sub rax, r15
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140051387
mov rcx, r15
call fcn.14009c650
nop
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140051342
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140051353
mov rdx, qword [rcx]
call qword [rdx + 0x10]
nop
movzx eax, dil
mov rcx, qword [rbp + 0x20d0]
xor rcx, rsp
call fcn.14009c630
lea r11, [rsp + 0x21e0]
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.1400a3284
nop
mov ecx, 0x8007000e
call fcn.14004fcd0
nop
mov ecx, 0x80004003
call fcn.140099ce0
nop
call fcn.1400a3284
int3
call fcn.140001f50
nop
call fcn.1400a3284
nop
call fcn.1400a3284
nop
call fcn.1400a3284
nop
call fcn.1400a3284
nop
call fcn.1400a3284
nop
call fcn.140001f50
int3
call fcn.140001f50
nop
mov ecx, 0x80004003
call fcn.140099ce0
nop
call fcn.1400a3284
int3