Function at 0x100040a0
Capabilities:
Get common file path

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x1000650c
push eax
mov al, byte [esp + 0x14]
mov dword fs:[0], esp
sub esp, 0x220
neg al
sbb eax, eax
push ebx
and al, 0xf9
push 1
add eax, 0x23
xor ebx, ebx
push eax
lea eax, [esp + 0x20]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x10004261
lea ecx, [esp + 0x18]
push 0x105
lea edx, [esp + 0x1c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
je 0x10004261
push esi
lea eax, [esp + 0x1c]
push edi
mov edi, dword [sym.imp.MSVCRT.dll_wcslen]
push eax
call edi
mov esi, dword [sym.imp.MSVCRT.dll_wcscat]
add esp, 4
cmp eax, ebx
jbe 0x10004132
cmp word [esp + eax*2 + 0x1e], 0x5c
je 0x10004132
lea ecx, [esp + 0x20]
push 0x10009200
push ecx
call esi
add esp, 8
lea edx, [esp + 0x20]
push str.Intel_
push edx
call esi
mov eax, dword [esp + 0x24c]
add esp, 8
cmp eax, ebx
je 0x10004157
push eax
lea eax, [esp + 0x24]
push eax
call esi
add esp, 8
mov cl, byte [esp + 0xf]
mov dword [esp + 0x14], ebx
mov byte [esp + 0x10], cl
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
lea edx, [esp + 0x20]
mov dword [esp + 0x234], ebx
push edx
call edi
add esp, 4
mov esi, eax
lea ecx, [esp + 0x10]
push 1
push esi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x100041b8
mov eax, dword [esp + 0x14]
cmp esi, ebx
lea ecx, [esp + 0x20]
jbe 0x100041ac
mov edx, esi
mov di, word [ecx]
add ecx, 2
mov word [eax], di
add eax, 2
dec edx
jne 0x1000419d
mov eax, dword [esp + 0x14]
mov dword [esp + 0x18], esi
mov word [eax + esi*2], bx
lea ecx, [esp + 0x10]
push ecx
call fcn.10003a70
add esp, 4
test al, al
pop edi
pop esi
je 0x1000423b
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
lea ecx, [esp + 8]
mov eax, dword [edx]
push eax
push ebx
push ecx
mov ecx, dword [esp + 0x240]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int___const___unsigned_int__unsigned_int_]
mov ecx, dword [esp + 0xc]
cmp ecx, ebx
je 0x10004223
mov al, byte [ecx - 1]
cmp al, bl
je 0x10004217
cmp al, 0xff
je 0x10004217
dec al
pop ebx
mov byte [ecx - 1], al
mov al, 1
mov ecx, dword [esp + 0x220]
mov dword fs:[0], ecx
add esp, 0x22c
ret
add ecx, 0xfffffffe
push ecx
call fcn.100061b2
add esp, 4
mov al, 1
pop ebx
mov ecx, dword [esp + 0x220]
mov dword fs:[0], ecx
add esp, 0x22c
ret
mov ecx, dword [esp + 0xc]
cmp ecx, ebx
je 0x10004261
mov al, byte [ecx - 1]
cmp al, bl
je 0x10004255
cmp al, 0xff
je 0x10004255
dec al
mov byte [ecx - 1], al
jmp 0x10004261
add ecx, 0xfffffffe
push ecx
call fcn.100061b2
add esp, 4
mov ecx, dword [esp + 0x224]
xor al, al
pop ebx
mov dword fs:[0], ecx
add esp, 0x22c
ret