Function at 0x10091930
Capabilities:
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10164190
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
push ebx
push esi
push edi
mov eax, dword [0x10438fc0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
mov eax, dword [ecx + 0x18]
test eax, eax
jne 0x1009197e
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
xor eax, eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push 0
push 0
push 0
lea esi, [ebp - 0x10]
mov ebx, eax
mov dword [ebp - 0x10], 0
call fcn.100163a0
push ebx
push edi
push str.ESRIsort__x__x
mov edx, esi
mov dword [ebp - 4], 0
call fcn.10016c90
mov ecx, dword [ebp - 0x10]
lea edx, [ebp - 0x14]
add esp, 0xc
push edx
mov edx, 0x104177a4
call fcn.10023c10
add esp, 4
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
mov eax, dword [eax - 4]
test eax, eax
jne 0x10091a3f
mov eax, dword [ebp - 0x14]
mov esi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
lea ecx, [eax - 0xc]
test ecx, ecx
je 0x10091a0b
add eax, 0xfffffff4
dec dword [eax]
jne 0x10091a0b
push eax
call esi
add esp, 4
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x10091a26
lea edx, [eax - 0xc]
test edx, edx
je 0x10091a26
add eax, 0xfffffff4
dec dword [eax]
jne 0x10091a26
push eax
call esi
add esp, 4
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ebx, dword [ebp - 0x14]
push eax
push ebx
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
push 0x10
mov dword [ebp - 0x40], eax
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
mov esi, eax
add esp, 4
mov dword [ebp - 0x28], esi
mov byte [ebp - 4], 2
test esi, esi
je 0x10091a82
push 0
mov edi, ebx
call fcn.100164f0
mov dword [esi + 4], 0xffffffff
mov dword [esi + 8], 0
mov byte [esi + 0xc], 0
jmp 0x10091a84
xor esi, esi
mov byte [ebp - 4], 1
mov eax, dword [esi + 4]
mov dword [ebp - 0x44], esi
cmp eax, 0xffffffff
je 0x10091aa1
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0xffffffff
cmp byte [esi + 0xc], 0
je 0x10091ab0
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [esi]
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x10091b38
call fcn.10023ad0
lea edi, [ebp - 0x44]
mov dword [esi + 8], eax
call fcn.10092330
mov esi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
lea eax, [ebx - 0xc]
test eax, eax
je 0x10091af8
dec dword [ebx - 0xc]
lea eax, [ebx - 0xc]
jne 0x10091af8
push eax
call esi
add esp, 4
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x10091a26
lea ecx, [eax - 0xc]
test ecx, ecx
je 0x10091a26
add eax, 0xfffffff4
dec dword [eax]
jne 0x10091a26
push eax
call esi
add esp, 4
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edi, dword [ebp + 0xc]
mov dword [esi + 4], eax
mov byte [esi + 0xc], 0
mov dword [esi + 8], 0
test edi, edi
jne 0x10091cd3
mov ebx, dword [ebp + 8]
mov edx, dword [ebx + 0x10]
mov eax, dword [edx + 0x18]
test eax, eax
jle 0x10091be1
mov eax, dword [ebx + 0x10]
cmp byte [eax + 1], 0
je 0x10091b74
cmp edi, dword [eax + 0x18]
jb 0x10091b74
xor eax, eax
jmp 0x10091b89
mov ecx, dword [eax + 0xc]
mov edx, edi
shr edx, cl
mov ecx, dword [eax + 0x20]
mov eax, dword [eax + 8]
and eax, edi
mov ecx, dword [ecx + edx*4]
lea eax, [ecx + eax*8]
mov edx, dword [eax]
mov dword [ebp - 0x30], edx
mov eax, dword [eax + 4]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x18], 0
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x10091bf9
push 0
lea ecx, [ebp - 0x18]
push ecx
push 4
lea edx, [ebp - 0x30]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10091c02
mov dword [esi + 8], 0
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x18]
call fcn.10023600
test al, al
je 0x10091c6e
mov ecx, dword [ebx + 0x10]
inc edi
cmp edi, dword [ecx + 0x18]
jl 0x10091b62
mov eax, dword [ebx + 0x10]
mov dword [eax + 0x18], 0
mov edx, dword [ebx + 0x30]
mov dword [ebx + 0x2c], edx
mov ebx, dword [ebp - 0x14]
jmp 0x10091d26
mov dword [esi + 8], 6
jmp 0x10091c09
mov dword [esi + 8], 0xfffffffd
lea edi, [ebp - 0x44]
call fcn.10092330
mov eax, dword [ebp - 0x14]
mov esi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
lea edx, [eax - 0xc]
test edx, edx
je 0x10091c2e
add eax, 0xfffffff4
dec dword [eax]
jne 0x10091c2e
push eax
call esi
add esp, 4
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x10091a26
lea ecx, [eax - 0xc]
test ecx, ecx
je 0x10091a26
add eax, 0xfffffff4
dec dword [eax]
jne 0x10091a26
push eax
call esi
add esp, 4
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea edi, [ebp - 0x44]
call fcn.10092330
mov eax, dword [ebp - 0x14]
mov esi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
lea edx, [eax - 0xc]
test edx, edx
je 0x10091c93
add eax, 0xfffffff4
dec dword [eax]
jne 0x10091c93
push eax
call esi
add esp, 4
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x10091a26
lea ecx, [eax - 0xc]
test ecx, ecx
je 0x10091a26
add eax, 0xfffffff4
dec dword [eax]
jne 0x10091a26
push eax
call esi
add esp, 4
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 4
lea ecx, [ebp - 0x18]
mov edx, edi
call fcn.10023600
test al, al
jne 0x10091d14
lea edi, [ebp - 0x44]
call fcn.10092330
lea eax, [ebp - 0x14]
call fcn.100164d0
lea eax, [ebp - 0x10]
call fcn.100164d0
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [edi]
mov edx, dword [edi + 4]
push eax
lea ecx, [ebp - 0x18]
call fcn.10023600
test al, al
je 0x10091ce3
mov eax, dword [esi + 4]
or edi, 0xffffffff
cmp eax, edi
je 0x10091d3a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], edi
cmp byte [esi + 0xc], 0
je 0x10091d49
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [esi + 4]
cmp eax, edi
je 0x10091d5a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], edi
cmp byte [esi + 0xc], 0
je 0x10091d69
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [esi]
push 0
push 0
push 3
push 0
push 0
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, edi
jne 0x10091df0
call fcn.10023ad0
lea edi, [ebp - 0x44]
mov dword [esi + 8], eax
call fcn.10092330
mov esi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
lea ecx, [ebx - 0xc]
test ecx, ecx
je 0x10091db0
dec dword [ebx - 0xc]
lea eax, [ebx - 0xc]
jne 0x10091db0
push eax
call esi
add esp, 4
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x10091a26
lea edx, [eax - 0xc]
test edx, edx
je 0x10091a26
add eax, 0xfffffff4
dec dword [eax]
jne 0x10091a26
push eax
call esi
add esp, 4
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ebx, dword [ebp + 8]
mov dword [esi + 4], eax
add ebx, 0x14
lea eax, [ebp - 0x44]
mov byte [esi + 0xc], 0
mov dword [esi + 8], 0
mov dword [ebp - 0x28], ebx
call fcn.100926e0
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x1c]
mov dword [ebp + 0xc], eax
cmp eax, dword [esi + 8]
jl 0x100921f4
mov edi, dword [esi + 0x18]
xor ebx, ebx
test eax, eax
jle 0x10091e7c
lea ebx, [ebx]
mov esi, dword [edi]
mov edx, dword [esi + 4]
cmp edx, 0xffffffff
jne 0x10091e43
mov dword [esi + 8], 6
jmp 0x10091e5f
xor ecx, ecx
push ecx
push ecx
push ecx
xor eax, eax
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
neg eax
sbb eax, eax
and eax, 0xffffffe7
add eax, 0x19
mov dword [esi + 8], eax
mov eax, edi
call fcn.10092250
mov esi, eax
test esi, esi
js 0x10091f37
inc ebx
add edi, 0x14
cmp ebx, dword [ebp + 0xc]
jl 0x10091e30
mov esi, dword [ebp + 8]
mov eax, esi
call fcn.100923a0
xor eax, eax
mov dword [esi + 0xc], 2
mov byte [esi + 0x28], 1
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
lea eax, [ebp + 0xc]
push eax
mov edx, 0x104177a4
mov ecx, esi
call fcn.10023c10
add esp, 4
mov byte [ebp - 4], 3
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx - 4]
test eax, eax
jne 0x10091f85
mov edi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
lea ecx, [ebx - 0xc]
test ecx, ecx
je 0x10091ee2
dec dword [ebx - 0xc]
lea eax, [ebx - 0xc]
jne 0x10091ee2
push eax
call edi
add esp, 4
mov eax, dword [ebp - 0x14]
lea edx, [eax - 0xc]
test edx, edx
je 0x10091ef9
add eax, 0xfffffff4
dec dword [eax]
jne 0x10091ef9
push eax
call edi
add esp, 4
test esi, esi
je 0x10091a26
lea eax, [esi - 0xc]
test eax, eax
je 0x10091a26
dec dword [esi - 0xc]
lea eax, [esi - 0xc]
jne 0x10091a26
push eax
call edi
add esp, 4
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp - 0x14]
mov edi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
lea ecx, [eax - 0xc]
test ecx, ecx
je 0x10091f54
add eax, 0xfffffff4
dec dword [eax]
jne 0x10091f54
push eax
call edi
add esp, 4
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x10091f6f
lea edx, [eax - 0xc]
test edx, edx
je 0x10091f6f
add eax, 0xfffffff4
dec dword [eax]
jne 0x10091f6f
push eax
call edi
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push eax
push ebx
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov edi, eax
push 0x10
mov dword [ebp - 0x40], edi
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
mov esi, eax
add esp, 4
mov dword [ebp - 0x24], esi
mov byte [ebp - 4], 4
test esi, esi
je 0x10091fc5
push 0
call fcn.100164f0
mov dword [esi + 4], 0xffffffff
mov dword [esi + 8], 0
mov byte [esi + 0xc], 0
jmp 0x10091fc7
xor esi, esi
mov byte [ebp - 4], 3
mov eax, dword [esi + 4]
mov dword [ebp - 0x44], esi
cmp eax, 0xffffffff
je 0x10091fe4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0xffffffff
cmp byte [esi + 0xc], 0
je 0x10091ff3
mov ecx, dword [esi]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [esi]
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x10092096
call fcn.10023ad0
lea edi, [ebp - 0x44]
mov dword [esi + 8], eax
call fcn.10092330
mov esi, dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
lea edx, [ebx - 0xc]
test edx, edx
je 0x1009203f
dec dword [ebx - 0xc]
lea eax, [ebx - 0xc]
jne 0x1009203f
push eax
call esi
add esp, 4
mov eax, dword [ebp - 0x14]
lea ecx, [eax - 0xc]
test ecx, ecx
je 0x10092056
add eax, 0xfffffff4
dec dword [eax]
jne 0x10092056
push eax
call esi
add esp, 4
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x10091a26
lea edx, [eax - 0xc]
test edx, edx
je 0x10091a26
add eax, 0xfffffff4
dec dword [eax]
jne 0x10091a26
push eax
call esi
add esp, 4
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ebx, dword [ebp + 8]
mov dword [esi + 4], eax
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x20]
push ecx
mov byte [esi + 0xc], 0
mov dword [esi + 8], 0
call fcn.10091850
test eax, eax
jne 0x1009211e
xor edi, edi
mov dword [ebp - 0x1c], edi
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x1009216c
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
lea edx, [ebp - 0x1c]
push edx
push 4
lea ecx, [ebp - 0x20]
push ecx
push eax
call ebx
test eax, eax
je 0x10092175
mov dword [esi + 8], edi
mov dword [ebp - 0x1c], edi
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x1009216c
mov ecx, dword [ebp - 0x20]
push edi
lea edx, [ebp - 0x1c]
push edx
mov edx, dword [ebp - 0x24]
push ecx
push edx
push eax
call ebx
test eax, eax
je 0x10092175
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x20]
push ecx
mov dword [esi + 8], edi
call fcn.10091850
test eax, eax
je 0x100920b8
call fcn.100233d0
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x10092139
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0xffffffff
xor ebx, ebx
cmp byte [esi + 0xc], bl
je 0x10092149
mov edx, dword [esi]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [esi]
push ebx
push ebx
push 3
push ebx
push ebx
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x10092191
call fcn.10023ad0
mov dword [esi + 8], eax
jmp 0x1009217c
mov dword [esi + 8], 6
jmp 0x1009217c
mov dword [esi + 8], 0xfffffffd
lea edi, [ebp - 0x44]
call fcn.10092330
lea eax, [ebp + 0xc]
call fcn.100164d0
jmp 0x10091ceb
mov edi, dword [ebp + 8]
mov dword [esi + 4], eax
mov byte [esi + 0xc], bl
mov dword [esi + 8], ebx
mov eax, dword [edi + 0x1c]
mov esi, dword [edi + 0x18]
cmp eax, ebx
jle 0x100921c0
mov ebx, eax
lea esp, [esp]
mov edi, esi
call fcn.10092330
add esi, 0x14
dec ebx
jne 0x100921b0
mov edi, dword [ebp + 8]
mov esi, dword [ebp - 0x28]
call fcn.100926a0
lea eax, [ebp - 0x44]
mov ebx, esi
call fcn.100926e0
mov eax, dword [ebp + 0xc]
lea ecx, [eax - 0xc]
mov dword [edi + 0xc], 1
test ecx, ecx
je 0x100921f4
add eax, 0xfffffff4
dec dword [eax]
jne 0x100921f4
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov eax, dword [ebp - 0x14]
lea edx, [eax - 0xc]
test edx, edx
je 0x1009220f
add eax, 0xfffffff4
dec dword [eax]
jne 0x1009220f
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x1009222e
lea ecx, [eax - 0xc]
test ecx, ecx
je 0x1009222e
add eax, 0xfffffff4
dec dword [eax]
jne 0x1009222e
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8