Function at 0x4a593d90
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
xor eax, eax
push ebp
push 0x4a594024
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x4a5e8f40], 0
jne 0x4a593dde
push 0x4a594034
push 0x4a594068
call sub.kernel32.dll_GetModuleHandleW_1
push eax
call fcn.4a50d92c
mov dword [0x4a5e8f40], eax
cmp dword [0x4a5e8f44], 0
jne 0x4a593e01
push 0x4a59407c
push 0x4a5940a8
call sub.kernel32.dll_LoadLibraryW
push eax
call fcn.4a50d92c
mov dword [0x4a5e8f44], eax
cmp dword [0x4a5e8f48], 0
jne 0x4a593e24
push 0x4a5940bc
push 0x4a5940dc
call sub.kernel32.dll_GetModuleHandleW_1
push eax
call fcn.4a50d92c
mov dword [0x4a5e8f48], eax
xor eax, eax
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 5
call dword [0x4a5e8f40]
xor esi, esi
cmp dword [ebp - 8], 0
jne 0x4a593e81
mov dword [ebp - 8], 0x10000
mov eax, dword [ebp - 8]
add eax, eax
mov dword [ebp - 8], eax
push esi
call sub.kernel32.dll_LocalFree_1
mov eax, dword [ebp - 8]
push eax
push 0x40
call sub.kernel32.dll_LocalAlloc_1
mov esi, eax
push 0
mov eax, dword [ebp - 8]
push eax
push esi
push 5
call dword [0x4a5e8f40]
test eax, eax
je 0x4a593ea5
cmp dword [ebp - 8], 0x400000
jne 0x4a593e48
jmp 0x4a593ea5
mov eax, dword [ebp - 8]
add eax, eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
push eax
push 0x40
call sub.kernel32.dll_LocalAlloc_1
mov esi, eax
push 0
mov eax, dword [ebp - 8]
push eax
push esi
push 5
call dword [0x4a5e8f40]
test eax, eax
jne 0x4a593ff8
mov ebx, esi
cmp word [ebx + 0x38], 0
jbe 0x4a593fd6
lea eax, [ebp - 4]
mov edx, dword [ebx + 0x3c]
call fcn.4a508350
cmp dword [0x4a5e8f44], 0
je 0x4a593fc1
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 0x4a593fc1
push 0x104
lea eax, [ebp - 0x216]
push eax
push 0
mov eax, dword [ebp - 0xc]
push eax
call dword [0x4a5e8f44]
test eax, eax
jbe 0x4a593fb8
lea eax, [ebp - 4]
lea edx, [ebp - 0x216]
mov ecx, 0x105
call fcn.4a5083a4
mov edi, dword [0x4a5ed624]
mov edi, dword [edi]
mov edx, dword [ebp - 4]
mov eax, 0x4a594100
call edi
test al, al
je 0x4a593f90
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.4a508658
mov eax, dword [ebp - 0x21c]
push eax
lea eax, [ebp - 0x220]
lea edx, [ebp - 0x216]
mov ecx, 0x105
call fcn.4a5083a4
mov edx, dword [ebp - 0x220]
lea eax, [ebp - 4]
pop ecx
call fcn.4a5084e8
jmp 0x4a593fb8
mov edi, dword [0x4a5ed354]
mov edi, dword [edi]
mov edx, dword [ebp - 4]
mov eax, 0x4a594138
call edi
test al, al
je 0x4a593fb8
lea eax, [ebp - 4]
mov ecx, 4
mov edx, 1
call fcn.4a5086a0
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebx + 0x50]
mov edx, dword [ebx + 0x44]
mov eax, dword [ebp - 4]
call fcn.4a5939fc
pop ecx
jmp 0x4a593feb
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebx + 0x50]
mov edx, dword [ebx + 0x44]
mov eax, 0x4a594150
call fcn.4a5939fc
pop ecx
mov edi, dword [ebx]
test edi, edi
je 0x4a593ff8
add ebx, edi
jmp 0x4a593eaf
push esi
call sub.kernel32.dll_LocalFree_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a59402b
lea eax, [ebp - 0x220]
mov edx, 2
call fcn.4a507678
lea eax, [ebp - 4]
call fcn.4a507618
ret