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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
xor esi, esi
cmp dword [ebp + 8], esi
push edi
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
mov dword [ebp - 0x10], esi
je 0x1002a6d
dec dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
xor edi, edi
inc edi
mov dword [ebp - 4], edi
mov dword [0x1008548], esi
mov dword [0x1008540], esi
mov dword [0x100853c], esi
mov eax, dword [ebp + 8]
dec dword [ebp + 8]
test eax, eax
je 0x1002c8f
add ebx, 4
mov eax, dword [ebx]
mov cx, word [eax]
cmp cx, 0x2d
je 0x1002aae
cmp cx, 0x2f
jne 0x1002c8a
lea ecx, [eax + 2]
movzx edx, word [ecx]
add edx, 0xffffffbf
cmp edx, 0x39
ja case.0x1002ac7.66
movzx edx, byte [edx + 0x1002dc7]
jmp dword [edx*4 + 0x1002d8b]
cmp dword [0x100851c], esi
jne case.0x1002ac7.66
cmp word [eax + 4], si
jne case.0x1002ac7.66
mov dword [0x100851c], edi
jmp 0x1002c4e
cmp dword [0x1008034], esi
je case.0x1002ac7.66
cmp word [eax + 4], si
jne case.0x1002ac7.66
mov dword [0x1008034], esi
jmp 0x1002c4e
mov dword [0x1008548], edi
mov dword [0x100853c], edi
jmp 0x1002c4e
cmp dword [ebp - 8], esi
jne case.0x1002ac7.66
cmp word [eax + 4], 0x3a
jne case.0x1002ac7.66
add eax, 6
cmp word [eax], si
je case.0x1002ac7.66
mov dword [ebp - 8], eax
jmp 0x1002c4e
mov dword [0x1008544], edi
jmp 0x1002c4e
mov dword [0x1008548], edi
jmp 0x1002c4e
cmp dword [0x1008540], esi
jne case.0x1002ac7.66
cmp word [eax + 4], si
jne case.0x1002ac7.66
mov dword [0x1008540], edi
mov dword [0x1008520], edi
jmp 0x1002c4e
mov dword [0x1008538], edi
jmp 0x1002c4e
cmp dword [ebp - 0xc], esi
jne case.0x1002ac7.66
cmp word [eax + 4], 0x3a
jne case.0x1002ac7.66
add eax, 6
cmp word [eax], si
je case.0x1002ac7.66
mov dword [ebp - 0xc], eax
jmp 0x1002c4e
push 0xa
push 0x1001460
push ecx
call fcn.0100419b
add esp, 0xc
test eax, eax
jne 0x1002bd2
push 0xb
pop eax
jmp 0x1002c0e
mov eax, dword [ebx]
push 8
inc eax
inc eax
push 0x100144c
push eax
call fcn.0100419b
add esp, 0xc
test eax, eax
jne 0x1002bee
push 9
jmp 0x1002bcf
mov eax, dword [ebx]
push edi
inc eax
inc eax
push 0x1001448
push eax
call fcn.0100419b
add esp, 0xc
test eax, eax
jne 0x1002c09
push 2
jmp 0x1002bcf
mov dword [ebp - 4], esi
xor eax, eax
cmp dword [ebp - 0x10], esi
jne case.0x1002ac7.66
mov dword [0x100854c], edi
mov ecx, dword [ebx]
lea eax, [ecx + eax*2]
cmp word [eax], 0x3a
jne case.0x1002ac7.66
add eax, 2
cmp word [eax], si
je case.0x1002ac7.66
mov dword [ebp - 0x10], eax
jmp 0x1002c4e
mov dword [0x1008534], edi
jmp 0x1002c4e
cmp dword [0x1008520], esi
jne case.0x1002ac7.66
cmp word [eax + 4], si
je 0x1002b7b
mov dword [ebp - 4], esi
cmp dword [ebp - 4], esi
jne 0x1002a88
movzx eax, word [0x1008528]
push 0x11010
push eax
push esi
push 0xea63
push esi
call fcn.01001eee
add esp, 0x14
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 8
mov dword [0x10081f0], edi
jmp 0x1002c4e
mov dword [ebp + 8], esi
jmp 0x1002c4e
mov dword [ebp - 4], esi
jmp 0x1002c57
cmp dword [ebp - 4], esi
je 0x1002c57
cmp dword [ebp - 8], esi
jne 0x1002c9c
mov dword [ebp - 4], esi
cmp dword [ebp - 4], esi
je 0x1002c57
lea eax, [ebp + 0xc]
push eax
push 0x1008bc0
push dword [ebp - 8]
call fcn.010029e1
test eax, eax
je 0x1002d75
push dword [ebp - 8]
call fcn.0100417c
mov edi, 0x104
cmp eax, edi
pop ecx
jae 0x1002d75
push dword [ebp - 8]
mov esi, 0x10089a0
push esi
call fcn.01004158
push 0x5c
pop ebx
push ebx
push esi
call fcn.0100411f
add esp, 0x10
test eax, eax
je 0x1002cfe
push ebx
push esi
call fcn.0100411f
and word [eax], 0
pop ecx
pop ecx
jmp 0x1002d06
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp dword [ebp - 0xc], 0
je 0x1002d23
lea eax, [ebp + 0xc]
push eax
push 0x1008780
push dword [ebp - 0xc]
call fcn.010029e1
test eax, eax
jne 0x1002d4e
jmp 0x1002d75
push 0x1008bc0
mov edi, 0x1008780
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push ebx
push edi
call fcn.0100411f
test eax, eax
pop ecx
pop ecx
je 0x1002d4e
push ebx
push edi
call fcn.0100411f
and word [eax], 0
pop ecx
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor eax, eax
cmp dword [ebp - 0x10], eax
je 0x1002d7c
lea eax, [ebp + 0xc]
push eax
push 0x1008560
push dword [ebp - 0x10]
call fcn.010029e1
test eax, eax
jne 0x1002c73
xor eax, eax
jmp 0x1002c76
mov dword [0x1008540], eax
mov dword [0x1008520], eax
jmp 0x1002c73