Function at 0x1005af20
Capabilities:
Delete file
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x100a1f00
push eax
mov eax, 0x402c
mov dword fs:[0], esp
call fcn.1009d950
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, ecx
push edi
push dword [0x100c7600]
call esi
mov edi, eax
test edi, edi
jne 0x1005af88
call fcn.1005ae20
test eax, eax
je 0x1005af72
push dword [0x100c7600]
call esi
mov edi, eax
test edi, edi
jne 0x1005af88
mov eax, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x11694], 0
cmp dword [edi + 0xa0], 0
je 0x1005afcd
mov eax, dword [ebx + 0x10]
mov edx, 0x100ab578
shr eax, 1
mov ecx, 1
and eax, 1
push edi
push eax
call fcn.10065900
mov eax, 1
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 1
mov dword [edi + 0xa0], 1
mov word [edi + 0x9c], ax
mov eax, dword [edi + 0x14b10]
mov dword [edi + 0x146c0], 0
mov dword [edi + 0xa4], 0
mov dword [edi + 0xa8], 0
test eax, eax
je 0x1005b032
push eax
call fcn.10086818
add esp, 4
mov dword [edi + 0x14b10], 0
mov dword [edi + 0x14b0c], 0
mov dword [edi + 0x14b14], 0
mov dword [edi + 0x10b8], 0
mov dword [edi + 0x10bc], 0
mov dword [edi + 0x10c8], 0
mov dword [edi + 0x10cc], 0
mov dword [edi + 0x10c0], 0
mov dword [edi + 0x10d8], 0
mov dword [edi + 0x10dc], 0
mov dword [edi + 0x10d0], 0
mov dword [edi + 0x10e0], 0
mov dword [edi + 0x10e4], 0
mov dword [edi + 0x10ec], 0
mov dword [edi + 0x1108], 0
mov dword [edi + 0x110c], 0
mov dword [edi + 0x6430], 0
mov dword [edi + 0x6434], 0
mov dword [edi + 0x10b0], 0
mov dword [edi + 0x10b4], 0
mov dword [edi + 0xd668], 0
mov eax, dword [edi + 0x14d64]
test eax, eax
je 0x1005b101
mov esi, dword [eax]
push eax
call fcn.10086818
add esp, 4
mov eax, esi
test esi, esi
jne 0x1005b0f0
mov dword [edi + 0x14d64], 0
xor eax, eax
mov word [edi + 0x5418], ax
mov word [edi + 0x4418], ax
mov eax, dword [ebx + 0x38]
mov dword [edi + 0x6430], eax
mov eax, dword [ebx + 0x3c]
mov dword [edi + 0x6434], eax
cmp dword [ebx], 6
je 0x1005b13c
cmp dword [ebx + 4], 0
je 0x1005b7fb
mov edx, dword [ebx + 4]
lea ecx, [edi + 0x2418]
call fcn.100653b0
mov eax, dword [ebx + 0x10]
lea esi, [ebx + 0x10]
shr eax, 0xb
and eax, 1
mov dword [edi + 0x9524], eax
mov eax, dword [ebx + 0x7c]
mov ecx, dword [ebx + 0x80]
mov dword [edi + 0x9650], eax
mov dword [edi + 0x9654], ecx
test dword [esi], 0x800000
je 0x1005b187
mov ax, word [ebx + 0x88]
mov word [edi + 0x9c], ax
mov eax, dword [esi]
shr eax, 0xd
and eax, 1
mov dword [edi + 0xa8], eax
mov eax, dword [esi]
shr eax, 0xe
and eax, 1
mov dword [edi + 0x110c], 1
mov dword [edi + 0x1108], eax
movzx eax, word [esi + 2]
and eax, 1
mov dword [edi + 0x1120], eax
mov eax, dword [esi]
shr eax, 0x12
and eax, 1
mov dword [edi + 0x1128], eax
mov eax, dword [esi]
shr eax, 0x15
and eax, 1
mov dword [edi + 0xd668], eax
movzx eax, byte [esi + 3]
and eax, 1
mov dword [edi + 0x126b0], 0
mov dword [edi + 0x9510], eax
mov dword [edi + 0x126b4], 0
mov eax, dword [esi]
test eax, 0x400
je 0x1005b2ef
test eax, 0x80000
je 0x1005b276
mov dword [edi + 0x126b0], 8
mov eax, dword [ebx + 0x84]
and eax, 3
mov dword [edi + 0x126b4], eax
mov eax, dword [edi + 0x14b10]
test eax, eax
jne 0x1005b296
push 0x2010
mov dword [edi + 0x14b0c], eax
mov dword [edi + 0x14b14], eax
call fcn.1008680d
add esp, 4
mov dword [edi + 0x14b10], eax
lea esi, [ebx + 0x10]
test eax, eax
jne 0x1005b296
mov eax, dword [esi]
mov edx, 0x100ab578
shr eax, 1
mov ecx, 4
and eax, 1
push edi
push eax
call fcn.10065900
mov eax, 4
jmp 0x1005bc36
test eax, 0x100000
je 0x1005b296
mov dword [edi + 0x126b0], 2
mov eax, dword [ebx + 0x84]
and eax, 3
mov dword [edi + 0x126b4], eax
mov ecx, esi
mov dword [ebp - 0x10], ecx
mov eax, dword [ecx]
test eax, 0x180000
je 0x1005b2ef
mov edx, dword [edi + 0x126b4]
cmp edx, 1
jl 0x1005b2b4
cmp edx, 3
jle 0x1005b2ef
mov eax, dword [edi + 0x14b10]
test eax, eax
je 0x1005b2e8
push eax
call fcn.10086818
mov ecx, dword [ebp - 0x10]
add esp, 4
mov dword [edi + 0x14b10], 0
mov dword [edi + 0x14b0c], 0
mov dword [edi + 0x14b14], 0
mov eax, dword [ecx]
jmp 0x1005b7fe
shr eax, 0x16
and eax, 1
mov dword [edi + 0x1114], 0
mov dword [edi + 0x1110], eax
mov eax, dword [esi]
shr eax, 0xf
and eax, 1
mov dword [edi + 0x10ec], eax
mov eax, dword [esi]
shr eax, 0xc
and eax, 1
mov dword [edi + 0x240c], eax
test dword [esi], 0x800
je 0x1005b36f
lea ecx, [edi + 0x2418]
call fcn.1006b380
mov eax, dword [ebx]
cmp eax, 4
je 0x1005b345
cmp eax, 5
je 0x1005b345
cmp eax, 7
jne 0x1005b34d
test byte [esi], 0x58
je 0x1005b36f
lea esi, [ebx + 0x10]
mov eax, dword [esi]
mov edx, 0x100ab578
shr eax, 1
mov ecx, 0x14
and eax, 1
push edi
push eax
call fcn.10065900
mov eax, 0x14
jmp 0x1005bc36
cmp dword [edi + 0x9524], 0
mov dword [edi], 0
mov dword [edi + 0x847c], 0
mov dword [edi + 0x8480], 1
mov dword [edi + 0x8484], 0xffffffff
mov dword [edi + 0x8488], 0
mov dword [edi + 0x848c], 6
mov dword [edi + 0x8490], 1
mov dword [edi + 0x8498], 1
mov dword [edi + 0x84a0], 0
mov dword [edi + 0x84a4], 0
mov dword [edi + 0x84c0], 0
mov dword [edi + 0x84c4], 0
mov dword [edi + 0x9514], 0
mov dword [edi + 0x9518], 0
mov dword [edi + 0x11688], 1
mov dword [edi + 0x1168c], 0
mov dword [edi + 0x11690], 0
mov dword [edi + 0x84a8], 0
mov dword [edi + 0x9500], 0
mov dword [edi + 0x9504], 0
mov dword [edi + 0x951c], 0
mov dword [edi + 0x11694], 0
mov dword [edi + 0x849c], 0x100c35f4
mov dword [edi + 0x9520], 0
mov dword [edi + 0x9508], 0
mov dword [edi + 0x950c], 0
mov dword [edi + 0x6418], 0
mov dword [edi + 0x6424], 0
mov dword [edi + 0x6438], 1
mov eax, dword [ebx + 0x40]
mov dword [edi + 0x1118], eax
mov eax, dword [ebx + 0x44]
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [edi + 0x111c], eax
mov eax, dword [ebx + 0x50]
mov dword [edi + 0x1134], eax
mov eax, dword [ebx + 0x54]
mov dword [edi + 0x1138], eax
mov eax, dword [ebx + 0x58]
mov dword [edi + 0x112c], eax
mov eax, dword [ebx + 0x5c]
mov dword [edi + 0x1130], eax
mov eax, dword [ebx + 0x30]
mov dword [edi + 0x641c], eax
mov eax, dword [ebx + 0x34]
mov dword [edi + 0x6420], eax
mov eax, dword [ebx + 0x28]
mov dword [edi + 0x6428], eax
mov eax, dword [ebx + 0x2c]
mov dword [edi + 0x642c], eax
mov eax, dword [ebx + 0x60]
mov dword [edi + 0x6440], eax
mov eax, dword [ebx + 0x64]
mov dword [edi + 0x6444], eax
je 0x1005b6f9
lea eax, [ebp - 0x1038]
mov dword [edi + 0xac], 0xffffffff
push eax
lea eax, [ebp - 0x4038]
push eax
lea eax, [ebp - 0x2038]
push eax
lea ecx, [edi + 0x2418]
lea edx, [ebp - 0x3038]
call fcn.100507a0
lea ecx, [ebp - 0x1038]
mov esi, str..z01
mov eax, ecx
add esp, 0xc
mov edx, 0x800
sub esi, eax
lea eax, [edx + 0x7ffff7fe]
test eax, eax
je 0x1005b57a
movzx eax, word [esi + ecx]
test ax, ax
je 0x1005b573
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x1005b553
jmp 0x1005b577
test edx, edx
jne 0x1005b57a
sub ecx, 2
xor eax, eax
lea esi, [edi + 0xb0]
mov word [ecx], ax
test esi, esi
je 0x1005b69c
mov word [esi], ax
mov ax, word [ebp - 0x3038]
test ax, ax
je 0x1005b5ce
cmp ax, 0x5c
jne 0x1005b5bb
cmp word [ebp - 0x3036], ax
jne 0x1005b5bb
lea eax, [ebp - 0x3038]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x1005b5ce
movzx eax, ax
push eax
push str._c:_
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
cmp word [ebp - 0x2038], 0
je 0x1005b60a
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jle 0x1005b5fb
cmp word [esi + eax*2 - 2], 0x5c
jne 0x1005b5fb
cmp word [ebp - 0x2038], 0x5c
lea eax, [ebp - 0x2036]
je 0x1005b601
lea eax, [ebp - 0x2038]
push eax
mov eax, dword [sym.imp.KERNEL32.dll_lstrcatW]
push esi
call eax
mov ax, word [ebp - 0x4038]
test ax, ax
je 0x1005b64a
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jle 0x1005b629
cmp word [esi + eax*2 - 2], 0x5c
je 0x1005b635
push 0x100b0dec
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x4038]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
mov ax, word [ebp - 0x4038]
cmp word [ebp - 0x1038], 0
je 0x1005b69c
test ax, ax
jne 0x1005b678
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jle 0x1005b66c
cmp word [esi + eax*2 - 2], 0x5c
je 0x1005b678
push 0x100b0dec
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
cmp word [ebp - 0x1038], 0x2e
je 0x1005b68e
push 0x100adae8
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x1038]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea ecx, [edi + 0xb0]
call fcn.1006d800
mov esi, eax
test esi, esi
jne 0x1005bc1e
sub esp, 8
lea edx, [edi + 0xb0]
mov ecx, edi
push 2
sub esp, 0xc
call fcn.1005c300
add esp, 0x18
mov dword [edi + 0xac], eax
cmp eax, 0xffffffff
jne 0x1005b6f3
mov eax, dword [ebx + 0x10]
lea ecx, [esi + 0xa]
shr eax, 1
mov edx, 0x100ab578
and eax, 1
push edi
push eax
call fcn.10065900
lea eax, [esi + 0xa]
jmp 0x1005bc36
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov eax, dword [ebx + 0x74]
mov ecx, dword [ebx + 0x78]
mov dword [edi + 0x10c8], eax
mov dword [edi + 0x10cc], ecx
cmp dword [ebx + 0x70], 0
je 0x1005b737
mov ecx, dword [ebx + 8]
test ecx, ecx
je 0x1005b737
call fcn.10051000
push eax
call esi
test eax, eax
jle 0x1005b737
mov dword [edi + 0x10b8], 1
mov eax, dword [ebx + 0x70]
mov dword [edi + 0x10d0], eax
cmp dword [edi + 0x10ec], 0
mov eax, dword [ebx + 0x20]
mov dword [edi + 0x1100], eax
mov eax, dword [ebx + 0x24]
mov dword [edi + 0x1104], eax
je 0x1005b81e
cmp dword [ebx + 0x20], 0
jne 0x1005b81e
mov eax, dword [edi + 0xac]
cmp eax, 0xffffffff
je 0x1005b77c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0xac], 0xffffffff
mov esi, dword [edi + 0x14d64]
test esi, esi
je 0x1005b7d2
push 0x104
lea eax, [esi + 4]
push eax
lea ecx, [ebp - 0x1c]
call fcn.1004d280
mov ecx, dword [eax + 4]
test ecx, ecx
jne 0x1005b7a0
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x1005b7c5
push eax
call fcn.10086818
add esp, 4
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0xffffffff
mov esi, dword [esi]
test esi, esi
jne 0x1005b786
mov eax, dword [edi + 0x14d64]
test eax, eax
je 0x1005b7f1
lea esp, [esp]
mov esi, dword [eax]
push eax
call fcn.10086818
add esp, 4
mov eax, esi
test esi, esi
jne 0x1005b7e0
mov dword [edi + 0x14d64], 0
mov eax, dword [ebx + 0x10]
shr eax, 1
mov edx, 0x100ab578
and eax, 1
mov ecx, 0x10
push edi
push eax
call fcn.10065900
mov eax, 0x10
jmp 0x1005bc36
cmp dword [ebx], 6
jne 0x1005b8e6
cmp dword [edi + 0x10b8], 0
mov dword [edi + 0x10e4], 1
jne 0x1005b84d
push dword [ebx + 4]
call esi
test eax, eax
jg 0x1005b84d
cmp dword [ebx + 0x20], 0
jne 0x1005b8e6
mov eax, dword [edi + 0xac]
cmp eax, 0xffffffff
je 0x1005b869
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0xac], 0xffffffff
mov esi, dword [edi + 0x14d64]
test esi, esi
je 0x1005b8bf
push 0x104
lea eax, [esi + 4]
push eax
lea ecx, [ebp - 0x1c]
call fcn.1004d280
mov ecx, dword [eax + 4]
test ecx, ecx
jne 0x1005b88d
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x1005b8b2
push eax
call fcn.10086818
add esp, 4
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0xffffffff
mov esi, dword [esi]
test esi, esi
jne 0x1005b873
mov eax, dword [edi + 0x14d64]
test eax, eax
je 0x1005b7f1
lea ecx, [ecx]
mov esi, dword [eax]
push eax
call fcn.10086818
add esp, 4
mov eax, esi
test esi, esi
jne 0x1005b8d0
jmp 0x1005b7f1
cmp dword [ebx], 7
jne 0x1005b92c
mov ecx, dword [ebx + 8]
test ecx, ecx
je 0x1005b94c
call fcn.10051000
push eax
call esi
test eax, eax
jle 0x1005b94c
cmp dword [ebx + 0x20], 0
je 0x1005b94c
mov dword [edi + 0x10b8], 1
mov dword [edi + 0x10bc], 1
mov dword [edi + 0x10c8], 0
mov dword [edi + 0x10cc], 0
cmp dword [edi + 0x10e4], 0
mov edx, edi
mov ecx, ebx
je 0x1005b9e6
call fcn.1006a820
mov esi, eax
mov dword [ebp - 0x10], esi
jmp 0x1005b9f0
mov eax, dword [edi + 0xac]
cmp eax, 0xffffffff
je 0x1005b968
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0xac], 0xffffffff
mov esi, dword [edi + 0x14d64]
test esi, esi
je 0x1005b9be
push 0x104
lea eax, [esi + 4]
push eax
lea ecx, [ebp - 0x1c]
call fcn.1004d280
mov ecx, dword [eax + 4]
test ecx, ecx
jne 0x1005b98c
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x1005b9b1
push eax
call fcn.10086818
add esp, 4
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0xffffffff
mov esi, dword [esi]
test esi, esi
jne 0x1005b972
mov eax, dword [edi + 0x14d64]
test eax, eax
je 0x1005b7f1
lea esp, [esp]
mov esi, dword [eax]
push eax
call fcn.10086818
add esp, 4
mov eax, esi
test esi, esi
jne 0x1005b9d0
jmp 0x1005b7f1
call fcn.100673f0
mov esi, eax
mov dword [ebp - 0x10], eax
mov eax, dword [edi + 0xac]
cmp eax, 0xffffffff
je 0x1005ba0c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0xac], 0xffffffff
test esi, esi
je 0x1005ba6c
mov esi, dword [edi + 0x14d64]
test esi, esi
je 0x1005ba6c
lea ebx, [ebx]
push 0x104
lea eax, [esi + 4]
push eax
lea ecx, [ebp - 0x1c]
call fcn.1004d280
mov ecx, dword [eax + 4]
test ecx, ecx
jne 0x1005ba3a
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [ebp - 4], 3
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x1005ba5f
push eax
call fcn.10086818
add esp, 4
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0xffffffff
mov esi, dword [esi]
test esi, esi
jne 0x1005ba20
mov eax, dword [edi + 0x14d64]
test eax, eax
je 0x1005ba87
mov esi, dword [eax]
push eax
call fcn.10086818
add esp, 4
mov eax, esi
test esi, esi
jne 0x1005ba76
mov esi, dword [ebp - 0x10]
mov dword [edi + 0x14d64], 0
cmp dword [edi + 0x11688], 1
mov dword [edi + 0x84cc], 0
jne 0x1005bba3
test esi, esi
jne 0x1005bba3
push 0x104
lea eax, [edi + 0x2418]
push eax
lea ecx, [ebp - 0x1c]
call fcn.1004d280
mov esi, dword [ebp - 0x18]
mov eax, esi
test esi, esi
jne 0x1005bad3
mov eax, dword [ebp - 0x1c]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], 4
test esi, esi
je 0x1005bb03
push esi
call fcn.10086818
add esp, 4
mov esi, dword [ebp - 0x20]
mov dword [ebp - 4], 0xffffffff
cmp esi, 0xffffffff
je 0x1005bba0
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x38]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x1005bb99
lea eax, [edi + 0x94d0]
push eax
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
test eax, eax
je 0x1005bb99
mov ecx, esi
call fcn.1006de30
mov dword [edi + 0x94dc], edx
lea ecx, [edi + 0x84d0]
mov dword [edi + 0x94d8], eax
mov edx, 0x800
lea eax, [edx + 0x7ffff7fe]
test eax, eax
je 0x1005bb8a
movzx eax, word [ecx - 0x60b8]
test ax, ax
je 0x1005bb83
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x1005bb60
jmp 0x1005bb87
test edx, edx
jne 0x1005bb8a
sub ecx, 2
xor eax, eax
mov word [ecx], ax
mov dword [edi + 0x84cc], 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x10]
cmp dword [edi + 0x84cc], 0
jne 0x1005bbb3
mov ecx, edi
call fcn.100655d0
mov eax, dword [edi + 0x146c4]
test eax, eax
je 0x1005bbd0
push eax
call fcn.10086818
add esp, 4
mov dword [edi + 0x146c4], 0
mov eax, dword [edi + 0x14b10]
test eax, eax
je 0x1005bc01
push eax
call fcn.10086818
add esp, 4
mov dword [edi + 0x14b10], 0
mov dword [edi + 0x14b0c], 0
mov dword [edi + 0x14b14], 0
push 0x210
lea eax, [edi + 0x146c8]
push 0
push eax
call fcn.1007cff0
add esp, 0xc
mov ecx, edi
call fcn.1005c070
mov eax, dword [ebx + 0x10]
mov edx, 0x100ab578
shr eax, 1
mov ecx, esi
and eax, 1
push edi
push eax
call fcn.10065900
mov eax, esi
mov ecx, dword [ebp - 0xc]
add esp, 8
mov dword [edi + 0xa0], 0
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret