Function at 0x404911
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x624
mov eax, dword [0x40f008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov esi, 0x80070057
push edi
call dword [sym.imp.OLEAUT32.dll_VariantInit]
cmp eax, 0x104
jae 0x404aa6
push 2
pop ebx
test eax, eax
je 0x40496b
lea ecx, [ebp - 0x210]
mov ebx, eax
sub ecx, edi
movzx edx, word [edi]
cmp edx, 0x2f
jne 0x40495e
push 0x5c
pop edx
mov word [ecx + edi], dx
add edi, 2
dec ebx
jne 0x404953
push 2
pop ebx
add eax, eax
cmp eax, 0x208
jae 0x404c2f
xor ecx, ecx
mov word [ebp + eax - 0x210], cx
lea eax, [ebp - 0x418]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x4049f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4049af
movzx esi, si
or esi, 0x80070000
test esi, esi
jns 0x404a3a
mov eax, dword [0x40f020]
cmp eax, 0x40f020
je 0x404aa6
test byte [eax + 0x1c], 8
je 0x404aa6
cmp byte [eax + 0x19], bl
jb 0x404aa6
push esi
push 0x401ad0
call fcn.0040728f
push eax
mov eax, dword [0x40f020]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x54
jmp 0x404b5e
mov edi, 0x104
cmp eax, edi
jb 0x404a3f
mov eax, dword [0x40f020]
cmp eax, 0x40f020
je 0x404aa6
test byte [eax + 0x1c], 1
je 0x404aa6
cmp byte [eax + 0x19], bl
jb 0x404aa6
call fcn.0040728f
push eax
mov eax, dword [0x40f020]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x55
jmp 0x404bf6
mov edi, 0x104
push 0x401b04
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
jne 0x404a84
mov eax, dword [0x40f020]
cmp eax, 0x40f020
je 0x404aa6
test byte [eax + 0x1c], 1
je 0x404aa6
cmp byte [eax + 0x19], bl
jb 0x404aa6
call fcn.0040728f
push eax
mov eax, dword [0x40f020]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x56
jmp 0x404bf6
push 0xffffffffffffffff
lea eax, [ebp - 0x418]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x210]
push eax
push 1
push 0x7f
call dword [sym.imp.KERNEL32.dll_CompareStringW]
cmp eax, ebx
jne 0x404ab9
xor esi, esi
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040cb50
mov esp, ebp
pop ebp
ret
push edi
lea eax, [ebp - 0x620]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
test eax, eax
jne 0x404b6e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x404b09
mov eax, dword [0x40f020]
cmp eax, 0x40f020
je 0x404aa6
test byte [eax + 0x1c], 1
je 0x404aa6
cmp byte [eax + 0x19], bl
jb 0x404aa6
call fcn.0040728f
push eax
mov eax, dword [0x40f020]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x57
jmp 0x404bf6
test eax, eax
jg 0x404b11
mov esi, eax
jmp 0x404b1a
movzx esi, ax
or esi, 0x80070000
test esi, esi
jns 0x404baa
mov eax, dword [0x40f020]
cmp eax, 0x40f020
je 0x404aa6
test byte [eax + 0x1c], 8
je 0x404aa6
cmp byte [eax + 0x19], bl
jb 0x404aa6
push esi
push 0x401b18
call fcn.0040728f
push eax
mov eax, dword [0x40f020]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x58
mov edx, 0x401cbc
pop ecx
call fcn.00402b9a
jmp 0x404aa6
cmp eax, edi
jb 0x404baa
mov eax, dword [0x40f020]
cmp eax, 0x40f020
je 0x404aa6
test byte [eax + 0x1c], 1
je 0x404aa6
cmp byte [eax + 0x19], bl
jb 0x404aa6
call fcn.0040728f
push eax
mov eax, dword [0x40f020]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x59
jmp 0x404bf6
push 0x401b04
lea eax, [ebp - 0x620]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
jne 0x404c06
mov eax, dword [0x40f020]
cmp eax, 0x40f020
je 0x404aa6
test byte [eax + 0x1c], 1
je 0x404aa6
cmp byte [eax + 0x19], bl
jb 0x404aa6
call fcn.0040728f
push eax
mov eax, dword [0x40f020]
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x5a
mov edx, 0x401cbc
pop ecx
call fcn.0040730c
jmp 0x404aa6
push 0xffffffffffffffff
lea eax, [ebp - 0x620]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x210]
push eax
push 1
push 0x7f
call dword [sym.imp.KERNEL32.dll_CompareStringW]
sub eax, ebx
neg eax
sbb eax, eax
and esi, eax
jmp 0x404aa6
call fcn.0040ce35
int3