Function at 0x140049ad0
Capabilities:
Get common file path
Set current directory

Disassembly:
mov r11, rsp
push rsi
sub rsp, 0xb70
mov eax, dword [0x140650670]
mov esi, ecx
mov edx, eax
inc eax
mov dword [0x140650670], eax
test edx, edx
jne 0x14004a396
mov qword [r11 + 8], rbx
mov qword [r11 + 0x18], rdi
call fcn.14007d0a0
lea rdx, [0x14045f208]
mov ecx, 0x18
call fcn.1402d0220
xor edi, edi
mov rbx, rax
test rax, rax
je 0x14004a37f
lea ecx, [rdi + 0x30]
mov qword [rax], rdi
mov qword [rax + 8], rdi
call fcn.140048eb4
mov qword [rsp + 0x30], rdi
lea rdx, [0x1400518c0]
mov qword [rsp + 0x28], rdi
xor r9d, r9d
xor r8d, r8d
mov qword [0x140650668], rbx
mov qword [rax], rax
mov rcx, rbx
mov qword [rax + 8], rax
mov qword [rax + 0x10], rax
mov word [rax + 0x18], 0x101
mov qword [rbx], rax
mov dword [rbx + 0x10], edi
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x140053ff0]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x140056820]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x1400799c0]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x1400577b0]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x1400550a0]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x1400579e0]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rax, [0x140317bd4]
mov qword [rsp + 0x30], rax
lea rbx, [0x140317bd8]
lea rax, str.Portable_Bitmap__ASCII_
mov qword [rsp + 0x28], rbx
lea r9, [0x140317bf8]
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [0x14005bb00]
call fcn.14004b990
lea rax, [0x140317bfc]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rbx
mov rcx, qword [0x140650668]
lea rax, str.Portable_Bitmap__RAW_
lea r9, str.PBMRAW
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [0x14005bb00]
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x140057fc0]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x140058c40]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rax, [0x140317c20]
mov qword [rsp + 0x30], rax
lea rbx, [0x140317c24]
lea rax, str.Portable_Greymap__ASCII_
mov qword [rsp + 0x28], rbx
lea r9, [0x140317c44]
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [0x14005bb00]
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rax, [0x140317c48]
mov qword [rsp + 0x30], rax
lea r9, str.PGMRAW
lea rax, str.Portable_Greymap__RAW_
mov qword [rsp + 0x28], rbx
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [0x14005bb00]
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x140059e30]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rax, [0x140317c70]
mov qword [rsp + 0x30], rax
lea rbx, [0x140317c74]
lea rax, str.Portable_Pixelmap__ASCII_
mov qword [rsp + 0x28], rbx
lea r9, [0x140317c94]
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [0x14005bb00]
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rax, [0x140317c98]
mov qword [rsp + 0x30], rax
lea r9, str.PPMRAW
lea rax, str.Portable_Pixelmap__RAW_
mov qword [rsp + 0x28], rbx
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [0x14005bb00]
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x14005c790]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x14005dfb0]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x1400626e0]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x140064160]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x14005bf40]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x1400536c0]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x1400645f0]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x1400665a0]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x140067030]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x14006c100]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x14006cd90]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov qword [rsp + 0x30], rdi
mov rcx, qword [0x140650668]
lea rdx, [0x14006e2d0]
mov qword [rsp + 0x28], rdi
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x14006ed80]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x1400714c0]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x140074a50]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x140075090]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x140075970]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x140076c20]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x140078980]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x14007a220]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
mov rcx, qword [0x140650668]
lea rdx, [0x14007b520]
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
call fcn.14004b990
test esi, esi
jne 0x14004a386
mov qword [rsp + 0xb68], r14
lea rdx, [rsp + 0x750]
mov qword [rsp + 0xb60], r15
mov ecx, 0x208
mov r15d, edi
mov r14d, edi
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
je 0x14004a20b
mov r8d, 0x208
lea rdx, [rsp + 0x340]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x14004a20b
lea edx, [rdi + 0x5c]
lea rcx, [rsp + 0x340]
call fcn.1402d2180
test rax, rax
je 0x14004a20b
lea rcx, [rsp + 0x340]
mov word [rax], di
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov r15d, eax
cmp dword [0x1404b0058], edi
jle 0x14004a35a
mov qword [rsp + 0xb88], rbp
lea rsi, [0x1404b0040]
nop word [rax + rax]
mov rcx, qword [rsi]
lea rdx, [rsp + 0x40]
sub rdx, rcx
nop dword [rax + rax]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x14004a240
lea rcx, [rsp + 0x40]
dec rcx
cmp byte [rcx + 1], dil
lea rcx, [rcx + 1]
jne 0x14004a256
mov eax, dword [str..fip]
lea rdx, [rsp + 0x210]
mov dword [rcx], eax
movzx eax, word [0x140317cc4]
mov word [rcx + 4], ax
lea rcx, [rsp + 0x40]
call fcn.1402e4030
cmp eax, 0xffffffff
je 0x14004a33e
movsxd rbp, eax
mov rax, qword [rsi]
lea rdx, [rsp + 0x40]
sub rdx, rax
nop dword [rax]
movzx ecx, byte [rax]
mov byte [rdx + rax], cl
lea rax, [rax + 1]
test cl, cl
jne 0x14004a2a0
mov r8d, 0x1cc
lea rdx, [rsp + 0x234]
lea rcx, [rsp + 0x40]
call fcn.1402e38e0
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rbx, rax
test rax, rax
je 0x14004a31d
lea rdx, str._Init_8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x14004a314
mov rcx, qword [0x140650668]
xor r9d, r9d
mov qword [rsp + 0x30], rdi
mov r8, rbx
mov qword [rsp + 0x28], rdi
mov rdx, rax
mov qword [rsp + 0x20], rdi
call fcn.14004b990
jmp 0x14004a31d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
lea rdx, [rsp + 0x210]
mov rcx, rbp
call fcn.1402e41bc
cmp eax, 0xffffffff
jne 0x14004a291
mov rcx, rbp
call fcn.1402e4008
inc r14d
add rsi, 8
cmp r14d, dword [0x1404b0058]
jl 0x14004a230
mov rbp, qword [rsp + 0xb88]
mov r14, qword [rsp + 0xb68]
test r15d, r15d
mov r15, qword [rsp + 0xb60]
je 0x14004a386
lea rcx, [rsp + 0x750]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
jmp 0x14004a386
mov qword [0x140650668], rdi
mov rbx, qword [rsp + 0xb80]
mov rdi, qword [rsp + 0xb90]
add rsp, 0xb70
pop rsi
ret