Function at 0x10005191
Capabilities:
Get common file path
Link many functions at runtime
Set current directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x10013010]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
cmp dword [0x10013f04], edi
jne 0x1000532b
lea eax, [ebp - 0x20c]
push eax
mov ebx, 0x104
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
jne 0x100051f9
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10001460
push 0x10001cc0
push 0x192
push 0x10001270
call fcn.10006b9b
add esp, 0x18
xor eax, eax
jmp 0x100054b0
push ebx
lea eax, [ebp - 0x108]
push eax
push dword [0x10013f00]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x1000522a
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10001cac
push 0x10001cc0
push 0x198
jmp 0x100051e5
lea eax, [ebp - 0x108]
push 0x5c
push eax
call fcn.10007340
pop ecx
pop ecx
cmp eax, edi
je 0x10005313
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov byte [eax], 0
lea eax, [ebp - 0x108]
push eax
call edi
test eax, eax
jne 0x10005274
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1000141c
push 0x10001cc0
push 0x1a5
jmp 0x100051e5
mov esi, 0x10001c9c
push esi
push ebx
lea eax, [ebp - 0x108]
push eax
call fcn.10005049
test eax, eax
lea eax, [ebp - 0x108]
jns 0x100052b8
push esi
push eax
push 0x100013dc
push 0
push 0
push 0x10001cc0
push 0x1ab
push 0x10001270
call fcn.10006b9b
add esp, 0x20
jmp 0x100051f2
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x10013f04], eax
lea eax, [ebp - 0x20c]
push eax
call edi
test eax, eax
jne 0x100052ed
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1000141c
push 0x10001cc0
push 0x1b3
jmp 0x100051e5
cmp dword [0x10013f04], 0
jne 0x10005329
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x100013cc
push 0x10001cc0
push 0x1ba
jmp 0x100051e5
push 0x10001c80
push edi
push edi
push 0x10001cc0
push 0x1a0
jmp 0x100051e5
xor edi, edi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp dword [0x10013f28], edi
jne 0x1000536f
push 0x10001c70
push dword [0x10013f04]
call esi
mov dword [0x10013f28], eax
cmp eax, edi
jne 0x1000536f
push 0x10001c40
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10001378
push 0x10001cc0
push 0x1c6
jmp 0x100051e5
cmp dword [0x10013f20], edi
jne 0x100053ad
push 0x100014d4
push dword [0x10013f04]
call esi
mov dword [0x10013f20], eax
cmp eax, edi
jne 0x100053ad
push 0x10001c08
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10001378
push 0x10001cc0
push 0x1d0
jmp 0x100051e5
cmp dword [0x10013f2c], edi
jne 0x100053f3
push 0x10001bf0
push dword [0x10013f04]
call esi
mov dword [0x10013f2c], eax
cmp eax, edi
jne 0x100053eb
push 0x10001bb8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10001378
push 0x10001cc0
push 0x1da
jmp 0x100051e5
push dword [0x10013f0c]
call eax
cmp dword [0x10013f30], edi
jne 0x10005431
push 0x10001ba4
push dword [0x10013f04]
call esi
mov dword [0x10013f30], eax
cmp eax, edi
jne 0x10005431
push 0x10001b70
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10001378
push 0x10001cc0
push 0x1e6
jmp 0x100051e5
cmp dword [0x10013f34], edi
jne 0x1000546f
push 0x10001b58
push dword [0x10013f04]
call esi
mov dword [0x10013f34], eax
cmp eax, edi
jne 0x1000546f
push 0x10001b20
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10001378
push 0x10001cc0
push 0x1f0
jmp 0x100051e5
cmp dword [0x10013f24], edi
jne 0x100054ad
push 0x10001b08
push dword [0x10013f04]
call esi
mov dword [0x10013f24], eax
cmp eax, edi
jne 0x100054ad
push 0x10001ad0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10001378
push 0x10001cc0
push 0x1fa
jmp 0x100051e5
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100072a1
leave
ret