Function at 0x401538
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x448
mov dword [esp], str.ntdll.dll
mov eax, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
call eax
sub esp, 4
mov dword [esp + 4], str.RtlEnterCriticalSection
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
sub esp, 8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4015d4
mov dword [esp], 1
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 4], str.___
mov dword [esp], eax
call sym._fprintf
mov dword [esp], 1
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 4], str.Could_not_find_RtlEnterCriticalSection.
mov dword [esp], eax
call sym._fprintf
mov dword [esp], 1
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 4], 0x40a0a0
mov dword [esp], eax
call sym._fprintf
mov eax, 1
jmp 0x401869
mov dword [esp], str.ntdll.dll
mov eax, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
call eax
sub esp, 4
mov dword [esp + 4], str.RtlLeaveCriticalSection
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
sub esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x401667
mov dword [esp], 1
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 4], str.___
mov dword [esp], eax
call sym._fprintf
mov dword [esp], 1
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 4], str.Could_not_find_RtlLeaveCriticalSection.
mov dword [esp], eax
call sym._fprintf
mov dword [esp], 1
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 4], 0x40a0a0
mov dword [esp], eax
call sym._fprintf
mov eax, 1
jmp 0x401869
mov dword [esp], str.ntdll.dll
mov eax, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
call eax
sub esp, 4
mov dword [esp + 4], str.RtlInitUnicodeString
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
sub esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4016fa
mov dword [esp], 1
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 4], str.___
mov dword [esp], eax
call sym._fprintf
mov dword [esp], 1
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 4], str.Could_not_find_RtlInitUnicodeString.
mov dword [esp], eax
call sym._fprintf
mov dword [esp], 1
mov eax, dword [dbg.__acrt_iob_func]
call eax
mov dword [esp + 4], 0x40a0a0
mov dword [esp], eax
call sym._fprintf
mov eax, 1
jmp 0x401869
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x22c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
call eax
sub esp, 8
mov dword [esp + 8], str.explorer.exe
mov dword [esp + 4], 0x104
lea eax, [ebp - 0x22c]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll_wcscat_s]
call eax
mov dword [esp], 0x104
call sym._malloc
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x22c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x104
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll_wcscpy_s]
call eax
call sym._NtGetPeb
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x1c]
mov dword [esp], eax
mov eax, dword [ebp - 0x14]
call eax
sub esp, 4
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x10]
lea edx, [eax + 0x38]
lea eax, [ebp - 0x22c]
mov dword [esp + 4], eax
mov dword [esp], edx
mov eax, dword [ebp - 0xc]
call eax
sub esp, 8
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x10]
lea edx, [eax + 0x40]
lea eax, [ebp - 0x22c]
mov dword [esp + 4], eax
mov dword [esp], edx
mov eax, dword [ebp - 0xc]
call eax
sub esp, 8
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x18], eax
mov dword [esp + 8], 0x104
lea eax, [ebp - 0x434]
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
call eax
sub esp, 0xc
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x28]
mov dword [esp + 4], eax
lea eax, [ebp - 0x434]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll__wcsicmp]
call eax
test eax, eax
jne 0x401843
mov eax, dword [ebp - 0x18]
lea edx, [eax + 0x24]
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov dword [esp], edx
mov eax, dword [ebp - 0xc]
call eax
sub esp, 8
mov eax, dword [ebp - 0x18]
lea edx, [eax + 0x2c]
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov dword [esp], edx
mov eax, dword [ebp - 0xc]
call eax
sub esp, 8
jmp 0x401853
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x24]
jne 0x4017f3
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x1c]
mov dword [esp], eax
mov eax, dword [ebp - 0x10]
call eax
sub esp, 4
mov eax, 0
leave
ret