Function at 0x100085b0
Capabilities:
Delete file
Move file
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x1002aef1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x126f8
call fcn.10010280
push ebx
push ebp
push esi
mov esi, dword [esp + 0x12718]
push edi
xor edi, edi
mov eax, dword [esi + 0x214]
lea ebp, [esi + 0x20c]
cmp eax, 2
mov dword [esp + 0x10], edi
jb 0x1000872e
mov al, byte [ebp]
push edi
push edi
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1c], al
call fcn.10008cc0
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edi
push fcn.10008a80
push 0x10008ae0
push 0x10
lea ecx, [esp + 0x58]
push 0xc
push ecx
mov dword [esp + 0x12728], edi
call fcn.100102b6
mov eax, dword [ebp + 8]
mov byte [esp + 0x12714], 1
cmp eax, edi
je 0x100086fd
lea edx, [esp + 0x24]
mov ecx, ebp
push edx
call fcn.10008ad0
mov eax, dword [eax]
lea ecx, [esp + 0x20]
push eax
push ebp
push ecx
lea ecx, [esp + 0x20]
call fcn.10008ad0
mov edx, dword [eax]
lea ecx, [esp + 0x1c]
push edx
call fcn.10008b80
xor ebx, ebx
test edi, edi
jbe 0x100086c3
lea esi, [esp + 0x4c]
mov eax, dword [esi + 8]
test eax, eax
je 0x1000869d
lea eax, [esp + 0x14]
mov ecx, esi
push eax
call fcn.10008be0
lea ecx, [esp + 0x14]
push ecx
mov ecx, esi
call fcn.10008b50
inc ebx
add esi, 0xc
cmp ebx, edi
jb 0x10008676
cmp ebx, 0xf
jne 0x100086bc
lea edx, [esp + 0x14]
lea ecx, [esp + 0x100]
push edx
call fcn.10008be0
mov esi, dword [esp + 0x1271c]
jmp 0x100086d9
mov esi, dword [esp + 0x1271c]
lea ecx, [ebx + ebx*2]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + ecx*4 + 0x50]
call fcn.10008b50
cmp ebx, edi
jne 0x100086d9
inc edi
mov eax, dword [ebp + 8]
test eax, eax
jne 0x10008642
test edi, edi
jbe 0x100086fd
lea edx, [edi + edi*2]
lea ebx, [esp + edx*4 + 0x4c]
sub ebx, 0xc
mov ecx, ebp
push ebx
call fcn.10008be0
dec edi
jne 0x100086ef
push fcn.10008a80
push 0x10
lea eax, [esp + 0x54]
push 0xc
push eax
mov byte [esp + 0x12724], 0
call fcn.10010338
lea ecx, [esp + 0x14]
mov dword [esp + 0x12714], 0xffffffff
call fcn.10008a80
xor edi, edi
mov eax, dword [esi + 0x214]
xor ebx, ebx
test eax, eax
jbe 0x10008958
mov ecx, dword [esi + 0x210]
mov eax, dword [ecx]
mov ecx, dword [eax + 0xc]
lea edx, [ecx + ebx]
cmp edx, 0x124f8
jae 0x100087fc
mov dx, word [esi + 0x208]
mov di, word [eax + 8]
cmp dx, di
jne 0x100087c8
mov edx, ecx
lea esi, [eax + 0x10]
lea edi, [esp + ebx + 0x210]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1271c]
mov esi, dword [eax + 0xc]
add ebx, esi
mov ax, word [ecx + 0x208]
inc eax
mov word [ecx + 0x208], ax
mov eax, dword [ebp + 4]
mov eax, dword [eax]
push eax
mov ecx, dword [eax + 4]
mov edx, dword [eax]
mov dword [ecx], edx
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
call fcn.10010220
mov eax, dword [ebp + 8]
mov esi, dword [esp + 0x12720]
add esp, 4
dec eax
mov dword [ebp + 8], eax
jmp 0x100087ee
jbe 0x100087fc
mov eax, dword [ebp + 4]
mov eax, dword [eax]
push eax
mov ecx, dword [eax + 4]
mov edx, dword [eax]
mov dword [ecx], edx
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
call fcn.10010220
mov eax, dword [ebp + 8]
add esp, 4
dec eax
mov dword [ebp + 8], eax
mov eax, dword [esi + 0x214]
test eax, eax
ja 0x1000873e
test ebx, ebx
jle 0x10008958
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x1000881a
or eax, 0xffffffff
jmp 0x1000895c
mov ebp, dword [esp + 0x1271c]
push 0x10030210
push ebp
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
jne 0x1000883e
or eax, 0xffffffff
jmp 0x1000895c
push esi
push ebx
lea eax, [esp + 0x218]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
lea ecx, [esp + 0x3c]
push ecx
push ebp
call dword [sym.imp.MSVCRT.dll__stat]
add esp, 0x1c
test eax, eax
jne 0x10008958
mov edx, dword [esp + 0x3c]
mov eax, dword [ebp + 0x200]
cmp edx, eax
jne 0x100088ab
push 0
push 0x80
push 4
push 0
push 2
push 0x40000000
push ebp
mov dword [esp + 0x2c], 8
call dword [sym.imp.KERNEL32.dll_CreateFileA]
test eax, eax
jne 0x100088b8
mov eax, 8
jmp 0x1000895c
mov dword [esp + 0x10], 1
jmp 0x10008958
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x10b], 0x24
jne 0x10008958
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push eax
mov byte [esp + ecx + 0x10f], al
lea ecx, [esp + 0x110]
push ecx
call dword [sym.imp.MSVCRT.dll__access]
add esp, 8
lea edx, [esp + 0x10c]
test eax, eax
push edx
jne 0x1000894e
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x10008946
lea eax, [esp + 0x10c]
push eax
push ebp
call fcn.10008550
jmp 0x10008955
lea ecx, [esp + 0x10c]
push ecx
push ebp
call dword [sym.imp.MSVCRT.dll_rename]
add esp, 8
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x1270c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x12708
ret