Function at 0x140046978
Capabilities:
Check if file exists
Get file attributes
Read .ini file

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x30]
sub rsp, 0x130
mov rax, qword [0x14010c0c0]
xor rax, rsp
mov qword [rbp + 0x28], rax
mov rsi, r9
mov rbx, r8
mov rdi, rdx
mov r14, rcx
mov qword [rsp + 0x40], rcx
xor r13d, r13d
mov dword [rsp + 0x30], r13d
mov rdx, qword [rbp + 0x90]
mov rcx, rdx
cmp qword [rdx + 0x18], 0xf
jbe 0x1400469cf
mov rcx, qword [rdx]
mov r9, qword [rdx + 0x10]
add r9, rcx
cmp qword [rdx + 0x18], 0xf
jbe 0x1400469e0
mov rdx, qword [rdx]
xorps xmm0, xmm0
movups xmmword [rbp + 8], xmm0
mov qword [rbp + 0x18], r13
mov qword [rbp + 0x20], r13
mov r15d, 7
cmp rdx, r9
jne 0x140046a0c
mov qword [rbp + 0x18], r13
mov eax, r15d
mov qword [rbp + 0x20], rax
mov word [rbp + 8], r13w
jmp 0x140046a1c
sub r9, rdx
lea rcx, [rbp + 8]
call fcn.14001e020
mov rax, qword [rbp + 0x20]
lea rdx, [rbp + 8]
cmp rax, r15
cmova rdx, qword [rbp + 8]
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
mov qword [rsp + 0x58], r13
mov qword [rsp + 0x60], r13
or r12, 0xffffffffffffffff
mov r8, r12
inc r8
cmp word [rdx + r8*2], r13w
jne 0x140046a41
lea rcx, [rsp + 0x48]
call fcn.140005dcc
nop
cmp qword [rsi + 0x18], r15
jbe 0x140046a5f
mov rsi, qword [rsi]
xorps xmm0, xmm0
movups xmmword [rsp + 0x68], xmm0
mov qword [rsp + 0x78], r13
mov qword [rbp - 0x80], r13
mov r8, r12
inc r8
cmp word [rsi + r8*2], r13w
jne 0x140046a73
mov rdx, rsi
lea rcx, [rsp + 0x68]
call fcn.140005dcc
nop
mov rcx, rbx
cmp qword [rbx + 0x18], 0xf
jbe 0x140046a98
mov rcx, qword [rbx]
mov r9, qword [rbx + 0x10]
add r9, rcx
cmp qword [rbx + 0x18], 0xf
jbe 0x140046aa9
mov rbx, qword [rbx]
xorps xmm0, xmm0
movups xmmword [rbp - 0x18], xmm0
mov qword [rbp - 8], r13
mov qword [rbp], r13
cmp rbx, r9
jne 0x140046acf
mov qword [rbp - 8], r13
mov rax, r15
mov qword [rbp], rax
mov word [rbp - 0x18], r13w
jmp 0x140046ae2
sub r9, rbx
mov rdx, rbx
lea rcx, [rbp - 0x18]
call fcn.14001e020
mov rax, qword [rbp]
lea rdx, [rbp - 0x18]
cmp rax, r15
cmova rdx, qword [rbp - 0x18]
xorps xmm0, xmm0
movups xmmword [rbp - 0x38], xmm0
mov qword [rbp - 0x28], r13
mov qword [rbp - 0x20], r13
mov r8, r12
inc r8
cmp word [rdx + r8*2], r13w
jne 0x140046b00
lea rcx, [rbp - 0x38]
call fcn.140005dcc
nop
mov rcx, rdi
cmp qword [rdi + 0x18], 0xf
jbe 0x140046b21
mov rcx, qword [rdi]
mov r9, qword [rdi + 0x10]
add r9, rcx
cmp qword [rdi + 0x18], 0xf
jbe 0x140046b32
mov rdi, qword [rdi]
xorps xmm0, xmm0
movups xmmword [rbp - 0x58], xmm0
mov qword [rbp - 0x48], r13
mov qword [rbp - 0x40], r13
cmp rdi, r9
jne 0x140046b58
mov qword [rbp - 0x48], r13
mov rax, r15
mov qword [rbp - 0x40], rax
mov word [rbp - 0x58], r13w
jmp 0x140046b6b
sub r9, rdi
mov rdx, rdi
lea rcx, [rbp - 0x58]
call fcn.14001e020
mov rax, qword [rbp - 0x40]
lea rdx, [rbp - 0x58]
cmp rax, r15
cmova rdx, qword [rbp - 0x58]
xorps xmm0, xmm0
movups xmmword [rbp - 0x78], xmm0
mov qword [rbp - 0x68], r13
mov qword [rbp - 0x60], r13
mov r8, r12
inc r8
cmp word [rdx + r8*2], r13w
jne 0x140046b89
lea rcx, [rbp - 0x78]
call fcn.140005dcc
nop
xorps xmm0, xmm0
movups xmmword [r14], xmm0
mov qword [r14 + 0x10], r13
mov qword [r14 + 0x18], r13
mov rbx, qword [rsp + 0x58]
lea rsi, [rsp + 0x48]
cmp qword [rsp + 0x60], r15
cmova rsi, qword [rsp + 0x48]
movabs rdi, 0x7ffffffffffffffe
cmp rbx, rdi
ja 0x140047009
mov r12d, 0xa
cmp rbx, r15
ja 0x140046bf1
mov qword [r14 + 0x10], rbx
mov qword [r14 + 0x18], r15
movups xmm0, xmmword [rsi]
movdqu xmmword [r14], xmm0
jmp 0x140046c6e
mov rax, rbx
or rax, r15
cmp rax, rdi
jbe 0x140046c0c
movabs rax, 0x7fffffffffffffff
lea rcx, [rax + rax]
jmp 0x140046c39
cmp rax, r12
cmovb rax, r12
mov rdi, rax
lea rcx, [rax + 1]
movabs rax, 0x7fffffffffffffff
cmp rcx, rax
ja 0x14004700f
add rcx, rcx
cmp rcx, 0x1000
jb 0x140046c40
call fcn.14001ee68
jmp 0x140046c4f
test rcx, rcx
je 0x140046c4c
call fcn.140086524
jmp 0x140046c4f
mov rax, r13
mov qword [r14], rax
mov qword [r14 + 0x10], rbx
mov qword [r14 + 0x18], rdi
lea r8, [rbx*2 + 2]
mov rdx, rsi
mov rcx, rax
call fcn.1400af2d0
nop
mov dword [rsp + 0x30], 2
lea rcx, [rsp + 0x68]
cmp qword [rbp - 0x80], r15
cmova rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140046d91
mov edi, 0x400
mov r15d, 0x200
mov ecx, edi
call fcn.140086b44
mov rbx, rax
mov r8d, edi
xor edx, edx
mov rcx, rax
call fcn.1400af970
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], r12d
lea rax, [rsp + 0x68]
cmp qword [rbp - 0x80], 7
cmova rax, qword [rsp + 0x68]
lea r8, [rsp + 0x48]
cmp qword [rsp + 0x60], 7
cmova r8, qword [rsp + 0x48]
lea rdx, [rbp - 0x38]
cmp qword [rbp - 0x20], 7
cmova rdx, qword [rbp - 0x38]
lea rcx, [rbp - 0x78]
cmp qword [rbp - 0x60], 7
cmova rcx, qword [rbp - 0x78]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r15d
mov r9, rbx
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ecx, eax
lea eax, [r15 - 1]
cmp ecx, eax
jb 0x140046d72
mov rdx, rbx
mov rcx, r14
call fcn.140019d64
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 7
cmova rcx, qword [rsp + 0x48]
mov rdx, qword [r14 + 0x10]
mov r8, r14
cmp qword [r14 + 0x18], 7
jbe 0x140046d47
mov r8, qword [r14]
cmp rdx, qword [rsp + 0x58]
jne 0x140046f9b
test rdx, rdx
je 0x140046d72
sub r8, rcx
movzx eax, word [r8 + rcx]
cmp ax, word [rcx]
jne 0x140046f9b
add rcx, 2
sub rdx, 1
jne 0x140046d5a
mov rdx, rbx
mov rcx, r14
call fcn.140019d64
nop
test rbx, rbx
je 0x140046d8b
mov rcx, rbx
call fcn.1400864f0
mov r15d, 7
mov rdx, qword [rbp - 0x60]
mov ebx, 0x1000
cmp rdx, r15
jbe 0x140046dd1
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, rbx
jb 0x140046dcc
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140047015
call fcn.1400864f0
mov qword [rbp - 0x68], r13
mov qword [rbp - 0x60], r15
mov word [rbp - 0x78], r13w
mov rdx, qword [rbp - 0x40]
cmp rdx, r15
jbe 0x140046e1a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x58]
mov rax, rcx
cmp rdx, rbx
jb 0x140046e14
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14004701b
call fcn.1400864f0
nop
mov rdx, qword [rbp - 0x20]
cmp rdx, r15
jbe 0x140046e55
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x38]
mov rax, rcx
cmp rdx, rbx
jb 0x140046e50
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140047021
call fcn.1400864f0
mov qword [rbp - 0x28], r13
mov qword [rbp - 0x20], r15
mov word [rbp - 0x38], r13w
mov rdx, qword [rbp]
cmp rdx, r15
jbe 0x140046e9e
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x18]
mov rax, rcx
cmp rdx, rbx
jb 0x140046e98
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140047027
call fcn.1400864f0
nop
mov rdx, qword [rbp - 0x80]
cmp rdx, r15
jbe 0x140046eda
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, rbx
jb 0x140046ed5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14004702d
call fcn.1400864f0
mov qword [rsp + 0x78], r13
mov qword [rbp - 0x80], r15
mov word [rsp + 0x68], r13w
mov rdx, qword [rsp + 0x60]
cmp rdx, r15
jbe 0x140046f26
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, rbx
jb 0x140046f21
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140047033
call fcn.1400864f0
mov qword [rsp + 0x58], r13
mov qword [rsp + 0x60], r15
mov word [rsp + 0x48], r13w
mov rdx, qword [rbp + 0x20]
cmp rdx, r15
jbe 0x140046f71
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 8]
mov rax, rcx
cmp rdx, rbx
jb 0x140046f6c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140047003
call fcn.1400864f0
mov rax, r14
mov rcx, qword [rbp + 0x28]
xor rcx, rsp
call fcn.1400864d0
mov rbx, qword [rsp + 0x178]
add rsp, 0x130
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
add r15d, r15d
cmp r15d, 0x6400000
ja 0x140046d72
mov ecx, r15d
mov eax, 2
mul rcx
mov rdi, rax
mov rax, 0xffffffffffffffff
cmovo rdi, rax
mov rcx, rdi
call fcn.140086b44
mov rsi, rax
mov r8, rdi
xor edx, edx
mov rcx, rax
call fcn.1400af970
or r12d, 4
mov dword [rsp + 0x30], r12d
mov rcx, rbx
mov rbx, rsi
mov qword [rsp + 0x38], rbx
test rcx, rcx
je 0x140046cc0
call fcn.1400864f0
jmp 0x140046cc0
call fcn.14008d5e0
nop
call fcn.140001784
int3
call fcn.1400016ec
nop
call fcn.14008d5e0
nop
call fcn.14008d5e0
nop
call fcn.14008d5e0
nop
call fcn.14008d5e0
nop
call fcn.14008d5e0
nop
call fcn.14008d5e0
int3