Function at 0x100046060
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
sub rsp, 0x30
xor ebp, ebp
mov ebx, edx
mov rsi, rcx
mov dword [rsp + 0x20], ebp
mov edi, 0x80004005
cmp rcx, rbp
je 0x10004644e
cmp ebx, ebp
je 0x10004644e
lea r8, [rsp + 0x20]
lea rdx, [0x100023170]
call qword [sym.imp.msvcrt.dll_swscanf]
cmp eax, ebp
jne 0x1000460ad
mov eax, 0x80070057
jmp 0x100046453
mov eax, dword [rsp + 0x20]
cmp eax, 0xffffffff
je 0x1000460a3
cmp eax, 0x19
ja 0x100046326
je 0x100046314
cmp eax, 0x11
ja 0x100046200
je 0x1000461b0
cmp eax, ebp
je 0x10004644a
sub eax, 1
je 0x10004617e
sub eax, 9
je 0x100046314
sub eax, 1
je 0x100046166
cmp eax, 1
jne 0x10004644a
mov edx, ebx
mov rcx, rsi
shr edx, 1
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, ebp
je 0x100046111
mov edi, ebp
jmp 0x100046137
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x57
cmp eax, ebp
cmove eax, ecx
movzx edi, ax
or edi, 0x80070000
cmp eax, ebp
cmovle edi, eax
cmp edi, ebp
jne 0x10004644a
xor edx, edx
lea ecx, [rdx + 4]
call fcn.100040420
mov rdx, rbx
mov rcx, rsi
shr rdx, 1
lea r8, [0x1000270e8]
cmp eax, ebp
jne 0x10004615c
lea r8, [0x100027100]
call fcn.10002e3d4
jmp 0x10004644a
shr ebx, 1
mov rcx, rsi
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, ebp
je 0x10004618d
mov edi, ebp
jmp 0x10004644a
shr ebx, 1
mov rdx, rsi
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
jmp 0x100046173
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x57
cmp eax, ebp
cmove eax, ecx
movzx edi, ax
or edi, 0x80070000
cmp eax, ebp
cmovle edi, eax
jmp 0x10004644a
mov edx, ebx
mov rcx, rsi
shr edx, 1
call qword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
cmp eax, ebp
je 0x1000461c5
mov edi, ebp
jmp 0x1000461eb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x57
cmp eax, ebp
cmove eax, ecx
movzx edi, ax
or edi, 0x80070000
cmp eax, ebp
cmovle edi, eax
cmp edi, ebp
jne 0x10004644a
lea r8, [0x100027118]
mov rdx, rbx
mov rcx, rsi
shr rdx, 1
jmp 0x10004615c
sub eax, 0x12
je 0x1000462cd
sub eax, 2
je 0x100046286
sub eax, 1
je 0x10004644a
sub eax, 2
je 0x10004644a
cmp eax, 1
jne 0x10004644a
shr ebx, 1
mov rcx, rsi
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, ebp
je 0x10004623e
mov edi, ebp
jmp 0x100046264
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x57
cmp eax, ebp
cmove eax, ecx
movzx edi, ax
or edi, 0x80070000
cmp eax, ebp
cmovle edi, eax
cmp edi, ebp
jne 0x10004644a
lea rdx, [0x100023178]
mov rcx, rsi
call qword [sym.imp.msvcrt.dll_wcsstr]
cmp rax, rbp
je 0x10004644a
mov word [rax + 4], bp
jmp 0x10004644a
mov edx, ebx
mov rcx, rsi
shr edx, 1
call qword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
cmp eax, ebp
je 0x10004629b
mov edi, ebp
jmp 0x1000462c1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x57
cmp eax, ebp
cmove eax, ecx
movzx edi, ax
or edi, 0x80070000
cmp eax, ebp
cmovle edi, eax
cmp edi, ebp
jne 0x10004644a
lea r8, [0x100027138]
jmp 0x1000461f2
mov edx, ebx
mov rcx, rsi
shr edx, 1
call qword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
cmp eax, ebp
je 0x1000462e2
mov edi, ebp
jmp 0x100046308
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x57
cmp eax, ebp
cmove eax, ecx
movzx edi, ax
or edi, 0x80070000
cmp eax, ebp
cmovle edi, eax
cmp edi, ebp
jne 0x10004644a
lea r8, [0x100027128]
jmp 0x1000461f2
shr ebx, 1
mov rcx, rsi
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
jmp 0x100046173
cmp eax, 0x4019
ja 0x1000463e6
cmp eax, 0x4016
jae 0x10004644a
cmp eax, 0x1e
je 0x10004644a
cmp eax, 0x32
je 0x10004644a
cmp eax, 0x33
je 0x1000463a3
cmp eax, 0x34
jne 0x10004644a
mov edx, ebx
mov rcx, rsi
shr edx, 1
call qword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
cmp eax, ebp
je 0x100046371
mov edi, ebp
jmp 0x100046397
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x57
cmp eax, ebp
cmove eax, ecx
movzx edi, ax
or edi, 0x80070000
cmp eax, ebp
cmovle edi, eax
cmp edi, ebp
jne 0x10004644a
lea r8, [0x100027158]
jmp 0x1000461f2
mov edx, ebx
mov rcx, rsi
shr edx, 1
call qword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
cmp eax, ebp
je 0x1000463b8
mov edi, ebp
jmp 0x1000463da
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x57
cmp eax, ebp
cmove eax, ecx
movzx edi, ax
or edi, 0x80070000
cmp eax, ebp
cmovle edi, eax
cmp edi, ebp
jne 0x10004644a
lea r8, [0x100027148]
jmp 0x1000461f2
sub eax, 0x401f
je 0x10004644a
sub eax, 4
je 0x10004643c
sub eax, 3
je 0x10004642e
sub eax, 5
je 0x100046420
cmp eax, 0x3825
jne 0x10004644a
mov edx, 1
mov r8d, 0x104
mov rcx, rsi
call fcn.100040758
neg eax
sbb ecx, ecx
not ecx
and edi, ecx
jmp 0x10004644a
shr ebx, 1
mov rcx, rsi
mov edx, ebx
call fcn.100045b50
jmp 0x100046448
shr ebx, 1
mov rcx, rsi
mov edx, ebx
call fcn.100045870
jmp 0x100046448
shr ebx, 1
mov rcx, rsi
mov edx, ebx
call fcn.100045cf0
mov edi, eax
mov eax, edi
jmp 0x100046453
mov eax, 0x80004003
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop rdi
pop rsi
pop rbp
ret