Function at 0x458a10
Capabilities:
Get common file path

Disassembly:
sub esp, 0x428
mov ecx, dword [esp + 0x430]
push ebx
push ebp
mov ebp, dword [esp + 0x434]
push esi
push edi
mov edi, dword [ebp]
lea eax, [esp + 0x22c]
push 0x104
push eax
xor ebx, ebx
push 0xffffffffffffffff
push ecx
push ebx
push ebx
mov byte [esp + 0x2b], 0
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x34], ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edx, dword [esp + 0x454]
mov word [esp + 0x434], bx
cmp edx, ebx
je 0x458acf
xor esi, esi
cmp edi, ebx
jbe 0x458acf
lea eax, [ebp + 8]
mov ecx, dword [eax]
cmp ecx, edx
ja 0x458a7d
mov ebp, dword [eax + 4]
add ebp, ecx
cmp ebp, edx
ja 0x458a89
inc esi
add eax, 0x210
cmp esi, edi
jb 0x458a6e
jmp 0x458acf
mov eax, dword [esp + 0x43c]
mov edx, esi
shl edx, 5
add edx, esi
push 0x5c
shl edx, 4
lea ebp, [edx + eax + 0x14]
push ebp
call dword [sym.imp.MSVCRT.dll_wcsrchr]
add esp, 8
cmp eax, ebx
je 0x458ab3
add eax, 2
jmp 0x458ab5
mov eax, ebp
lea ecx, [esp + 0x22c]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x458c57
mov edx, dword [esp + 0x450]
push 0x104
lea eax, [esp + 0x24]
push edx
push eax
call dword [sym.imp.MSVCRT.dll_wcsncpy]
lea ecx, [esp + 0x2c]
push 0x5c
push ecx
mov word [esp + 0x23c], bx
call dword [sym.imp.MSVCRT.dll_wcsrchr]
mov ebp, dword [sym.imp.MSVCRT.dll_wcsncat]
add esp, 0x14
cmp eax, ebx
je 0x458b7e
push 0x104
lea edx, [esp + 0x24]
push 0x4c6204
push edx
mov word [eax], bx
call ebp
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
mov ecx, 0x104
lea edx, [esp + 0x23c]
sub ecx, eax
lea eax, [esp + 0x30]
push ecx
push edx
push eax
call ebp
add esp, 0x1c
xor esi, esi
cmp edi, ebx
mov word [esp + 0x228], bx
jbe 0x458b7e
mov ecx, dword [esp + 0x43c]
lea ebx, [ecx + 0x14]
lea edx, [esp + 0x20]
push edx
push ebx
call dword [sym.imp.MSVCRT.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x458c55
inc esi
add ebx, 0x210
cmp esi, edi
jb 0x458b5a
xor ebx, ebx
lea eax, [esp + 0x20]
push 0x208
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x104
lea ecx, [esp + 0x24]
push 0x4c6204
push ecx
call ebp
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.MSVCRT.dll_wcslen]
mov ecx, 0x104
lea edx, [esp + 0x23c]
sub ecx, eax
lea eax, [esp + 0x30]
push ecx
push edx
push eax
call ebp
add esp, 0x1c
xor esi, esi
cmp edi, ebx
mov word [esp + 0x228], bx
jbe 0x458bfa
mov ecx, dword [esp + 0x43c]
lea ebp, [ecx + 0x14]
lea edx, [esp + 0x20]
push edx
push ebp
call dword [sym.imp.MSVCRT.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x458c57
inc esi
add ebp, 0x210
cmp esi, edi
jb 0x458bdc
xor esi, esi
cmp edi, ebx
jbe 0x458d1f
mov eax, dword [esp + 0x43c]
lea ebp, [eax + 0x14]
push 0x5c
push ebp
call dword [sym.imp.MSVCRT.dll_wcsrchr]
add esp, 8
cmp eax, ebx
je 0x458c23
add eax, 2
jmp 0x458c25
mov eax, ebp
lea ecx, [esp + 0x22c]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x458c57
inc esi
add ebp, 0x210
cmp esi, edi
jb 0x458c0e
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x428
ret
xor ebx, ebx
mov eax, dword [esp + 0x43c]
mov edx, esi
shl edx, 5
add edx, esi
shl edx, 4
lea edi, [edx + eax + 4]
lea edx, [esp + 0x18]
lea ecx, [edi + 0x10]
push ecx
push edx
call fcn.0042cbb0
add esp, 8
cmp al, 1
jne 0x458d1f
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x14]
push eax
push ecx
call fcn.0042cce0
add esp, 8
cmp al, 1
jne 0x458d14
mov eax, dword [esp + 0x14]
cmp eax, ebx
jbe 0x458d14
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x458d14
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x1c]
push edx
push eax
push esi
push ecx
call fcn.0042cd40
add esp, 0x10
cmp al, 1
jne 0x458d0a
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
cmp ecx, eax
jne 0x458d0a
mov edx, dword [esp + 0x448]
mov ecx, dword [esp + 0x444]
push edx
push ecx
push eax
push esi
call fcn.004584a0
add esp, 0x10
cmp al, 1
jne 0x458d0a
mov eax, dword [esp + 0x44c]
mov edx, dword [edi + 4]
mov byte [esp + 0x13], 1
mov dword [eax], edx
push esi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x428
ret