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

Disassembly:
push 0x148
mov eax, 0x479043
call fcn.0045fd3a
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.00406728
push edi
xor ebx, ebx
lea ecx, [ebp - 0x144]
mov edi, esi
mov dword [ebp - 4], ebx
call fcn.00407625
mov edi, eax
pop ecx
cmp edi, ebx
je 0x4077c6
lea esi, [ebp - 0x144]
call fcn.00406806
jmp 0x4079d8
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 0x4077fd
push 2
pop edi
lea esi, [ebp - 0x144]
call fcn.00406806
jmp 0x4079dc
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.00460930
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 0x4079a9
cmp dword [ebp - 0x124], esi
jne 0x4079a9
cmp dword [ebp - 0x114], 0x73706172
je 0x407888
push 0xa
pop edi
lea esi, [ebp - 0x144]
call fcn.00406806
jmp 0x4079cc
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 0x4078aa
push 2
jmp 0x407877
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 0x407971
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 0x4079a9
cmp dword [ebp - 0x128], ebx
je 0x407971
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.00407201
add esp, 0x18
test eax, eax
je 0x4079a9
inc dword [ebp - 0x120]
mov eax, dword [ebp - 0x120]
cmp eax, dword [ebp - 0x110]
jb 0x4078d4
mov eax, dword [ebp - 0x110]
cmp dword [ebp - 0x120], eax
jne 0x4079a9
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 0x4079ac
push 3
pop edi
lea esi, [ebp - 0x144]
call fcn.00406806
cmp dword [ebp - 0x118], 0xffffffff
je 0x4079cc
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 0x4079e8
push dword [ebp - 0x12c]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, edi
call fcn.0045fdbd
ret