Function at 0x40bd60
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54535b
mov eax, dword fs:[0]
push eax
sub esp, 0x84c
mov eax, dword [0x5ec938]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, ecx
mov edx, dword [edi + 0x65c]
mov edx, dword [edx + 0x10]
mov dword [ebp - 0x84c], eax
lea eax, [ebp - 0x850]
push eax
lea ecx, [ebp - 0x838]
push ecx
lea esi, [edi + 0x65c]
xor ebx, ebx
push str.AppPathsName
push str._app_path_info_
mov ecx, esi
mov dword [ebp - 0x858], edi
mov dword [ebp - 0x838], ebx
mov dword [ebp - 0x850], ebx
mov dword [ebp - 0x844], ebx
mov dword [ebp - 0x840], ebx
mov dword [ebp - 0x854], esi
call edx
cmp eax, ebx
je 0x40c073
push 0x206
lea ecx, [ebp - 0x216]
xor eax, eax
push ebx
push ecx
mov word [ebp - 0x218], ax
call fcn.0052c850
add esp, 0xc
push 0x104
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
call fcn.00436219
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40be3c
push 0x80004005
call fcn.00401ed0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x834], eax
mov eax, dword [ebp - 0x838]
mov ecx, dword [eax]
mov dword [ebp - 4], ebx
cmp ecx, ebx
jle 0x40c02a
mov dword [ebp - 0x848], ebx
mov dword [ebp - 0x83c], ebx
lea ecx, [ecx]
mov ecx, dword [ebx + eax + 0x290]
push ecx
lea edx, [ebp - 0x830]
push 0x104
push edx
call fcn.0052cd4a
mov eax, dword [ebp - 0x838]
mov ecx, dword [ebx + eax + 0x294]
add esp, 0xc
test ecx, ecx
jne 0x40bea1
xor eax, eax
jmp 0x40beb5
mov eax, ecx
lea esi, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x40bea6
sub eax, esi
sar eax, 1
push eax
push ecx
lea ecx, [ebp - 0x834]
call fcn.004026f0
lea ecx, [ebp - 0x218]
push ecx
push str._SysFolder_
lea ecx, [ebp - 0x834]
call fcn.0040a2e0
mov eax, dword [edi + 0x64c]
push eax
push str._InsFolder_
lea ecx, [ebp - 0x834]
call fcn.0040a2e0
mov edx, dword [ebp - 0x834]
push edx
lea eax, [ebp - 0x628]
push 0x104
push eax
call fcn.0052cd4a
mov ecx, dword [ebp - 0x838]
mov ecx, dword [ebx + ecx + 0x298]
add esp, 0xc
test ecx, ecx
jne 0x40bf20
xor eax, eax
jmp 0x40bf34
mov eax, ecx
lea esi, [eax + 2]
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x40bf25
sub eax, esi
sar eax, 1
push eax
push ecx
lea ecx, [ebp - 0x834]
call fcn.004026f0
lea edx, [ebp - 0x218]
push edx
push str._SysFolder_
lea ecx, [ebp - 0x834]
call fcn.0040a2e0
mov eax, dword [edi + 0x64c]
push eax
push str._InsFolder_
lea ecx, [ebp - 0x834]
call fcn.0040a2e0
mov eax, dword [ebp - 0x838]
mov ecx, dword [ebx + eax + 0x298]
push ecx
lea edx, [ebp - 0x420]
push 0x104
push edx
call fcn.0052cd4a
mov eax, dword [ebp - 0x840]
add esp, 0xc
test eax, eax
jne 0x40bfb1
push 0x618
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x40bfce
mov ecx, dword [ebp - 0x83c]
add ecx, 0x618
push ecx
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
test eax, eax
je 0x40c003
mov edi, dword [ebp - 0x83c]
inc dword [ebp - 0x844]
add edi, eax
add dword [ebp - 0x83c], 0x618
mov ecx, 0x186
lea esi, [ebp - 0x830]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x858]
mov dword [ebp - 0x840], eax
mov ecx, dword [ebp - 0x848]
mov eax, dword [ebp - 0x838]
inc ecx
add ebx, 0x71c
mov dword [ebp - 0x848], ecx
cmp ecx, dword [eax]
jl 0x40be70
mov esi, dword [ebp - 0x854]
mov edx, dword [esi]
push eax
mov eax, dword [edx + 0x14]
mov ecx, esi
call eax
mov eax, dword [ebp - 0x834]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c05d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x84c]
mov edx, dword [ebp - 0x840]
mov eax, dword [ebp - 0x844]
mov dword [ecx], edx
jmp 0x40c075
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0052c2ec
mov esp, ebp
pop ebp
ret 4