Function at 0x40ca20
Capabilities:
Get common file path

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x41b7f2
push eax
mov al, byte [0x422b38]
mov cx, word [0x422b08]
mov dl, byte [0x422b24]
mov dword fs:[0], esp
sub esp, 0x20
inc al
mov byte [0x422af9], al
mov eax, dword [0x422b30]
push ebx
push ebp
push esi
mov esi, dword [0x422b18]
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.DLL_GetTempPathA]
mov word [0x422b12], ax
xor ebp, ebp
sub eax, esi
neg cx
dec dl
push ebx
push ebx
mov dword [0x422b2c], 0xc2680000
mov word [0x422b0a], cx
mov byte [0x422afd], dl
mov dword [0x422b1c], eax
call edi
mov esi, eax
cmp esi, ebx
je 0x40cbf8
mov ax, word [0x422b24]
lea ecx, [esi + 1]
imul ax, word [0x422b06]
push ecx
mov word [0x422b06], ax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov ebp, eax
push ebp
push esi
call edi
mov edx, dword [0x422b24]
mov al, byte [esp + 0x44]
and dx, word [0x422b02]
mov byte [esp + 0x10], al
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
mov word [0x422b10], 0xfffe
mov byte [0x422af8], 1
mov word [0x422b08], dx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x14]
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x40cb3f
mov edi, dword [esp + 0x14]
mov ecx, ebx
mov edx, ecx
mov esi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
xor esi, esi
cmp word [0x422b02], si
mov dword [esp + 0x38], esi
je 0x40cb61
mov eax, dword [0x422b20]
mov dword [0x422b2c], 1
cmp eax, esi
jne 0x40cb67
mov dword [0x422b2c], esi
push ebp
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov eax, dword [esp + 0x48]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x28]
push ecx
push edx
call fcn.0040cc30
add esp, 0x10
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [esp + 0x38], 1
mov edx, dword [ecx]
mov ecx, dword [esp + 0x40]
push edx
push esi
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov eax, dword [esp + 0x24]
cmp eax, esi
je 0x40cbc3
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x40cbba
cmp al, 0xff
je 0x40cbba
dec al
mov byte [ecx], al
jmp 0x40cbc3
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov al, byte [0x422b0c]
mov ecx, dword [esp + 0x14]
inc al
cmp ecx, esi
mov byte [0x422afd], al
mov ebp, 1
je 0x40cbf8
mov al, byte [ecx - 1]
test al, al
je 0x40cbee
cmp al, 0xff
je 0x40cbee
dec al
mov byte [ecx - 1], al
jmp 0x40cbf8
dec ecx
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
movsx ecx, byte [0x422af9]
or ecx, 0x8d4fffff
pop edi
mov dword [0x422b1c], ecx
mov ecx, dword [esp + 0x2c]
mov eax, ebp
pop esi
pop ebp
mov word [0x422b12], 0xfffe
pop ebx
mov dword fs:[0], ecx
add esp, 0x2c
ret