Function at 0x412ec0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x3038
call fcn.0040ace0
mov eax, dword [0x41a004]
xor eax, ebp
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x2024], eax
mov dword [ebp - 0xc], 0
push 0x800
lea eax, [ebp - 0x1018]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push str.CSRSS.EXE
lea ecx, [ebp - 0x1018]
push ecx
call fcn.00411da0
add esp, 8
lea edx, [ebp - 0x1018]
push edx
call fcn.004030f8
add esp, 4
push 1
lea eax, [ebp - 0x1018]
push eax
call fcn.00411c20
add esp, 8
mov dword [ebp - 8], eax
push 0x800
lea ecx, [ebp - 0x1018]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push str.SERVICES.EXE
lea edx, [ebp - 0x1018]
push edx
call fcn.00411da0
add esp, 8
lea eax, [ebp - 0x1018]
push eax
call fcn.004030f8
add esp, 4
push 0
lea ecx, [ebp - 0x1018]
push ecx
call fcn.00411c20
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x4131f5
push 0x10
call fcn.0040ddb0
add esp, 4
mov dword [ebp - 0x2028], eax
cmp dword [ebp - 0x2028], 0
je 0x4131f5
mov dword [ebp - 0x3038], 0
jmp 0x412fbe
mov edx, dword [ebp - 0x3038]
add edx, 1
mov dword [ebp - 0x3038], edx
mov eax, dword [ebp - 0x2028]
mov ecx, dword [ebp - 0x3038]
cmp ecx, dword [eax]
jae 0x4131e6
mov edx, dword [ebp - 0x3038]
shl edx, 4
mov eax, dword [ebp - 0x2028]
mov ecx, dword [eax + edx + 4]
push ecx
call fcn.0040e100
add esp, 4
test eax, eax
je 0x4131e1
mov edx, dword [ebp - 0x3038]
shl edx, 4
mov eax, dword [ebp - 0x2028]
mov ecx, dword [eax + edx + 4]
push ecx
push 0x40
call fcn.0040df30
add esp, 8
mov dword [ebp - 0x1020], eax
cmp dword [ebp - 0x1020], 0
je 0x4131d4
push 2
push 0
push 0
lea edx, [ebp - 0x3034]
push edx
push 0xffffffffffffffff
mov eax, dword [ebp - 0x3038]
shl eax, 4
mov ecx, dword [ebp - 0x2028]
movzx edx, word [ecx + eax + 0xa]
push edx
mov eax, dword [ebp - 0x1020]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x4131d4
push 2
mov ecx, dword [ebp - 0x3034]
push ecx
call fcn.0040de70
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x4131be
push str.Process
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 4]
push eax
call fcn.004032f7
add esp, 8
test eax, eax
jne 0x4131b2
mov ecx, dword [ebp - 0x3034]
push ecx
call fcn.0040dd70
add esp, 4
mov dword [ebp - 0x101c], eax
cmp dword [ebp - 0x101c], 0
je 0x4131b2
mov edx, dword [ebp - 0x101c]
cmp edx, dword [ebp - 0x2024]
je 0x4131b2
cmp dword [ebp - 0x101c], 0xc
jb 0x4131b2
mov eax, dword [ebp - 0x101c]
push eax
push 0x1000
lea ecx, [ebp - 0x3030]
push ecx
mov edx, dword [ebp - 0x3034]
push edx
call fcn.00410670
add esp, 0x10
test eax, eax
je 0x4131b2
push 0
lea eax, [ebp - 0x2020]
push eax
lea ecx, [ebp - 0x3030]
push ecx
call fcn.00412640
add esp, 0xc
push 0x5c
lea edx, [ebp - 0x3030]
push edx
call fcn.00401080
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x413156
xor eax, eax
mov ecx, dword [ebp - 4]
mov word [ecx], ax
mov edx, dword [ebp - 4]
add edx, 2
mov dword [ebp - 4], edx
lea eax, [ebp - 0x3030]
mov dword [ebp - 0x202c], eax
jmp 0x41317b
lea ecx, [ebp - 0x3030]
mov dword [ebp - 4], ecx
lea edx, [ebp - 0x3030]
push edx
call fcn.00402ca5
add esp, 4
lea eax, [ebp + eax*2 - 0x3030]
mov dword [ebp - 0x202c], eax
mov ecx, dword [ebp - 0x202c]
push ecx
mov edx, dword [ebp - 4]
push edx
call fcn.0040dbb0
add esp, 8
test eax, eax
jne 0x4131b2
mov eax, dword [ebp - 0x101c]
push eax
mov ecx, dword [ebp - 0x3034]
push ecx
call fcn.00410820
add esp, 8
mov dword [ebp - 0x3034], 0
mov edx, dword [ebp - 0x10]
push edx
call fcn.00402dfe
add esp, 4
cmp dword [ebp - 0x3034], 0
je 0x4131d4
mov eax, dword [ebp - 0x3034]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x1020]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x412faf
mov edx, dword [ebp - 0x2028]
push edx
call fcn.00402dfe
add esp, 4
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004010d5
mov esp, ebp
pop ebp
ret