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

Disassembly:
mov r11, rsp
push rsi
sub rsp, 0x770
mov eax, dword [0x180297f00]
mov esi, ecx
mov edx, eax
add eax, 1
test edx, edx
mov dword [0x180297f00], eax
jne 0x18004d32f
mov qword [r11 + 8], rbx
lea ecx, [rdx + 0x20]
mov qword [r11 + 0x18], rdi
call fcn.18015fd40
test rax, rax
mov rdi, rax
je 0x18004cb90
mov rcx, rax
call fcn.18004b400
xor ebx, ebx
mov qword [rdi + 8], rax
mov byte [rax + 0x29], 1
mov rax, qword [rdi + 8]
mov qword [rax + 8], rax
mov rax, qword [rdi + 8]
mov qword [rax], rax
mov rax, qword [rdi + 8]
mov qword [rax + 0x10], rax
mov qword [rdi + 0x10], rbx
mov dword [rdi + 0x18], ebx
jmp 0x18004cb95
xor ebx, ebx
mov rdi, rbx
test rdi, rdi
mov qword [0x180297ef8], rdi
je 0x18004d31f
mov qword [rsp + 0x30], rbx
lea rdx, [0x18007e3a0]
xor r9d, r9d
xor r8d, r8d
mov rcx, rdi
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x18007c400]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x18007b120]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
lea rdx, [0x18018b3c8]
lea rax, [0x1801952b0]
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x28], rax
lea rax, str.JPEG_Network_Graphics
lea r9, [0x180195294]
lea rdx, [0x1800795f0]
xor r8d, r8d
mov qword [rsp + 0x20], rax
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x1800791f0]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x180078e20]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x1800795f0]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
lea rdx, [0x180195290]
lea rax, str.Portable_Bitmap__ASCII_
lea rdi, [0x180195270]
mov qword [rsp + 0x30], rdx
lea r9, [0x18019526c]
lea rdx, [0x180078460]
xor r8d, r8d
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
call fcn.18004c720
mov rcx, qword [0x180297ef8]
lea rdx, [0x180195268]
mov qword [rsp + 0x30], rdx
lea rax, str.Portable_Bitmap__RAW_
lea r9, str.PBMRAW
lea rdx, [0x180078460]
xor r8d, r8d
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
call fcn.18004c720
mov qword [rsp + 0x30], rbx
mov rcx, qword [0x180297ef8]
lea rdx, [0x180076d50]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x180076810]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
lea rdx, [0x180195244]
lea rax, str.Portable_Greymap__ASCII_
mov qword [rsp + 0x30], rdx
lea rdi, [0x180195220]
lea r9, [0x18019521c]
lea rdx, [0x180078460]
xor r8d, r8d
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
call fcn.18004c720
mov rcx, qword [0x180297ef8]
lea rdx, [0x180195218]
lea rax, str.Portable_Greymap__RAW_
lea r9, str.PGMRAW
mov qword [rsp + 0x30], rdx
lea rdx, [0x180078460]
xor r8d, r8d
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x180075e30]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
lea rdx, [0x1801951f4]
lea rax, str.Portable_Pixelmap__ASCII_
lea rdi, [0x1801951d0]
mov qword [rsp + 0x30], rdx
lea r9, [0x1801951cc]
lea rdx, [0x180078460]
xor r8d, r8d
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
call fcn.18004c720
lea rcx, [0x1801951c8]
lea rax, str.Portable_Pixelmap__RAW_
mov qword [rsp + 0x30], rcx
mov rcx, qword [0x180297ef8]
lea r9, str.PPMRAW
lea rdx, [0x180078460]
xor r8d, r8d
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rax
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x180074ae0]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x180074100]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x180072480]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x18006f100]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x18006ea80]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x18006da50]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x18006d780]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x18006ce60]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x1800666f0]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x180064960]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x18005faa0]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x18005e5b0]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov qword [rsp + 0x30], rbx
mov rcx, qword [0x180297ef8]
lea rdx, [0x18005de20]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x18005d570]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x180054700]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
lea rdx, [0x180054030]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
test esi, esi
jne 0x18004d31f
mov qword [rsp + 0x768], r12
lea rdx, [rsp + 0x550]
mov ecx, 0x208
mov qword [rsp + 0x760], r13
mov r12d, ebx
mov r13d, ebx
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
je 0x18004d1b3
lea rdx, [rsp + 0x340]
mov r8d, 0x208
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x18004d1b3
lea edx, [rsi + 0x5c]
lea rcx, [rsp + 0x340]
call fcn.180162440
test rax, rax
je 0x18004d1b3
lea rcx, [rsp + 0x340]
mov byte [rax], sil
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov r13d, eax
cmp dword [reloc.OLEAUT32.dll_SysReAllocString], 0
jle 0x18004d2fc
mov qword [rsp + 0x788], rbp
lea rsi, [0x180288818]
nop
mov rcx, qword [rsi]
lea rdx, [rsp + 0x40]
sub rdx, rcx
nop
nop
movzx eax, byte [rcx]
add rcx, 1
test al, al
mov byte [rdx + rcx - 1], al
jne 0x18004d1e0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x40]
repne scasb al, byte [rdi]
mov eax, dword [str..fip]
lea rdx, [rsp + 0x210]
mov dword [rdi - 1], eax
movzx eax, word [0x1801951a4]
lea rcx, [rsp + 0x40]
mov word [rdi + 3], ax
call fcn.180167740
cmp eax, 0xffffffff
je 0x18004d2df
movsxd rbp, eax
nop
mov rcx, qword [rsi]
lea rdx, [rsp + 0x40]
sub rdx, rcx
nop
nop
movzx eax, byte [rcx]
add rcx, 1
test al, al
mov byte [rdx + rcx - 1], al
jne 0x18004d240
lea rdx, [rsp + 0x234]
lea rcx, [rsp + 0x40]
mov r8d, 0x1cc
call fcn.180167c80
lea rcx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
test rax, rax
mov rdi, rax
je 0x18004d2be
lea rdx, str._Init_8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x18004d2b5
mov rcx, qword [0x180297ef8]
mov qword [rsp + 0x30], rbx
xor r9d, r9d
mov r8, rdi
mov rdx, rax
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rbx
call fcn.18004c720
jmp 0x18004d2be
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
lea rdx, [rsp + 0x210]
mov rcx, rbp
call fcn.1801679e0
cmp eax, 0xffffffff
jne 0x18004d230
mov rcx, rbp
call fcn.180167710
add r12d, 1
add rsi, 8
cmp r12d, dword [reloc.OLEAUT32.dll_SysReAllocString]
jl 0x18004d1d0
mov rbp, qword [rsp + 0x788]
mov r12, qword [rsp + 0x768]
test r13d, r13d
mov r13, qword [rsp + 0x760]
je 0x18004d31f
lea rcx, [rsp + 0x550]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov rbx, qword [rsp + 0x780]
mov rdi, qword [rsp + 0x790]
add rsp, 0x770
pop rsi
ret