Function at 0x40ba40
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x472b77
mov eax, dword fs:[0]
push eax
sub esp, 0x224
mov eax, dword [0x49b7f0]
xor eax, esp
mov dword [esp + 0x21c], eax
mov eax, dword [0x49b7f0]
xor eax, esp
push eax
lea eax, [esp + 0x228]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ecx, dword [esi]
mov dword [esp + 0xc], eax
mov eax, dword [ecx - 0xc]
test eax, eax
push str.DeleteBinAndMediaFolders
jne 0x40baa2
push str._s___Cannot_cleanup_Media_folder._Brand_backend_name_is_empty_
push eax
push 0xcb
jmp 0x40bc04
push str._s___Begin_of_Media_folder_cleanup
push 0
push 0xcf
push str.Utils::DeleteBinAndMediaFolders
call fcn.004306a0
add esp, 0x14
push 0x206
lea edx, [esp + 0x1a]
push 0
push edx
mov word [esp + 0x20], 0
call fcn.004557d0
add esp, 0xc
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x40bb10
push str.DeleteBinAndMediaFolders
push str._s___Error_while_trying_to_get_path_to__appdata_
push 0
push 0xd3
push str.Utils::DeleteBinAndMediaFolders
call fcn.004306a0
add esp, 0x14
jmp 0x40bbf3
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 8]
call fcn.004028f0
push 0x4838c4
lea ecx, [esp + 0xc]
mov dword [esp + 0x234], 0
call fcn.004028f0
push esi
push eax
lea edx, [esp + 0x18]
push edx
mov byte [esp + 0x23c], 1
call fcn.00408b10
add esp, 0xc
mov byte [esp + 0x230], 2
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0xc]
call fcn.00408f00
mov byte [esp + 0x230], 1
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bb8e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x230], 0
mov eax, dword [esp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bbb6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0xc]
push ecx
lea edx, [esp + 8]
push edx
call fcn.0040c2e0
mov dword [esp + 0x238], 0xffffffff
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
add esp, 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bbf3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str.DeleteBinAndMediaFolders
push str._s___End_of_Media_folder_cleanup
push 0
push 0xdd
push str.Utils::DeleteBinAndMediaFolders
call fcn.004306a0
mov ecx, dword [edi]
add esp, 0x14
cmp dword [ecx - 0xc], 0
push str.DeleteBinAndMediaFolders
jne 0x40bc3c
push str._s___Cannot_cleanup_bin_folder._Installation_path_is_empty_
push 0
push 0xe3
push str.Utils::DeleteBinAndMediaFolders
call fcn.004306a0
add esp, 0x14
jmp 0x40bd30
push str._s___Begin_of_Installation_folder_cleanup
push 0
push 0xe7
push str.Utils::DeleteBinAndMediaFolders
call fcn.004306a0
mov eax, dword [edi]
sub eax, 0x10
add esp, 0x14
push eax
call fcn.0040a7a0
add eax, 0x10
add esp, 4
mov dword [esp + 4], eax
lea edx, [esp + 4]
push edx
mov dword [esp + 0x234], 3
call fcn.004125f0
push str._bin
lea ecx, [esp + 0xc]
call fcn.004028f0
mov byte [esp + 0x230], 4
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0xc]
call fcn.00408f00
mov byte [esp + 0x230], 3
mov eax, dword [esp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bccd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40bcda
add eax, 0x10
jmp 0x40bcdc
xor eax, eax
push eax
lea ecx, [esp + 8]
push ecx
call fcn.0040c2e0
push str.DeleteBinAndMediaFolders
push str._s___End_of_Installation_folder_cleanup
push 0
push 0xf3
push str.Utils::DeleteBinAndMediaFolders
call fcn.004306a0
mov dword [esp + 0x24c], 0xffffffff
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
add esp, 0x1c
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40bd30
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x228]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [esp + 0x21c]
xor ecx, esp
call fcn.004511c3
mov esp, ebp
pop ebp
ret