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

Disassembly:
push 0x148
mov eax, 0x477d84
call fcn.0045e88a
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.0040da47
push edi
xor ebx, ebx
lea ecx, [ebp - 0x144]
mov edi, esi
mov dword [ebp - 4], ebx
call fcn.00406d89
mov edi, eax
pop ecx
cmp edi, ebx
je 0x406f2a
lea esi, [ebp - 0x144]
call fcn.00420411
jmp 0x40713c
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 0x406f61
push 2
pop edi
lea esi, [ebp - 0x144]
call fcn.00420411
jmp 0x407140
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.0045f510
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 0x40710d
cmp dword [ebp - 0x124], esi
jne 0x40710d
cmp dword [ebp - 0x114], 0x73706172
je 0x406fec
push 0xa
pop edi
lea esi, [ebp - 0x144]
call fcn.00420411
jmp 0x407130
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 0x40700e
push 2
jmp 0x406fdb
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 0x4070d5
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 0x40710d
cmp dword [ebp - 0x128], ebx
je 0x4070d5
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.00406965
add esp, 0x18
test eax, eax
je 0x40710d
inc dword [ebp - 0x120]
mov eax, dword [ebp - 0x120]
cmp eax, dword [ebp - 0x110]
jb 0x407038
mov eax, dword [ebp - 0x110]
cmp dword [ebp - 0x120], eax
jne 0x40710d
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 0x407110
push 3
pop edi
lea esi, [ebp - 0x144]
call fcn.00420411
cmp dword [ebp - 0x118], 0xffffffff
je 0x407130
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 0x40714c
push dword [ebp - 0x12c]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, edi
call fcn.0045e90d
ret