Function at 0x40ae60
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea ecx, [ebp - 0x41c]
push ebx
sub esp, 0x420
mov dword [esp], ecx
mov dword [esp + 4], 0x104
call dword [sym.imp.kernel32.dll_GetSystemDirectoryW]
xor eax, eax
lea edx, [ebp - 0x214]
lea ecx, [ebp - 0x41c]
sub esp, 8
lea esi, [esi]
movzx ebx, word [ecx + eax]
mov word [edx + eax], bx
add eax, 2
test bx, bx
jne 0x40ae98
cmp word [ebp - 0x214], 0
mov ebx, edx
je 0x40aec1
lea esi, [esi]
add ebx, 2
cmp word [ebx], 0
jne 0x40aeb8
xor eax, eax
lea esi, [esi]
nop
movzx esi, word [eax + str.kernel32.dll]
mov word [ebx + eax], si
add eax, 2
test si, si
jne 0x40aec8
mov dword [esp], edx
mov esi, dword [sym.imp.oleaut32.dll_SysAllocString]
call esi
lea edx, [ebp - 0x420]
mov edi, eax
mov eax, dword [0x448004]
sub esp, 4
mov ebx, dword [eax]
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [ebx + 0x84]
sub esp, 0xc
mov ebx, eax
call fcn.00416600
mov dword [eax], 0x41b595
mov dword [eax + 4], 0x1b0
xor eax, eax
test ebx, ebx
sete al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.Unexpected_hr__lx._n
call fcn.004077c0
call fcn.00416600
mov dword [eax], 0x41b595
mov ebx, dword [ebp - 0x420]
mov dword [eax + 4], 0x1b1
test ebx, ebx
je 0x40b230
mov eax, ebx
shr eax, 0x10
je 0x40b1b8
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x40b208
mov eax, ebx
call fcn.00406dc0
mov ebx, dword [ebp - 0x420]
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], str.got__s_n
cmp word [ebx], 0
setne al
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x420]
mov ebx, dword [sym.imp.oleaut32.dll_SysFreeString]
mov dword [esp], eax
call ebx
sub esp, 4
mov dword [esp], edi
call ebx
xor eax, eax
lea edx, [ebp - 0x214]
lea ecx, [ebp - 0x41c]
sub esp, 4
lea esi, [esi]
lea esi, [esi]
movzx edi, word [ecx + eax]
mov word [edx + eax], di
add eax, 2
test di, di
jne 0x40afe0
cmp word [ebp - 0x214], 0
mov ecx, edx
je 0x40b009
lea esi, [esi]
add ecx, 2
cmp word [ecx], 0
jne 0x40b000
xor eax, eax
lea esi, [esi]
nop
movzx edi, word [eax + str.kernel33.dll]
mov word [ecx + eax], di
add eax, 2
test di, di
jne 0x40b010
mov dword [esp], edx
call esi
lea ecx, [ebp - 0x420]
mov dword [ebp - 0x420], 0xdeadbeef
mov esi, eax
mov eax, dword [0x448004]
sub esp, 4
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [edx + 0x84]
sub esp, 0xc
mov edi, eax
call fcn.00416600
mov dword [eax], 0x41b595
mov dword [eax + 4], 0x1bb
mov eax, dword [0x448050]
test eax, eax
jne 0x40b108
test edi, edi
je 0x40b1e0
cmp edi, 0x80070002
je 0x40b0a8
mov dword [esp + 8], edi
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], 0
call fcn.004077c0
jmp 0x40b0c4
mov dword [esp + 8], 0x80070002
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], 1
call fcn.004077c0
mov eax, 0x1c2
call fcn.00406da0
mov eax, dword [ebp - 0x420]
mov dword [esp + 4], str.got__p_n
cmp eax, 0xdeadbeef
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004077c0
mov dword [esp], esi
call ebx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp edi, 0x80070002
je 0x40b0a8
mov dword [esp + 8], edi
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], 0
call fcn.004077c0
test edi, edi
jne 0x40b0c4
mov eax, 0x1be
call fcn.00406da0
mov edi, dword [ebp - 0x420]
test edi, edi
je 0x40b25e
mov eax, edi
shr eax, 0x10
je 0x40b240
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x40b220
mov eax, edi
call fcn.00406dc0
mov edi, dword [ebp - 0x420]
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], str.got__s_n
cmp word [edi], 0
sete al
mov dword [esp], eax
call fcn.004077c0
mov eax, dword [ebp - 0x420]
mov dword [esp], eax
call ebx
sub esp, 4
mov dword [esp], esi
call ebx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
movzx ebx, bx
mov dword [esp], str._04x
mov dword [esp + 4], ebx
call fcn.00406a40
mov ebx, dword [ebp - 0x420]
jmp 0x40af8f
mov dword [esp + 8], 0
mov dword [esp + 4], str.Unexpected_hr__lx._n
mov dword [esp], 1
call fcn.004077c0
jmp 0x40b12c
mov ebx, dword [ebp - 0x420]
mov eax, str._invalid_
jmp 0x40af8f
mov edi, dword [ebp - 0x420]
mov eax, str._invalid_
jmp 0x40b178
mov eax, str._null_
jmp 0x40af8f
movzx edi, di
mov dword [esp], str._04x
mov dword [esp + 4], edi
call fcn.00406a40
mov edi, dword [ebp - 0x420]
jmp 0x40b178
mov eax, str._null_
jmp 0x40b178