Function at 0x140002900
Capabilities:
Get common file path
Read .ini file
Set current directory

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x300
mov rax, qword [0x140046020]
xor rax, rsp
mov qword [rsp + 0x2f0], rax
mov rdi, rdx
mov r13, rcx
mov qword [rsp + 0x98], rdx
xorps xmm0, xmm0
movups xmmword [rsp + 0xa0], xmm0
mov ecx, 0xfffe
call fcn.14000e584
mov r15, rax
mov qword [rsp + 0xa0], rax
mov qword [rsp + 0xb0], 0x7fff
mov qword [rsp + 0xa8], rax
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140002978
mov rcx, qword [rdi]
call qword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
xor ebp, ebp
test eax, eax
je 0x140002a44
mov r8, qword [rdi + 0x10]
mov rcx, qword [rdi + 0x18]
mov rax, rcx
sub rax, r8
cmp rax, 2
jb 0x140002a2e
lea rax, [r8 + 2]
mov qword [rdi + 0x10], rax
mov rbp, rdi
cmp rcx, 8
jb 0x1400029b4
mov rbp, qword [rdi]
lea rax, [0x14003f948]
mov r14d, 2
lea r12, [0x14003f944]
add r8, r8
cmp rax, rbp
jbe 0x1400029ed
lea rax, [r8 + rbp]
cmp r12, rax
ja 0x1400029ed
cmp rbp, r12
ja 0x1400029e2
xor esi, esi
jmp 0x1400029f0
mov rsi, rbp
sub rsi, r12
sar rsi, 1
jmp 0x1400029f0
mov rsi, r14
lea rcx, [rbp + 4]
add r8, r14
mov rdx, rbp
call fcn.1400103b0
lea rbx, [rsi + rsi]
mov r8, rbx
mov rdx, r12
mov rcx, rbp
call fcn.1400103b0
lea rcx, [rbx + rbp]
sub r14, rsi
lea r8, [r14 + r14]
lea rdx, [r12 + 4]
lea rdx, [rdx + rsi*2]
call fcn.1400103b0
xor ebp, ebp
jmp 0x140002a44
mov r14d, 2
mov qword [rsp + 0x28], r14
mov edx, r14d
mov rcx, rdi
call fcn.140008740
mov rax, rdi
cmp qword [rdi + 0x18], 8
jb 0x140002a51
mov rax, qword [rdi]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x7fff
mov r9, r15
xor r8d, r8d
lea rdx, str.version
lea rcx, str.Attribs
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
cmp word [r15], 0
je 0x140002ae9
lea rdx, str.oldimg
mov rcx, r15
call fcn.140014a8c
test eax, eax
jne 0x140002ab3
cmp byte [0x140048db8], al
je 0x140002aad
lea rdx, str.Using_v1_IMG..._n
lea rcx, [0x1400475f0]
call fcn.1400072e0
mov dword [r13 + 0x30], ebp
jmp 0x140002ae9
lea rdx, str.newimg
mov rcx, r15
call fcn.140014a8c
test eax, eax
jne 0x140002ae9
cmp byte [0x140048db8], al
je 0x140002ae1
lea rdx, str.Using_v2_IMG..._n
lea rcx, [0x1400475f0]
call fcn.1400072e0
mov dword [r13 + 0x30], 1
mov rbx, r15
mov r9, rdi
cmp qword [rdi + 0x18], 8
jb 0x140002af9
mov r9, qword [rdi]
mov r8d, 0x7fff
mov rdx, r15
lea rcx, str.Dirs
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionW]
nop
cmp word [rbx], 0
je 0x140002bac
mov rsi, rbx
nop dword [rax]
add rbx, 2
cmp word [rbx], 0
jne 0x140002b20
add rbx, 2
mov qword [rsp + 0xa8], rbx
test rsi, rsi
je 0x140002bac
lea rdx, [rsp + 0xe0]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
nop
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x140002c2e
mov rcx, r13
call fcn.140003250
mov edx, eax
call fcn.1400049f0
mov rcx, rax
lea rdx, str._files_in
call fcn.1400072e0
mov rcx, rax
mov rdx, rsi
call fcn.1400072e0
mov rcx, rax
lea rdx, str._listed_n
call fcn.1400072e0
nop
lea rcx, [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
jmp 0x140002b10
mov rcx, r15
call fcn.14000e540
nop
mov rdx, qword [rdi + 0x18]
cmp rdx, 8
jb 0x140002bf4
lea rdx, [rdx*2 + 2]
mov rcx, qword [rdi]
cmp rdx, 0x1000
jb 0x140002bef
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140002ca4
mov rcx, r8
call fcn.14000e540
mov qword [rdi + 0x10], rbp
mov qword [rdi + 0x18], 7
mov word [rdi], bp
mov rcx, qword [rsp + 0x2f0]
xor rcx, rsp
call fcn.14000e520
mov rbx, qword [rsp + 0x350]
add rsp, 0x300
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov rdx, rsi
lea rcx, [rsp + 0xb8]
call fcn.140004da0
nop
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0xb8]
call fcn.140004cf0
mov r8, rax
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0xb8]
call fcn.140004d10
mov r8, qword [r8]
mov rdx, qword [rax]
lea rcx, [rsp + 0x58]
call fcn.140007140
nop
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.140007280
nop
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.140001440
lea rdx, [0x1400447b0]
lea rcx, [rsp + 0x40]
call fcn.1400102d4
nop
call fcn.1400168a8
int3