Function at 0x404660
Capabilities:
Delete file
Get common file path

Disassembly:
mov eax, 0x1054
call fcn.0040cbd0
mov eax, dword [0x41a2b4]
xor eax, esp
mov dword [esp + 0x1050], eax
push ebx
push esi
push edi
push str.ExtractCabFileToFolder__
lea eax, [esp + 0x14]
push eax
call fcn.00401b20
push str.Entry
mov ecx, 2
lea ebx, [esp + 0x14]
call fcn.00401d00
add esp, 4
push 0x104
lea ecx, [esp + 0xe54]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x415e7c
lea eax, [esp + 0xe54]
call fcn.00401080
test eax, eax
jge 0x4046f8
push str.StringCchCat___FAILED_for_szExecFilePath_with__T_PATH_SEP_STR.
mov ecx, 2
lea ebx, [esp + 0x14]
call fcn.00401d00
add esp, 4
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1050]
xor ecx, esp
call fcn.00404cda
add esp, 0x1054
ret
push str.expand.exe
lea eax, [esp + 0xe54]
call fcn.00401080
test eax, eax
jge 0x404714
push str.StringCchCat___FAILED_for_szExecFilePath_with_EXPAND_EXE_FILE_NAME.
jmp 0x4046cd
mov esi, dword [esp + 0x1064]
lea eax, [esp + 0x838]
mov ecx, eax
xor edi, edi
mov edx, 0x104
sub esi, ecx
lea ecx, [ecx]
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x404750
movzx ecx, word [esi + eax]
test cx, cx
je 0x404750
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x404730
jmp 0x404754
test edx, edx
jne 0x40475c
sub eax, 2
mov edi, 0x8007007a
xor edx, edx
mov word [eax], dx
test edi, edi
jge 0x404781
push edi
push str.StringCchCopy___FAILED_for_szModulePath_with_pcszExtractToFolder.___08X_
mov ecx, 2
lea ebx, [esp + 0x18]
call fcn.00401d00
add esp, 8
jmp 0x4046de
lea eax, [esp + 0x838]
lea edx, [eax + 2]
jmp 0x404790
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404790
sub eax, edx
sar eax, 1
mov ecx, 0x5c
cmp cx, word [esp + eax*2 + 0x836]
je 0x4047cb
push 0x415e7c
lea eax, [esp + 0x83c]
call fcn.00401080
test eax, eax
jge 0x4047cb
push eax
push str.StringCchCat___FAILED_for_szModulePath_with__T_PATH_SEP_STR.___08X_
jmp 0x40476b
lea eax, [esp + 0x630]
mov esi, 0x418190
mov ecx, eax
xor edi, edi
mov edx, 0x104
sub esi, ecx
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x404802
movzx ecx, word [esi + eax]
test cx, cx
je 0x404802
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x4047e2
jmp 0x404806
test edx, edx
jne 0x40480e
sub eax, 2
mov edi, 0x8007007a
xor edx, edx
mov word [eax], dx
test edi, edi
jge 0x404822
push edi
push str.StringCchCopy___FAILED_for_szExecCommand_with_expand.exe.___08X_
jmp 0x40476b
push str.init.cab
lea eax, [esp + 0x83c]
push eax
push 0x415e90
mov ecx, 0x104
lea ebx, [esp + 0xc54]
call fcn.00401440
add esp, 0xc
test eax, eax
jge 0x404857
push eax
push str.StringCchPrintf___FAILED_for_szFilePath_with_INIT_CAB_FILE_NAME.___08X_
jmp 0x40476b
lea ecx, [esp + 0xc48]
push 0
push ecx
call fcn.00405a8d
add esp, 8
test eax, eax
je 0x40487f
lea edx, [esp + 0xc48]
push edx
push str._taccess___FAILED_for__s_.
jmp 0x40476b
lea eax, [esp + 0xc48]
push eax
lea eax, [esp + 0x634]
call fcn.00401080
test eax, eax
jge 0x4048a2
push eax
push str.StringCchCat___FAILED_for_szExecCommand_with_szFilePath_for_INIT_CAB_FILE_NAME.___08X_
jmp 0x40476b
push str.___F:__
lea eax, [esp + 0x634]
call fcn.00401080
test eax, eax
jge 0x4048c2
push eax
push str.StringCchCat___FAILED_for_szExecCommand_with__F:_for_INIT_CAB_FILE_NAME.___08X_
jmp 0x40476b
lea eax, [esp + 0xa40]
lea esi, [esp + 0x838]
mov ecx, eax
xor edi, edi
mov edx, 0x104
sub esi, ecx
jmp 0x4048e0
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x404900
movzx ecx, word [esi + eax]
test cx, cx
je 0x404900
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x4048e0
jmp 0x404904
test edx, edx
jne 0x40490c
sub eax, 2
mov edi, 0x8007007a
xor edx, edx
mov word [eax], dx
test edi, edi
jge 0x404920
push edi
push str.StringCchCopy___FAILED_for_szTempPath_with_test_for_szModulePath.___08X_
jmp 0x40476b
lea eax, [esp + 0xa40]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404930
sub eax, edx
sar eax, 1
lea eax, [esp + eax*2 + 0xa3e]
mov ecx, 0x5c
cmp cx, word [eax]
jne 0x404955
xor edx, edx
mov word [eax], dx
lea eax, [esp + 0xa40]
push eax
lea eax, [esp + 0x634]
call fcn.00401080
test eax, eax
jge 0x404978
push eax
push str.StringCchCat___FAILED_for_szExecCommand_with_szTempPath_for_INIT_CAB_FILE_NAME.__08X_
jmp 0x40476b
push 0x418190
lea eax, [esp + 0x634]
call fcn.00401080
test eax, eax
jge 0x404998
push eax
push str.StringCchCat___FAILED_for_szSqlQuery_with_double_quote_for_INIT_CAB_FILE_NAME.__08X_
jmp 0x40476b
lea ecx, [esp + 0x630]
push ecx
lea edx, [esp + 0xe54]
push edx
call fcn.00401970
add esp, 8
test al, al
jne 0x4049df
lea eax, [esp + 0x630]
push eax
lea ecx, [esp + 0xe54]
push ecx
push str.PsExecFile___FAILED_for_exepath__s___arg__s_.
mov ecx, 2
lea ebx, [esp + 0x1c]
call fcn.00401d00
add esp, 0xc
jmp 0x4046de
lea edx, [esp + 0xc48]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push str.Finished.
mov ecx, 2
lea ebx, [esp + 0x14]
call fcn.00401d00
mov ecx, dword [esp + 0x1060]
add esp, 4
pop edi
pop esi
pop ebx
xor ecx, esp
mov al, 1
call fcn.00404cda
add esp, 0x1054
ret