Function at 0x40a340
Capabilities:
Delete file
Move file
Set thread local storage value

Disassembly:
push 0xffffffffffffffff
push 0x442f2b
mov eax, dword fs:[0]
push eax
sub esp, 0x330
mov eax, dword [0x4513e0]
xor eax, esp
mov dword [esp + 0x328], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4513e0]
xor eax, esp
push eax
lea eax, [esp + 0x344]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x354]
lea eax, [esp + 0xc0]
mov esi, ecx
push eax
push ebp
mov ecx, 0x44724c
mov dword [esp + 0x20], esi
call fcn.00408280
xor ebx, ebx
lea eax, [esp + 0xc0]
mov dword [esp + 0x34c], ebx
call fcn.004275c0
lea ecx, [esp + 0xa4]
push ecx
push ebp
mov ecx, str.source
call fcn.00408280
lea edx, [esp + 0x88]
push edx
push ebp
mov ecx, str.destination
mov byte [esp + 0x354], 1
call fcn.00408280
lea eax, [esp + 0xdc]
push eax
push ebp
mov ecx, str.mode
mov byte [esp + 0x354], 2
call fcn.00408280
lea eax, [esp + 0xdc]
mov byte [esp + 0x34c], 3
call fcn.004275c0
lea ecx, [esp + 0xf8]
push ecx
push ebp
mov ecx, str.decompress
call fcn.00408280
lea eax, [esp + 0xf8]
mov byte [esp + 0x34c], 4
call fcn.004275c0
mov eax, dword [esp + 0xd4]
push str.copy
mov edi, 4
lea ecx, [esp + 0xc4]
call fcn.00404360
test eax, eax
je 0x40a47a
mov eax, dword [esp + 0xd4]
push str.copyonly
mov edi, 8
lea ecx, [esp + 0xc4]
call fcn.00404360
test eax, eax
mov byte [esp + 0x16], bl
jne 0x40a47f
mov byte [esp + 0x16], 1
mov eax, dword [esp + 0xd4]
push str.deleteoninstall
mov edi, 0xf
lea ecx, [esp + 0xc4]
call fcn.00404360
test eax, eax
mov eax, dword [ebp + 4]
push eax
push str.File
sete byte [esp + 0x1f]
push str.__s____d_
push 0x4524d8
xor eax, eax
call fcn.0041eee0
add dword [0x4524f8], 1
push ebx
call fcn.004237c0
add esp, 0x14
cmp byte [esp + 0x16], bl
je 0x40a88a
mov eax, dword [esp + 0xf0]
push str.ifnewer
mov edi, 7
lea ecx, [esp + 0xe0]
call fcn.00404360
test eax, eax
jne 0x40a4ff
mov esi, 1
jmp 0x40a528
mov eax, dword [esp + 0xf0]
push str.ifnotexists
mov edi, 0xb
lea ecx, [esp + 0xe0]
call fcn.00404360
mov esi, eax
neg esi
sbb esi, esi
and esi, 0xfffffffe
add esi, 2
mov eax, dword [esp + 0xc4]
mov edi, 8
cmp dword [esp + 0xd8], edi
jae 0x40a544
lea eax, [esp + 0xc4]
push eax
push str.Operation___s
push 0x4524d8
xor eax, eax
call fcn.0041eee0
mov eax, dword [esp + 0x98]
add esp, 0xc
cmp dword [esp + 0xa0], edi
jae 0x40a570
lea eax, [esp + 0x8c]
push eax
push str.Destination___s
push 0x4524d8
xor eax, eax
call fcn.0041eee0
mov eax, dword [esp + 0xb4]
add esp, 0xc
cmp dword [esp + 0xbc], edi
jae 0x40a59c
lea eax, [esp + 0xa8]
push str..cab
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
push eax
call fcn.0042a42f
add esp, 8
test eax, eax
jne 0x40a775
mov eax, dword [esp + 0x10c]
push 0x4471b4
mov edi, 3
lea ecx, [esp + 0xfc]
call fcn.00404360
test eax, eax
jne 0x40a775
cmp dword [esp + 0xbc], 8
mov ebx, dword [esp + 0xa8]
jae 0x40a5f6
lea ebx, [esp + 0xa8]
mov ecx, 0xbb8
call fcn.00425dd0
mov eax, dword [esp + 0xa8]
mov ebx, 8
cmp dword [esp + 0xbc], ebx
jae 0x40a61c
lea eax, [esp + 0xa8]
push eax
push str.Decompressing__s_to_destination
push 0x4524d8
xor eax, eax
call fcn.0041eee0
mov eax, dword [0x453b70]
add esp, 0xc
lea edx, [esp + 0x114]
push edx
push eax
xor edi, edi
mov dword [esp + method.CCabinetExtractBase.virtual_0], vtable.CCabinetExtractBase.0
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [esp + 0x118], edi
mov byte [esp + 0x128], 0
mov dword [esp + method.CCabinetExtractBase.virtual_0], 0x44973c
mov byte [esp + 0x34c], 5
cmp dword [esp + 0xbc], ebx
mov ecx, dword [esp + 0xa8]
jae 0x40a68b
lea ecx, [esp + 0xa8]
lea esi, [esp + 0x114]
call fcn.00401480
mov esi, eax
test esi, esi
jne 0x40a6c3
cmp dword [esp + 0xa0], ebx
mov eax, dword [esp + 0x8c]
jae 0x40a6b4
lea eax, [esp + 0x8c]
push eax
lea esi, [esp + 0x118]
call fcn.00401370
mov esi, eax
mov ecx, dword [esp + 0x118]
push ecx
call sub.Cabinet.dll_FDIDestroy
xor eax, eax
add esp, 4
test esi, esi
mov dword [esp + 0x118], eax
je 0x40a704
push esi
push str.Error_during_decompressing__d
push 0x4524d8
mov eax, 2
call fcn.0041eee0
mov eax, dword [esp + 0x124]
add esp, 0xc
mov edi, 0x10a
test eax, eax
mov byte [esp + 0x34c], 4
mov dword [esp + method.CCabinetExtractBase.virtual_0], vtable.CCabinetExtractBase.0
je 0x40a724
push eax
call sub.Cabinet.dll_FDIDestroy
add esp, 4
xor ebx, ebx
cmp edi, ebx
je 0x40a960
mov esi, dword [esp + 0x18]
mov al, byte [esi + 0x3d]
mov cl, al
neg cl
sbb ecx, ecx
not ecx
and ecx, edi
cmp al, bl
mov dword [esi + 0x38], ecx
jne 0x40a960
xor ecx, ecx
cmp edi, 2
setne cl
push 0x7f01
push 1
push 0x80
push 0x7da
xor edx, edx
add ecx, 0x39
call fcn.004242b0
add esp, 0x10
jmp 0x40a960
lea edx, [esp + 0x40]
push edx
push ebp
mov ecx, 0x447160
call fcn.00408280
mov edi, eax
lea eax, [esp + 0x1c]
push eax
push ebp
mov ecx, 0x447238
mov byte [esp + 0x354], 6
call fcn.00408280
mov byte [esp + 0x34c], 7
cmp dword [edi + 0x18], 8
jb 0x40a7b6
mov ecx, dword [edi + 4]
mov dword [esp + 0x38], ecx
jmp 0x40a7bd
add edi, 4
mov dword [esp + 0x38], edi
cmp dword [eax + 0x18], 8
jb 0x40a7cc
mov edx, dword [eax + 4]
mov dword [esp + 0x3c], edx
jmp 0x40a7d3
add eax, 4
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0xd4]
push str.copy
mov edi, 4
lea ecx, [esp + 0xc4]
call fcn.00404360
mov edx, dword [esp + 0x8c]
test eax, eax
sete cl
cmp dword [esp + 0xa0], 8
jae 0x40a80d
lea edx, [esp + 0x8c]
cmp dword [esp + 0xbc], 8
mov eax, dword [esp + 0xa8]
jae 0x40a825
lea eax, [esp + 0xa8]
mov edi, dword [esp + 0x3c]
push edi
movzx ecx, cl
push ecx
mov ecx, dword [esp + 0x20]
push esi
push edx
mov edx, dword [esp + 0x48]
push eax
call fcn.00411800
cmp dword [esp + 0x34], 8
mov edi, eax
jb 0x40a854
mov edx, dword [esp + 0x20]
push edx
call fcn.00429d64
add esp, 4
mov byte [esp + 0x34c], 4
cmp dword [esp + 0x58], 8
mov dword [esp + 0x34], 7
mov dword [esp + 0x30], ebx
mov word [esp + 0x20], bx
jb 0x40a726
mov eax, dword [esp + 0x44]
push eax
call fcn.00429d64
add esp, 4
jmp 0x40a726
cmp byte [esp + 0x17], bl
je 0x40ad7a
mov eax, dword [esp + 0x8c]
mov edi, 8
cmp dword [esp + 0xa0], edi
jae 0x40a8b0
lea eax, [esp + 0x8c]
push eax
push str.Deleting_file:__s
push 0x4524d8
xor eax, eax
call fcn.0041eee0
mov ebx, dword [esp + 0x98]
add esp, 0xc
cmp dword [esp + 0xa0], edi
jae 0x40a8dc
lea ebx, [esp + 0x8c]
mov ecx, 0xbbe
call fcn.00425dd0
cmp byte [esi + 0x3c], 0
jne 0x40a95e
cmp dword [esp + 0xa0], edi
mov eax, dword [esp + 0x8c]
jae 0x40a903
lea eax, [esp + 0x8c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40a95e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 5
jne 0x40ad38
push eax
push str.__File_locked__marked_for_delete_on_next_reboot__Error__0x_X_
push 0x4524d8
xor eax, eax
call fcn.0041eee0
mov eax, dword [esp + 0x98]
add esp, 0xc
cmp dword [esp + 0xa0], 8
jae 0x40a94c
lea eax, [esp + 0x8c]
push 4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [esi + 0x34], 1
xor ebx, ebx
push 1
call fcn.004237c0
mov eax, dword [esp + 0xd8]
add esp, 4
push str.deleteonuninstall
mov edi, 0x11
lea ecx, [esp + 0xc4]
call fcn.00404360
test eax, eax
jne 0x40ac18
mov eax, dword [esp + 0x18]
cmp byte [eax + 0x3c], bl
jne 0x40ac18
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov byte [esp + 0x34c], 8
push 5
push 0x447530
lea esi, [esp + 0x24]
mov dword [esp + 0x3c], 7
mov dword [esp + 0x38], ebx
mov word [esp + 0x28], bx
call fcn.004035b0
lea ecx, [esp + 0x88]
push ecx
mov edx, esi
push edx
lea edi, [esp + 0x48]
mov byte [esp + 0x354], 9
call fcn.0041a110
add esp, 8
push eax
lea esi, [esp + 0x60]
mov byte [esp + 0x350], 0xa
call fcn.004159f0
cmp dword [esp + 0x58], 8
jb 0x40aa16
mov eax, dword [esp + 0x44]
push eax
call fcn.00429d64
add esp, 4
mov byte [esp + 0x34c], 8
cmp dword [esp + 0x34], 8
mov dword [esp + 0x58], 7
mov dword [esp + 0x54], ebx
mov word [esp + 0x44], bx
jb 0x40aa43
mov ecx, dword [esp + 0x20]
push ecx
call fcn.00429d64
add esp, 4
lea edx, [esp + 0x6c]
push edx
push ebp
mov ecx, 0x447238
call fcn.00408280
mov edi, eax
mov byte [esp + 0x34c], 0xb
push 0xa
push str.usequence
lea esi, [esp + 0x24]
mov dword [esp + 0x3c], 7
mov dword [esp + 0x38], ebx
mov word [esp + 0x28], bx
call fcn.004035b0
push edi
mov eax, esi
push eax
lea edi, [esp + 0x48]
mov byte [esp + 0x354], 0xc
call fcn.0041a110
add esp, 8
push eax
lea esi, [esp + 0x60]
mov byte [esp + 0x350], 0xd
call fcn.004159f0
cmp dword [esp + 0x58], 8
jb 0x40aabc
mov ecx, dword [esp + 0x44]
push ecx
call fcn.00429d64
add esp, 4
mov esi, 8
cmp dword [esp + 0x34], esi
mov edi, 7
mov dword [esp + 0x58], edi
mov dword [esp + 0x54], ebx
mov word [esp + 0x44], bx
jb 0x40aae6
mov edx, dword [esp + 0x20]
push edx
call fcn.00429d64
add esp, 4
mov byte [esp + 0x34c], 8
cmp dword [esp + 0x84], esi
mov dword [esp + 0x34], edi
mov dword [esp + 0x30], ebx
mov word [esp + 0x20], bx
jb 0x40ab11
mov eax, dword [esp + 0x70]
push eax
call fcn.00429d64
add esp, 4
lea ecx, [esp + 0x6c]
push ecx
push ebp
mov ecx, 0x447160
call fcn.00408280
mov edi, eax
mov byte [esp + 0x34c], 0xe
push 6
push str.group
lea esi, [esp + 0x24]
mov dword [esp + 0x3c], 7
mov dword [esp + 0x38], ebx
mov word [esp + 0x28], bx
call fcn.004035b0
push edi
mov edx, esi
push edx
lea edi, [esp + 0x48]
mov byte [esp + 0x354], 0xf
call fcn.0041a110
add esp, 8
push eax
lea esi, [esp + 0x60]
mov byte [esp + 0x350], 0x10
call fcn.004159f0
cmp dword [esp + 0x58], 8
jb 0x40ab8a
mov eax, dword [esp + 0x44]
push eax
call fcn.00429d64
add esp, 4
mov esi, 8
cmp dword [esp + 0x34], esi
mov edi, 7
mov dword [esp + 0x58], edi
mov dword [esp + 0x54], ebx
mov word [esp + 0x44], bx
jb 0x40abb4
mov ecx, dword [esp + 0x20]
push ecx
call fcn.00429d64
add esp, 4
mov byte [esp + 0x34c], 8
cmp dword [esp + 0x84], esi
mov dword [esp + 0x34], edi
mov dword [esp + 0x30], ebx
mov word [esp + 0x20], bx
jb 0x40abdf
mov edx, dword [esp + 0x70]
push edx
call fcn.00429d64
add esp, 4
mov eax, dword [esp + 0x18]
push str.File
push eax
lea ecx, [esp + 0x64]
call fcn.00411eb0
mov eax, dword [esp + 0x60]
cmp eax, ebx
je 0x40ac18
mov ecx, dword [esp + 0x38]
mov edi, dword [esp + 0x64]
push ecx
call fcn.0041b220
mov edx, dword [esp + 0x64]
add esp, 4
push edx
call fcn.00429d64
add esp, 4
sub dword [0x4524f8], 1
mov eax, dword [esp + 0x18]
cmp dword [eax + 0x38], ebx
mov esi, 8
sete byte [esp + 0x16]
cmp dword [esp + 0x110], esi
jb 0x40ac49
mov ecx, dword [esp + 0xfc]
push ecx
call fcn.00429d64
add esp, 4
cmp dword [esp + 0xf4], esi
mov edi, 7
mov dword [esp + 0x110], edi
mov dword [esp + 0x10c], ebx
mov word [esp + 0xfc], bx
jb 0x40ac7d
mov edx, dword [esp + 0xe0]
push edx
call fcn.00429d64
add esp, 4
cmp dword [esp + 0xa0], esi
mov dword [esp + 0xf4], edi
mov dword [esp + 0xf0], ebx
mov word [esp + 0xe0], bx
jb 0x40acac
mov eax, dword [esp + 0x8c]
push eax
call fcn.00429d64
add esp, 4
cmp dword [esp + 0xbc], esi
mov dword [esp + 0xa0], edi
mov dword [esp + 0x9c], ebx
mov word [esp + 0x8c], bx
jb 0x40acdb
mov ecx, dword [esp + 0xa8]
push ecx
call fcn.00429d64
add esp, 4
cmp dword [esp + 0xd8], esi
mov dword [esp + 0xbc], edi
mov dword [esp + 0xb8], ebx
mov word [esp + 0xa8], bx
jb 0x40ad0a
mov edx, dword [esp + 0xc4]
push edx
call fcn.00429d64
add esp, 4
mov al, byte [esp + 0x16]
mov ecx, dword [esp + 0x344]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x328]
xor ecx, esp
call fcn.004289ca
add esp, 0x33c
ret 4
push edi
push str.__Delete_error_0x_X
push 0x4524d8
mov eax, 2
call fcn.0041eee0
mov al, byte [esi + 0x3d]
mov dl, al
add esp, 0xc
neg dl
sbb edx, edx
not edx
and edx, edi
test al, al
mov dword [esi + 0x38], edx
jne 0x40a95e
push 0x9ee
call fcn.00424280
add esp, 4
jmp 0x40a95e
mov eax, dword [esp + 0xd4]
push str.deleteonuninstall
mov edi, 0x11
lea ecx, [esp + 0xc4]
call fcn.00404360
test eax, eax
jne 0x40a960
cmp dword [esp + 0xa0], 8
mov eax, dword [esp + 0x8c]
jae 0x40adb7
lea eax, [esp + 0x8c]
push eax
push str.Marking__s_for_delete_during_uninstallation
push 0x4524d8
xor eax, eax
call fcn.0041eee0
add esp, 0xc
jmp 0x40a960