Function at 0x459738
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffde0
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 4], eax
lea ebx, [ebp - 8]
xor eax, eax
push ebp
push 0x4599b5
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x549d44], 0
jne 0x459789
push 0x4599c4
push 0x4599f8
call sub.KERNEL32.DLL_GetModuleHandleW
push eax
call fcn.00409694
mov dword [0x549d44], eax
cmp dword [0x549d48], 0
jne 0x4597ac
push 0x459a0c
push 0x459a38
call sub.KERNEL32.DLL_LoadLibraryW
push eax
call fcn.00409694
mov dword [0x549d48], eax
cmp dword [0x549d4c], 0
jne 0x4597cf
push 0x459a4c
push 0x459a6c
call sub.KERNEL32.DLL_GetModuleHandleW
push eax
call fcn.00409694
mov dword [0x549d4c], eax
xor eax, eax
mov dword [ebx], eax
push ebx
push 0
push 0
push 5
call dword [0x549d44]
xor esi, esi
cmp dword [ebx], 0
jne 0x459821
mov dword [ebx], 0x10000
mov eax, dword [ebx]
add eax, eax
mov dword [ebx], eax
push esi
call sub.KERNEL32.DLL_LocalFree
mov eax, dword [ebx]
push eax
push 0x40
call sub.KERNEL32.DLL_LocalAlloc
mov esi, eax
push 0
mov eax, dword [ebx]
push eax
push esi
push 5
call dword [0x549d44]
test eax, eax
je 0x459841
cmp dword [ebx], 0x400000
jne 0x4597ed
jmp 0x459841
mov eax, dword [ebx]
add eax, eax
mov dword [ebx], eax
mov eax, dword [ebx]
push eax
push 0x40
call sub.KERNEL32.DLL_LocalAlloc
mov esi, eax
push 0
mov eax, dword [ebx]
push eax
push esi
push 5
call dword [0x549d44]
test eax, eax
jne 0x459989
mov ebx, esi
cmp dword [ebx + 0x3c], 0
je 0x459967
lea eax, [ebp - 4]
mov edx, dword [ebx + 0x3c]
call fcn.0040683c
cmp dword [0x549d48], 0
je 0x459952
mov eax, dword [ebx + 0x44]
push eax
push 0
push 0x410
call sub.KERNEL32.DLL_OpenProcess
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x459952
push 0x104
lea eax, [ebp - 0x216]
push eax
push 0
mov eax, dword [ebp - 0xc]
push eax
call dword [0x549d48]
test eax, eax
jbe 0x459949
lea eax, [ebp - 4]
lea edx, [ebp - 0x216]
mov ecx, 0x105
call fcn.00406890
mov edx, dword [ebp - 4]
mov eax, 0x459a90
call fcn.0040cfb8
test al, al
je 0x459926
push 0x104
lea eax, [ebp - 0x216]
push eax
call sub.KERNEL32.DLL_GetSystemDirectoryW
lea eax, [ebp - 0x21c]
push eax
mov ecx, 0x7fffffff
mov edx, 0x15
mov eax, dword [ebp - 4]
call fcn.00406ce4
mov eax, dword [ebp - 0x21c]
push eax
lea eax, [ebp - 0x220]
lea edx, [ebp - 0x216]
mov ecx, 0x105
call fcn.00406890
mov edx, dword [ebp - 0x220]
lea eax, [ebp - 4]
pop ecx
call fcn.00406a64
jmp 0x459949
mov edx, dword [ebp - 4]
mov eax, 0x459ac8
call fcn.0040cd24
test al, al
je 0x459949
lea eax, [ebp - 4]
mov ecx, 4
mov edx, 1
call fcn.00406db4
mov eax, dword [ebp - 0xc]
push eax
call sub.KERNEL32.DLL_CloseHandle
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebx + 0x50]
mov edx, dword [ebx + 0x44]
mov eax, dword [ebp - 4]
call fcn.0045938c
pop ecx
jmp 0x45997c
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebx + 0x50]
mov edx, dword [ebx + 0x44]
mov eax, 0x459ae0
call fcn.0045938c
pop ecx
mov edi, dword [ebx]
test edi, edi
je 0x459989
add ebx, edi
jmp 0x45984b
push esi
call sub.KERNEL32.DLL_LocalFree
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4599bc
lea eax, [ebp - 0x220]
mov edx, 2
call fcn.00406688
lea eax, [ebp - 4]
call fcn.00406680
ret