Function at 0x1005a6b7
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc14
mov eax, dword [0x100f6604]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0xc10], eax
xor esi, esi
mov eax, dword [ebp + 0x10]
push 0x800
mov dword [ebp - 0xc0c], eax
lea eax, [ebp - 0x804]
push esi
push eax
mov dword [ebp - 0xc14], esi
call fcn.100852c0
mov edi, ebx
add esp, 0xc
xor edx, edx
lea ecx, [edi + 2]
mov ax, word [edi]
add edi, 2
cmp ax, dx
jne 0x1005a706
sub edi, ecx
push 0x5c
pop eax
sar edi, 1
cmp word [ebx], ax
je 0x1005a724
mov ecx, edi
jmp 0x1005a82f
push 0xc
push str.SystemRoot_
push ebx
call fcn.100a482d
add esp, 0xc
test eax, eax
jne 0x1005a778
push 0x400
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jne 0x1005a756
push 0xfffffffffffffff2
pop eax
jmp 0x1005a918
lea esi, [ebp - 0x804]
xor edx, edx
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, dx
jne 0x1005a761
sub esi, ecx
lea ecx, [edi - 0xb]
sar esi, 1
jmp 0x1005a82f
push 4
push 0x100d2460
push ebx
call fcn.100a482d
add esp, 0xc
test eax, eax
jne 0x1005a794
lea ecx, [edi - 4]
jmp 0x1005a82f
push 0x400
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov esi, eax
test esi, esi
je 0x1005a903
push 0x5c
pop eax
cmp word [ebp + esi*2 - 0x806], ax
jne 0x1005a7be
dec esi
cmp esi, 3
jb 0x1005a903
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0xc14]
jne 0x1005a7cc
sub ecx, edx
sar ecx, 1
lea eax, [ecx + 2]
cmp esi, eax
ja 0x1005a903
cmp esi, 0x400
jae 0x1005a903
lea eax, [esi - 2]
push eax
lea eax, [ebp - 0x800]
push eax
push ebx
call fcn.100a482d
add esp, 0xc
test eax, eax
jne 0x1005a903
movzx eax, word [ebx + esi*2 - 4]
push 0x5c
pop ecx
cmp ax, cx
je 0x1005a828
test ax, ax
jne 0x1005a903
mov ecx, edi
sub ecx, esi
add ecx, 2
lea eax, [ecx + esi]
cmp dword [ebp - 0xc0c], eax
jge 0x1005a841
push 0xffffffffffffffe4
jmp 0x1005a750
mov esi, dword [ebp - 0xc10]
lea edx, [ebp - 0x804]
mov eax, edx
sub esi, eax
movzx eax, word [edx]
mov word [esi + edx], ax
lea edx, [edx + 2]
test ax, ax
jne 0x1005a851
sub edi, ecx
xor ecx, ecx
lea edx, [ebx + edi*2]
mov esi, edx
mov ax, word [edx]
add edx, 2
cmp ax, cx
jne 0x1005a869
mov ebx, dword [ebp - 0xc10]
sub edx, esi
lea edi, [ebx - 2]
mov ax, word [edi + 2]
add edi, 2
cmp ax, cx
jne 0x1005a87f
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push 0x7e
rep movsb byte es:[edi], byte [esi]
push ebx
call fcn.100857ab
pop ecx
pop ecx
test eax, eax
je 0x1005a8ff
xor eax, eax
push 0x402
push eax
lea eax, [ebp - 0xc08]
push eax
call fcn.100852c0
add esp, 0xc
lea eax, [ebp - 0xc08]
mov edi, 0x200
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
je 0x1005a8ff
mov esi, dword [ebp - 0xc0c]
lea eax, [esi - 1]
cmp eax, edi
lea ecx, [esi - 1]
lea eax, [ebp - 0xc08]
cmovg ecx, edi
push ecx
push eax
push ebx
call fcn.1009bfe8
add esp, 0xc
xor eax, eax
mov word [ebx + esi*2 - 2], ax
xor eax, eax
jmp 0x1005a918
push dword [ebp - 0xc0c]
push dword [ebp - 0xc10]
push ebx
call fcn.10059d85
add esp, 0xc
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10082613
leave
ret