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

Disassembly:
sub esp, 0x24c
push ebx
push ebp
push esi
mov ebp, dword [esp + 0x25c]
push edi
xor esi, esi
mov ecx, 0x89
xor eax, eax
lea edi, [esp + 0x36]
mov word [esp + 0x34], si
rep stosd dword es:[edi], eax
cmp ebp, esi
mov dword [esp + 0x10], 1
stosw word es:[edi], ax
je 0x1000b9c4
cmp dword [esp + 0x264], esi
je 0x1000b9c4
mov ecx, ebp
call fcn.100075e0
cmp eax, esi
mov dword [esp + 0x2c], eax
je 0x1000b9c4
mov ecx, ebp
call fcn.10007620
mov ecx, ebp
mov edi, eax
call fcn.10007630
mov ebx, eax
mov ecx, ebp
add ebx, 0x28
call fcn.10007610
lea ebp, [eax + ebx + 0xe]
push ebp
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
cmp eax, esi
mov dword [esp + 0x18], eax
je 0x1000b9c4
mov ecx, dword [edi + 0x14]
lea edx, [ebx + 0xe]
add ecx, 0xe
mov word [esp + 0x1c], 0x4d42
mov dword [esp + 0x1e], ecx
mov dword [esp + 0x26], edx
mov edx, dword [esp + 0x1c]
mov ecx, eax
mov word [esp + 0x22], si
mov word [esp + 0x24], si
mov dword [ecx], edx
mov edx, dword [esp + 0x20]
mov esi, edi
lea edi, [eax + 0xe]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x24]
mov dword [ecx + 8], edx
mov dx, word [esp + 0x28]
mov word [ecx + 0xc], dx
mov ecx, ebx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x260]
call fcn.10007610
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x2c]
mov ecx, eax
lea edi, [edx + ebx + 0xe]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, 0x10624dd3
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
shl ecx, 6
sub ecx, ebp
shl ecx, 4
mul ecx
shr edx, 6
add edx, 0xc
mov dword [esp + 0x14], edx
add edx, 4
push edx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edi, eax
xor esi, esi
add esp, 4
cmp edi, esi
jne 0x1000b9d1
mov edx, dword [esp + 0x18]
push edx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24c
ret
mov dword [edi], ebp
mov eax, dword [0x10053e1c]
cmp eax, esi
jne 0x1000ba0d
push 0x18
push 4
push 4
push 4
push 4
push 4
push 4
push 4
push 2
push 0x2060
call fcn.100066f0
add esp, 0x28
test eax, eax
jne 0x1000bad1
mov dword [0x10053e1c], 1
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x14]
push 0x10043e08
lea ecx, [edi + 4]
push eax
push ecx
push ebp
push edx
call fcn.10006790
add esp, 0x14
test eax, eax
jne 0x1000bad1
mov eax, dword [esp + 0x268]
mov ebp, dword [esp + 0x14]
mov ecx, dword [esp + 0x264]
push eax
lea edx, [esp + 0x38]
add ebp, 4
push ecx
push edx
mov dword [esp + 0x20], ebp
call dword [sym.imp.MSVCRT.dll_swprintf]
add esp, 0xc
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push esi
push 0x80
push 4
push esi
push esi
lea ecx, [esp + 0x48]
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x1000bad1
mov eax, dword [esp + 0x14]
cmp eax, esi
jbe 0x1000bac8
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
lea edx, [esp + 0x30]
push 0
sub eax, esi
push edx
push eax
lea eax, [esi + edi]
push eax
push ebp
call ebx
test eax, eax
je 0x1000bac0
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x14]
add esi, edx
cmp esi, eax
jb 0x1000ba94
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1000bad5
mov dword [esp + 0x10], 0
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1000bad5
mov dword [esp + 0x10], esi
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov ecx, dword [esp + 0x1c]
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov eax, dword [esp + 0x18]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24c
ret