Function at 0x4099ec
Capabilities:
Delete file
Read file on windows

Disassembly:
push 0x148
mov eax, 0x47b567
call fcn.0046215a
mov eax, dword [ebp + 8]
or dword [ebp - 0x118], 0xffffffff
mov dword [ebp - 0x12c], eax
lea eax, [ebp - 0x144]
mov edi, ecx
push eax
mov dword [ebp - 0x11c], edi
mov esi, edx
call fcn.00421e49
push edi
xor ebx, ebx
lea ecx, [ebp - 0x144]
mov edi, esi
mov dword [ebp - 4], ebx
call fcn.004098aa
mov edi, eax
pop ecx
cmp edi, ebx
je 0x409a4b
lea esi, [ebp - 0x144]
call fcn.00423735
jmp 0x409c5d
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebx
push ebx
push 3
push ebx
push ebx
push connect
push dword [ebp - 0x11c]
call edi
mov dword [ebp - 0x11c], eax
cmp eax, 0xffffffff
jne 0x409a82
push 2
pop edi
lea esi, [ebp - 0x144]
call fcn.00423735
jmp 0x409c61
mov ecx, dword [esi + 0x108]
push ebx
add ecx, 8
push ebx
shl ecx, 9
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0xfc
lea eax, [ebp - 0x110]
push ebx
push eax
mov dword [ebp - 0x114], ebx
call fcn.00462d50
add esp, 0xc
push ebx
lea eax, [ebp - 0x124]
push eax
mov esi, 0x100
push esi
lea eax, [ebp - 0x114]
push eax
push dword [ebp - 0x11c]
mov dword [ebp - 0x124], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x409c2e
cmp dword [ebp - 0x124], esi
jne 0x409c2e
cmp dword [ebp - 0x114], 0x73706172
je 0x409b0d
push 0xa
pop edi
lea esi, [ebp - 0x144]
call fcn.00423735
jmp 0x409c51
push ebx
push ebx
push 2
push ebx
push ebx
push 0x40000000
push dword [ebp - 0x12c]
call edi
mov dword [ebp - 0x118], eax
cmp eax, 0xffffffff
jne 0x409b2f
push 2
jmp 0x409afc
push ebx
lea ecx, [ebp - 0x124]
push ecx
push ebx
push ebx
push ebx
push ebx
push 0x900c4
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0x120], ebx
cmp dword [ebp - 0x110], ebx
jbe 0x409bf6
xor eax, eax
mov dword [ebp - 0x154], ebx
lea edi, [ebp - 0x150]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push ebx
stosd dword es:[edi], eax
lea eax, [ebp - 0x128]
push eax
push 0x10
lea eax, [ebp - 0x154]
push eax
push dword [ebp - 0x11c]
mov dword [ebp - 0x128], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x409c2e
cmp dword [ebp - 0x128], ebx
je 0x409bf6
push ebx
push ebx
push dword [ebp - 0x150]
push dword [ebp - 0x154]
push dword [ebp - 0x118]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push dword [ebp - 0x118]
lea esi, [ebp - 0x154]
push dword [ebp - 0x11c]
sub esp, 0x10
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.00409486
add esp, 0x18
test eax, eax
je 0x409c2e
inc dword [ebp - 0x120]
mov eax, dword [ebp - 0x120]
cmp eax, dword [ebp - 0x110]
jb 0x409b59
mov eax, dword [ebp - 0x110]
cmp dword [ebp - 0x120], eax
jne 0x409c2e
push ebx
push ebx
push dword [ebp - 0x108]
push dword [ebp - 0x10c]
push dword [ebp - 0x118]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push dword [ebp - 0x118]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
xor edi, edi
jmp 0x409c31
push 3
pop edi
lea esi, [ebp - 0x144]
call fcn.00423735
cmp dword [ebp - 0x118], 0xffffffff
je 0x409c51
push dword [ebp - 0x118]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x11c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, ebx
je 0x409c6d
push dword [ebp - 0x12c]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, edi
call fcn.004621dd
ret