Function at 0x46180c
Capabilities:
Get common file path

Disassembly:
push 0xe30
mov eax, 0x44c144
call fcn.0043bc61
mov dword [ebp - 0xe3c], edx
mov ebx, ecx
lea ecx, [ebp - 0xd74]
xor edi, edi
call fcn.004253b2
and dword [ebp - 4], edi
and dword [ebp - 0xe10], edi
lea ecx, [ebp - 0xe10]
mov byte [ebp - 4], 1
call fcn.0043ecb8
push eax
push 8
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentProcess]
push eax
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_OpenProcessToken]
test eax, eax
jne 0x461903
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x461875
movzx edi, di
or edi, 0x80070000
xor eax, eax
push 0x208
push eax
mov dword [ebp - 0xe18], eax
mov dword [ebp - 0xe14], eax
lea eax, [ebp - 0x218]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push 0
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetModuleFileNameW]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0xe18]
call fcn.0046496f
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xe18]
push dword [ebx + 8]
push dword [ebx + 4]
push 0x7d0
call fcn.004649a0
mov ecx, dword [ebx]
push 0xffffffffffffffff
push eax
push 0x40e518
mov esi, dword [ecx + 0x10]
mov ecx, esi
mov dword [ebx + 0xc], eax
call dword [0x4a3670]
mov ecx, ebx
call esi
lea ecx, [ebp - 0xe18]
mov byte [ebp - 4], 1
call fcn.0043a882
push 0x20a
lea eax, [ebp - 0x834]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0xe2c], 0x105
test edi, edi
js 0x461a3c
lea eax, [ebp - 0xe2c]
push eax
lea eax, [ebp - 0x834]
push eax
push dword [ebp - 0xe10]
call dword [sym.imp.USERENV.dll_GetUserProfileDirectoryW]
test eax, eax
je 0x4619a7
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x834]
push eax
mov eax, dword [ebp - 0xd74]
mov esi, dword [eax + 0x10]
mov ecx, esi
call dword [0x4a3670]
lea ecx, [ebp - 0xd74]
call esi
mov edx, dword [ebp - 0xd68]
test edx, edx
je 0x461a3c
mov eax, dword [ebp - 0xd70]
movzx ecx, word [eax + edx*2 - 2]
call fcn.0042caa0
test eax, eax
je 0x461a3c
lea eax, [edx - 1]
push eax
lea ecx, [ebp - 0xd74]
call fcn.00424f02
jmp 0x461a3c
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x4619bc
movzx edi, di
or edi, 0x80070000
mov ecx, dword [ebp + 4]
mov edx, 0x426
push edi
push 0x409960
call fcn.004649e6
xor eax, eax
push 0x208
push eax
mov dword [ebp - 0xe20], eax
mov dword [ebp - 0xe1c], eax
lea eax, [ebp - 0x420]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x420]
push 0x104
push eax
push 0
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetModuleFileNameW]
lea eax, [ebp - 0x420]
push eax
lea ecx, [ebp - 0xe20]
call fcn.0046496f
push dword [ebx + 8]
lea ecx, [ebp - 0xe20]
push dword [ebx + 4]
push 0x7dc
call fcn.004649a0
lea ecx, [ebp - 0xe20]
mov dword [ebx + 0xc], eax
call fcn.0043a882
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0xe10]
test eax, eax
je 0x461a71
cmp eax, 0xffffffff
je 0x461a71
mov dword [ebp - 0xe30], eax
lea edx, [ebp - 0xe30]
mov eax, dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
lea ecx, [ebp - 0xe34]
mov dword [ebp - 0xe34], eax
call fcn.0043d568
lea ecx, [ebp - 0xce0]
call fcn.004253b2
push 0x20a
lea eax, [ebp - 0xa40]
mov byte [ebp - 4], 3
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0xe38], 0x105
test edi, edi
js 0x461bb3
lea eax, [ebp - 0xe38]
push eax
lea eax, [ebp - 0xa40]
push eax
call dword [sym.imp.USERENV.dll_GetProfilesDirectoryW]
test eax, eax
je 0x461b1e
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0xa40]
push eax
mov eax, dword [ebp - 0xce0]
mov esi, dword [eax + 0x10]
mov ecx, esi
call dword [0x4a3670]
lea ecx, [ebp - 0xce0]
call esi
mov edx, dword [ebp - 0xcd4]
test edx, edx
je 0x461bb3
mov eax, dword [ebp - 0xcdc]
movzx ecx, word [eax + edx*2 - 2]
call fcn.0042caa0
test eax, eax
je 0x461bb3
lea eax, [edx - 1]
push eax
lea ecx, [ebp - 0xce0]
call fcn.00424f02
jmp 0x461bb3
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x461b33
movzx edi, di
or edi, 0x80070000
mov ecx, dword [ebp + 4]
mov edx, 0x444
push edi
push 0x409960
call fcn.004649e6
xor eax, eax
push 0x208
push eax
mov dword [ebp - 0xe28], eax
mov dword [ebp - 0xe24], eax
lea eax, [ebp - 0x628]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x628]
push 0x104
push eax
push 0
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetModuleFileNameW]
lea eax, [ebp - 0x628]
push eax
lea ecx, [ebp - 0xe28]
call fcn.0046496f
push dword [ebx + 8]
lea ecx, [ebp - 0xe28]
push dword [ebx + 4]
push 0x7db
call fcn.004649a0
lea ecx, [ebp - 0xe28]
mov dword [ebx + 0xc], eax
call fcn.0043a882
mov byte [ebp - 0xe09], 0
mov ebx, 0x401028
test edi, edi
js 0x461cac
push 0x20a
lea eax, [ebp - 0xc4c]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0xc4c]
push eax
push 1
push 0
push 0x401c
push 0
call dword [sym.imp.ext_ms_win_shell32_shellfolders_l1_1_0.dll_SHGetFolderPathW]
mov ecx, dword [ebp + 4]
test eax, eax
jns 0x461c11
push eax
push 0x409960
mov edx, 0x452
call fcn.0045e47c
jmp 0x461cac
lea eax, [ebp - 0xc4c]
push eax
lea ecx, [ebp - 0xe08]
call fcn.004319bd
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0xe08]
push 0xffffffffffffffff
push dword [ebp - 0xdfc]
mov esi, dword [eax + 0xc]
mov ecx, esi
push 0x40e520
call dword [0x4a3670]
lea ecx, [ebp - 0xe08]
call esi
push dword [ebp - 0xe3c]
lea eax, [ebp - 0xe08]
push ecx
push eax
lea eax, [ebp - 0xd74]
push eax
lea edx, [ebp - 0xce0]
lea ecx, [ebp - 0xe09]
call fcn.00461377
test eax, eax
jns 0x461c8a
mov ecx, dword [ebp + 4]
mov edx, 0x45c
push eax
push 0x409960
call fcn.0045e47c
mov eax, dword [ebp - 0xe04]
mov dword [ebp - 0xe08], ebx
test eax, eax
je 0x461cac
lea ecx, [ebp - 0xdf8]
cmp eax, ecx
je 0x461cac
push eax
call dword [sym.imp.msvcrt.dll_free]
pop ecx
mov eax, dword [ebp - 0xcdc]
mov dword [ebp - 0xce0], ebx
test eax, eax
je 0x461cce
lea ecx, [ebp - 0xcd0]
cmp eax, ecx
je 0x461cce
push eax
call dword [sym.imp.msvcrt.dll_free]
pop ecx
mov eax, dword [ebp - 0xd70]
mov dword [ebp - fcn.00437280], 0x401558
mov dword [ebp - 0xd74], ebx
test eax, eax
je 0x461cfa
lea ecx, [ebp - 0xd64]
cmp eax, ecx
je 0x461cfa
push eax
call dword [sym.imp.msvcrt.dll_free]
pop ecx
xor eax, eax
call fcn.0043bc10
ret