Function at 0x5105d8
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x6b
push 0
push 0
dec ecx
jne 0x5105e0
push ecx
push ebx
push esi
push edi
xor edx, edx
push ebp
push 0x5109d9
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [eax + 0x2fc]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x20c]
call fcn.00462584
mov dl, 1
mov eax, dword [0x4783fc]
call fcn.004784fc
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x510970
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, 0x80000002
mov eax, dword [ebp - 4]
call fcn.0047859c
xor ecx, ecx
mov edx, 0x5109f0
mov eax, dword [ebp - 4]
call fcn.00478604
test al, al
je 0x51095a
lea eax, [ebp - 0x110]
mov ecx, 0x20
mov edx, 0x104
call fcn.00402de0
push 0x104
lea ecx, [ebp - 0x110]
mov edx, 0x510a48
mov eax, dword [ebp - 4]
call fcn.00478c60
mov bx, 1
inc ebx
movzx eax, bx
cmp byte [ebp + eax - 0x111], 0
jne 0x51094f
movzx eax, bx
cmp byte [ebp + eax - 0x110], 0
je 0x51095a
jmp 0x5106a8
inc ebx
movzx eax, bx
cmp byte [ebp + eax - 0x111], 0
jne 0x5106bc
cmp bx, 0x104
jb 0x5106a7
cmp bx, 0x104
jae 0x51094f
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x20c]
call fcn.00462450
mov dword [ebp - 8], eax
movzx eax, bx
lea esi, [ebp + eax - 0x111]
lea eax, [ebp - 0x21c]
mov edx, esi
call fcn.004040f0
mov eax, dword [ebp - 0x21c]
lea edx, [ebp - 0x218]
call fcn.004098e8
mov eax, dword [ebp - 0x218]
call fcn.0040437c
mov esi, eax
mov eax, esi
call fcn.0040a410
add bx, ax
dec ebx
test esi, esi
je 0x510737
lea eax, [ebp - 0x220]
mov edx, esi
call fcn.004040f0
mov edx, dword [ebp - 0x220]
mov eax, dword [ebp - 8]
call fcn.00461f24
push 0x104
lea eax, [ebp - 0x214]
push eax
call sub.kernel32.dll_GetSystemDirectoryA
lea eax, [ebp - 0x228]
lea edx, [ebp - 0x214]
call fcn.004040f0
push dword [ebp - 0x228]
push 0x510a60
lea eax, [ebp - 0x22c]
mov edx, esi
call fcn.004040f0
push dword [ebp - 0x22c]
push 0x510a74
lea eax, [ebp - 0x224]
mov edx, 4
call fcn.00404278
mov eax, dword [ebp - 0x224]
call fcn.00409d0c
test al, al
je 0x5107f5
lea eax, [ebp - 0x234]
lea edx, [ebp - 0x214]
call fcn.004040f0
push dword [ebp - 0x234]
push 0x510a60
lea eax, [ebp - 0x238]
mov edx, esi
call fcn.004040f0
push dword [ebp - 0x238]
push 0x510a74
lea eax, [ebp - 0x230]
mov edx, 4
call fcn.00404278
mov edx, dword [ebp - 0x230]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
mov ecx, dword [eax]
call dword [ecx + 0x34]
jmp 0x5108d1
lea eax, [ebp - 0x340]
lea edx, [ebp - 0x214]
call fcn.00402f74
lea edx, [ebp - 0x340]
lea eax, [ebp - 0x240]
call fcn.0040415c
push dword [ebp - 0x240]
push 0x510a84
lea eax, [ebp - 0x344]
mov edx, esi
call fcn.004040f0
push dword [ebp - 0x344]
push 0x510a74
lea eax, [ebp - 0x23c]
mov edx, 4
call fcn.00404278
mov eax, dword [ebp - 0x23c]
call fcn.00409d0c
test al, al
je 0x5108c1
lea eax, [ebp - 0x340]
lea edx, [ebp - 0x214]
call fcn.00402f74
lea edx, [ebp - 0x340]
lea eax, [ebp - 0x34c]
call fcn.0040415c
push dword [ebp - 0x34c]
push 0x510a84
lea eax, [ebp - 0x350]
mov edx, esi
call fcn.004040f0
push dword [ebp - 0x350]
push 0x510a74
lea eax, [ebp - 0x348]
mov edx, 4
call fcn.00404278
mov edx, dword [ebp - 0x348]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
mov ecx, dword [eax]
call dword [ecx + 0x34]
jmp 0x5108d1
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
mov edx, 0x510a90
mov ecx, dword [eax]
call dword [ecx + 0x34]
lea ecx, [ebp - 0x358]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
xor edx, edx
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebp - 0x358]
call fcn.0040437c
mov esi, eax
lea ecx, [ebp - 0x35c]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 8]
xor edx, edx
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x35c]
call fcn.0040437c
call fcn.0040a410
add esi, eax
mov edx, esi
sub edx, 4
lea eax, [ebp - 0x354]
call fcn.004040f0
mov eax, dword [ebp - 0x354]
mov edx, 0x510a74
call fcn.004042c8
jne 0x510945
lea edx, [ebp - 8]
mov eax, dword [ebp - 8]
call fcn.00461fc4
jmp 0x51094f
xor edx, edx
mov eax, dword [ebp - 8]
call fcn.00461fc4
cmp bx, 0x104
jb 0x510682
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x510977
mov eax, dword [ebp - 4]
call fcn.00403198
ret