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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4514f9
mov eax, dword fs:[0]
push eax
sub esp, 0x330
mov eax, dword [0x468738]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x68]
push edx
mov edx, 0x458748
mov dword [ebp - 0x324], eax
mov dword [ebp - 0x328], ecx
call fcn.00410e40
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x54]
mov esi, dword [ebp - 0x68]
mov edi, esi
cmp eax, 8
jae 0x41396d
lea edi, [ebp - 0x68]
mov ebx, edi
mov ecx, dword [ebp - 0x58]
lea ebx, [ebx + ecx*2]
cmp eax, 8
jae 0x413806
lea esi, [ebp - 0x68]
cmp esi, ebx
je 0x413827
sub edi, esi
lea esp, [esp]
movzx edx, word [esi]
push edx
call fcn.004394a0
mov word [edi + esi], ax
add esi, 2
add esp, 4
cmp esi, ebx
jne 0x413810
mov edi, dword [ebp - 0x328]
lea eax, [ebp - 0xa0]
push eax
mov edx, str.source
mov ecx, edi
call fcn.00410e40
lea ecx, [ebp - 0x4c]
push ecx
mov edx, str.destination
mov ecx, edi
mov byte [ebp - 4], 1
call fcn.00410e40
lea edx, [ebp - 0xbc]
push edx
mov edx, 0x458784
mov ecx, edi
mov byte [ebp - 4], 2
call fcn.00410e40
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0xa8]
mov esi, dword [ebp - 0xbc]
mov ecx, esi
cmp eax, 8
jae 0x413974
lea ecx, [ebp - 0xbc]
mov ebx, ecx
mov edx, dword [ebp - 0xac]
lea ebx, [ebx + edx*2]
cmp eax, 8
jae 0x4138a2
lea esi, [ebp - 0xbc]
cmp esi, ebx
je 0x4138cd
mov edi, ecx
sub edi, esi
lea ebx, [ebx]
movzx eax, word [esi]
push eax
call fcn.004394a0
mov word [edi + esi], ax
add esi, 2
add esp, 4
cmp esi, ebx
jne 0x4138b0
mov edi, dword [ebp - 0x328]
lea ecx, [ebp - 0xd8]
push ecx
mov edx, str.decompress
mov ecx, edi
call fcn.00410e40
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0xc4]
mov esi, dword [ebp - 0xd8]
mov edi, esi
cmp eax, 8
jae 0x41397b
lea edi, [ebp - 0xd8]
mov ecx, edi
mov edx, dword [ebp - 0xc8]
lea ebx, [ecx + edx*2]
cmp eax, 8
jae 0x413917
lea esi, [ebp - 0xd8]
cmp esi, ebx
je 0x413937
sub edi, esi
lea ecx, [ecx]
movzx eax, word [esi]
push eax
call fcn.004394a0
mov word [edi + esi], ax
add esi, 2
add esp, 4
cmp esi, ebx
jne 0x413920
mov eax, dword [ebp - 0x58]
push str.copy
mov edi, 4
lea ecx, [ebp - 0x68]
call fcn.00404ab0
test eax, eax
je 0x41397f
mov eax, dword [ebp - 0x58]
push str.copyonly
mov edi, 8
lea ecx, [ebp - 0x68]
call fcn.00404ab0
test eax, eax
je 0x41397f
xor bl, bl
jmp 0x413981
mov ebx, esi
jmp 0x4137f8
mov ebx, esi
jmp 0x41388e
mov ecx, esi
jmp 0x413903
mov bl, 1
mov eax, dword [ebp - 0x58]
push str.deleteoninstall
mov edi, 0xf
lea ecx, [ebp - 0x68]
call fcn.00404ab0
mov esi, dword [ebp - 0x328]
test eax, eax
mov eax, dword [esi + 4]
push eax
push str.File
sete byte [ebp - 0x31d]
push str.__s____d_
push 0x4699dc
xor eax, eax
call fcn.0042c820
inc dword [0x4699fc]
push 0
call fcn.00431ac0
add esp, 0x14
test bl, bl
je 0x413d19
mov eax, dword [ebp - 0xac]
push str.ifnewer
mov edi, 7
lea ecx, [ebp - 0xbc]
call fcn.00404ab0
test eax, eax
jne 0x4139fb
lea ebx, [edi - 6]
jmp 0x413a22
mov eax, dword [ebp - 0xac]
push str.ifnotexists
mov edi, 0xb
lea ecx, [ebp - 0xbc]
call fcn.00404ab0
mov ebx, eax
neg ebx
sbb ebx, ebx
and ebx, 0xfffffffe
add ebx, 2
mov eax, dword [ebp - 0x68]
mov edi, 8
cmp dword [ebp - 0x54], edi
jae 0x413a32
lea eax, [ebp - 0x68]
push eax
push str.Operation___s
push 0x4699dc
xor eax, eax
call fcn.0042c820
mov eax, dword [ebp - 0x4c]
add esp, 0xc
cmp dword [ebp - 0x38], edi
jae 0x413a52
lea eax, [ebp - 0x4c]
push eax
push str.Destination___s
push 0x4699dc
xor eax, eax
call fcn.0042c820
mov eax, dword [ebp - 0xa0]
add esp, 0xc
cmp dword [ebp - 0x8c], edi
jae 0x413a7b
lea eax, [ebp - 0xa0]
push str..cab
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
push eax
call fcn.00439375
add esp, 8
test eax, eax
jne 0x413bde
lea edi, [eax + 3]
mov eax, dword [ebp - 0xc8]
push 0x457de4
lea ecx, [ebp - 0xd8]
call fcn.00404ab0
test eax, eax
jne 0x413bde
mov edi, dword [ebp - 0xa0]
mov esi, 8
cmp dword [ebp - 0x8c], esi
jae 0x413ad2
lea edi, [ebp - 0xa0]
mov ecx, 0xbb8
call fcn.00434da0
mov eax, dword [ebp - 0xa0]
cmp dword [ebp - 0x8c], esi
jae 0x413af0
lea eax, [ebp - 0xa0]
push eax
push str.Decompressing__s_to_destination
push 0x4699dc
xor eax, eax
call fcn.0042c820
mov edx, dword [0x46adbc]
add esp, 0xc
lea ecx, [ebp - 0x31c]
push ecx
push edx
xor edi, edi
mov dword [ebp - method.CCabinetExtractBase.virtual_0], vtable.CCabinetExtractBase.0
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [ebp - 0x318], edi
mov byte [ebp - 0x308], 0
mov dword [ebp - method.CCabinetExtractBase.virtual_0], 0x45b1f0
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0xa0]
cmp dword [ebp - 0x8c], esi
jae 0x413b54
lea ecx, [ebp - 0xa0]
lea esi, [ebp - 0x31c]
call fcn.00401470
mov esi, eax
test esi, esi
jne 0x413b7f
cmp dword [ebp - 0x38], 8
mov eax, dword [ebp - 0x4c]
jae 0x413b71
lea eax, [ebp - 0x4c]
push eax
lea esi, [ebp - 0x31c]
call fcn.004013a0
mov esi, eax
mov eax, dword [ebp - 0x318]
mov ebx, dword [sym.imp.Cabinet.dll_FDIDestroy]
push eax
call ebx
xor eax, eax
add esp, 4
mov dword [ebp - 0x318], eax
test esi, esi
je 0x413bc0
push esi
push str.Error_during_decompressing__d
push 0x4699dc
mov eax, 2
call fcn.0042c820
mov eax, dword [ebp - 0x318]
add esp, 0xc
mov edi, 0x10a
mov byte [ebp - 4], 4
mov dword [ebp - method.CCabinetExtractBase.virtual_0], vtable.CCabinetExtractBase.0
test eax, eax
je 0x413cc8
push eax
call ebx
jmp 0x413cc5
lea ecx, [ebp - 0x84]
push ecx
mov edx, 0x458538
mov ecx, esi
call fcn.00410e40
mov edi, eax
lea edx, [ebp - 0x30]
push edx
mov edx, 0x458524
mov ecx, esi
mov byte [ebp - 4], 6
call fcn.00410e40
mov byte [ebp - 4], 7
cmp dword [edi + 0x14], 8
jb 0x413c1b
mov ecx, dword [edi]
mov dword [ebp - 0x32c], ecx
jmp 0x413c21
mov dword [ebp - 0x32c], edi
cmp dword [eax + 0x14], 8
jb 0x413c2b
mov esi, dword [eax]
jmp 0x413c2d
mov esi, eax
mov eax, dword [ebp - 0x58]
push str.copy
mov edi, 4
lea ecx, [ebp - 0x68]
call fcn.00404ab0
mov edx, dword [ebp - 0x4c]
test eax, eax
mov eax, 8
sete cl
cmp dword [ebp - 0x38], eax
jae 0x413c57
lea edx, [ebp - 0x4c]
cmp dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0xa0]
jae 0x413c6b
lea eax, [ebp - 0xa0]
push esi
movzx ecx, cl
push ecx
mov ecx, dword [ebp - 0x324]
push ebx
push edx
mov edx, dword [ebp - 0x32c]
push eax
call fcn.0041ba90
mov esi, 8
mov edi, eax
cmp dword [ebp - 0x1c], esi
jb 0x413c9c
mov edx, dword [ebp - 0x30]
push edx
call fcn.00438b4b
add esp, 4
xor eax, eax
mov byte [ebp - 4], 4
mov dword [ebp - 0x1c], 7
mov dword [ebp - 0x20], 0
mov word [ebp - 0x30], ax
cmp dword [ebp - 0x70], esi
jb 0x413cc8
mov ecx, dword [ebp - 0x84]
push ecx
call fcn.00438b4b
add esp, 4
test edi, edi
je 0x413e40
mov ecx, dword [ebp - 0x324]
mov al, byte [ecx + 0x41]
xor edx, edx
test al, al
setne dl
dec edx
and edx, edi
mov dword [ecx + 0x3c], edx
test al, al
jne 0x413e40
xor edx, edx
cmp edi, 2
setne dl
push 0x7f01
push 1
push 0x80
push 0x7da
xor ecx, ecx
add edx, 0x39
call fcn.00433220
add esp, 0x10
jmp 0x413e40
cmp byte [ebp - 0x31d], 0
je 0x413e06
mov eax, dword [ebp - 0x4c]
mov ebx, 8
cmp dword [ebp - 0x38], ebx
jae 0x413d36
lea eax, [ebp - 0x4c]
push eax
push str.Deleting_file:__s
push 0x4699dc
xor eax, eax
call fcn.0042c820
mov edi, dword [ebp - 0x4c]
add esp, 0xc
cmp dword [ebp - 0x38], ebx
jae 0x413d56
lea edi, [ebp - 0x4c]
mov ecx, 0xbbe
call fcn.00434da0
mov esi, dword [ebp - 0x324]
cmp byte [esi + 0x40], 0
jne 0x413e40
mov eax, dword [ebp - 0x4c]
cmp dword [ebp - 0x38], ebx
jae 0x413d7b
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x413e40
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 5
jne 0x413dcb
push eax
push str.__File_locked__marked_for_delete_on_next_reboot__Error__0x_X_
push 0x4699dc
xor eax, eax
call fcn.0042c820
mov eax, dword [ebp - 0x4c]
add esp, 0xc
cmp dword [ebp - 0x38], ebx
jae 0x413db7
lea eax, [ebp - 0x4c]
push 4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov dword [esi + 0x38], 1
jmp 0x413e40
push edi
push str.__Delete_error_0x_X
push 0x4699dc
mov eax, 2
call fcn.0042c820
mov al, byte [esi + 0x41]
xor ecx, ecx
add esp, 0xc
test al, al
setne cl
dec ecx
and ecx, edi
mov dword [esi + 0x3c], ecx
test al, al
jne 0x413e40
push 0x9ee
call fcn.004331f0
add esp, 4
jmp 0x413e40
mov eax, dword [ebp - 0x58]
push str.deleteonuninstall
mov edi, 0x11
lea ecx, [ebp - 0x68]
call fcn.00404ab0
test eax, eax
jne 0x413e40
cmp dword [ebp - 0x38], 8
mov eax, dword [ebp - 0x4c]
jae 0x413e2b
lea eax, [ebp - 0x4c]
push eax
push str.Marking__s_for_delete_during_uninstallation
push 0x4699dc
xor eax, eax
call fcn.0042c820
add esp, 0xc
push 1
call fcn.00431ac0
mov eax, dword [ebp - 0x58]
add esp, 4
push str.deleteonuninstall
mov edi, 0x11
lea ecx, [ebp - 0x68]
call fcn.00404ab0
test eax, eax
jne 0x4140da
mov edx, dword [ebp - 0x324]
cmp byte [edx + 0x40], al
jne 0x4140da
mov dword [ebp - 0x33c], eax
mov dword [ebp - 0x338], eax
mov dword [ebp - 0x334], eax
mov byte [ebp - 4], 8
mov dword [ebp - 0x20], eax
mov word [ebp - 0x30], ax
push 5
mov eax, 0x458a28
lea esi, [ebp - 0x30]
mov dword [ebp - 0x1c], 7
call fcn.004065a0
lea eax, [ebp - 0x4c]
mov ecx, esi
lea ebx, [ebp - 0x84]
mov byte [ebp - 4], 9
call fcn.00421c70
mov ecx, eax
lea ebx, [ebp - 0x33c]
mov byte [ebp - 4], 0xa
call fcn.0040d470
mov ebx, 8
cmp dword [ebp - 0x70], ebx
jb 0x413ee7
mov ecx, dword [ebp - 0x84]
push ecx
call fcn.00438b4b
add esp, 4
xor edx, edx
mov esi, 7
mov byte [ebp - 4], bl
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x74], 0
mov word [ebp - 0x84], dx
cmp dword [ebp - 0x1c], ebx
jb 0x413f13
mov eax, dword [ebp - 0x30]
push eax
call fcn.00438b4b
add esp, 4
mov edi, dword [ebp - 0x328]
lea ecx, [ebp - 0xf4]
push ecx
mov edx, 0x458524
mov ecx, edi
call fcn.00410e40
mov ebx, eax
mov byte [ebp - 4], 0xb
mov dword [ebp - 0x1c], esi
xor edx, edx
push 0xa
mov eax, str.usequence
lea esi, [ebp - 0x30]
mov dword [ebp - 0x20], 0
mov word [ebp - 0x30], dx
call fcn.004065a0
mov eax, ebx
mov ecx, esi
lea ebx, [ebp - 0x84]
mov byte [ebp - 4], 0xc
call fcn.00421cb0
mov ecx, eax
lea ebx, [ebp - 0x33c]
mov byte [ebp - 4], 0xd
call fcn.0040d470
mov ebx, 8
cmp dword [ebp - 0x70], ebx
jb 0x413f8e
mov eax, dword [ebp - 0x84]
push eax
call fcn.00438b4b
add esp, 4
xor ecx, ecx
mov esi, 7
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x74], 0
mov word [ebp - 0x84], cx
cmp dword [ebp - 0x1c], ebx
jb 0x413fb7
mov edx, dword [ebp - 0x30]
push edx
call fcn.00438b4b
add esp, 4
xor eax, eax
mov byte [ebp - 4], bl
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], 0
mov word [ebp - 0x30], ax
cmp dword [ebp - 0xe0], ebx
jb 0x413fe1
mov ecx, dword [ebp - 0xf4]
push ecx
call fcn.00438b4b
add esp, 4
lea edx, [ebp - 0xf4]
push edx
mov edx, 0x458538
mov ecx, edi
call fcn.00410e40
mov edi, eax
mov byte [ebp - 4], 0xe
xor eax, eax
mov dword [ebp - 0x1c], esi
mov word [ebp - 0x30], ax
push 6
mov eax, str.group
lea esi, [ebp - 0x30]
mov dword [ebp - 0x20], 0
call fcn.004065a0
mov eax, edi
mov ecx, esi
lea ebx, [ebp - 0x84]
mov byte [ebp - 4], 0xf
call fcn.00421cb0
mov ecx, eax
lea ebx, [ebp - 0x33c]
mov byte [ebp - 4], 0x10
call fcn.0040d470
mov ebx, 8
cmp dword [ebp - 0x70], ebx
jb 0x414056
mov ecx, dword [ebp - 0x84]
push ecx
call fcn.00438b4b
add esp, 4
xor edi, edi
xor edx, edx
mov esi, 7
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x74], edi
mov word [ebp - 0x84], dx
cmp dword [ebp - 0x1c], ebx
jb 0x41407d
mov eax, dword [ebp - 0x30]
push eax
call fcn.00438b4b
add esp, 4
xor ecx, ecx
mov byte [ebp - 4], bl
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], edi
mov word [ebp - 0x30], cx
cmp dword [ebp - 0xe0], ebx
jb 0x4140a3
mov edx, dword [ebp - 0xf4]
push edx
call fcn.00438b4b
add esp, 4
mov eax, dword [ebp - 0x324]
push eax
lea edx, [ebp - 0x33c]
mov ecx, str.File
call fcn.0041c1c0
mov esi, dword [ebp - 0x33c]
cmp esi, edi
je 0x4140da
mov edi, dword [ebp - 0x338]
mov eax, esi
call fcn.0040d660
push esi
call fcn.00438b4b
add esp, 4
dec dword [0x4699fc]
mov ecx, dword [ebp - 0x324]
xor ebx, ebx
cmp dword [ecx + 0x3c], ebx
mov esi, 8
sete byte [ebp - 0x31d]
cmp dword [ebp - 0xc4], esi
jb 0x41410e
mov edx, dword [ebp - 0xd8]
push edx
call fcn.00438b4b
add esp, 4
xor eax, eax
mov edi, 7
mov dword [ebp - 0xc4], edi
mov dword [ebp - 0xc8], ebx
mov word [ebp - 0xd8], ax
cmp dword [ebp - 0xa8], esi
jb 0x41413f
mov ecx, dword [ebp - 0xbc]
push ecx
call fcn.00438b4b
add esp, 4
xor edx, edx
mov dword [ebp - 0xa8], edi
mov dword [ebp - 0xac], ebx
mov word [ebp - 0xbc], dx
cmp dword [ebp - 0x38], esi
jb 0x414165
mov eax, dword [ebp - 0x4c]
push eax
call fcn.00438b4b
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x3c], ebx
mov word [ebp - 0x4c], cx
cmp dword [ebp - 0x8c], esi
jb 0x414188
mov edx, dword [ebp - 0xa0]
push edx
call fcn.00438b4b
add esp, 4
xor eax, eax
mov dword [ebp - 0x8c], edi
mov dword [ebp - 0x90], ebx
mov word [ebp - 0xa0], ax
cmp dword [ebp - 0x54], esi
jb 0x4141ae
mov ecx, dword [ebp - 0x68]
push ecx
call fcn.00438b4b
add esp, 4
mov al, byte [ebp - 0x31d]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004377c1
mov esp, ebp
pop ebp
ret 4