Function at 0x1004eff0
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100a0bd0
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x100d1040]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
xor ebx, ebx
cmp eax, ebx
je 0x1004f2ae
cmp word [eax], bx
je 0x1004f2ae
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x4c]
cmp eax, 0xffffffff
je 0x1004f044
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x354]
cmp eax, ebx
je 0x1004f05d
push eax
call fcn.1005758d
add esp, 4
mov dword [esi + 0x354], ebx
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x18], edi
cmp edi, ebx
je 0x1004f070
mov eax, dword [edi]
mov ecx, dword [eax + 4]
push edi
call ecx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x10], ebx
lea eax, [esp + 0x10]
push eax
mov byte [esp + 0x34], 1
mov edx, dword [edi]
mov ecx, dword [edx]
push 0x100c484c
push edi
call ecx
mov ebx, eax
xor ecx, ecx
cmp ebx, ecx
jl 0x1004f273
cmp ebx, 1
je 0x1004f273
mov eax, dword [esp + 0x10]
cmp eax, ecx
jne 0x1004f0d5
mov dword [esp + 0x30], 0xffffffff
mov edx, dword [edi]
mov eax, dword [edx + 8]
push edi
call eax
mov eax, 0x80004005
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
lea edx, [esp + 0x14]
push edx
lea edx, [esp + 0x20]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x18], ecx
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x1c]
call eax
test eax, eax
jne 0x1004f234
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
mov edx, ecx
or edx, eax
je 0x1004f234
cmp eax, 0x200
ja 0x1004f234
jb 0x1004f122
test ecx, ecx
jae 0x1004f234
mov eax, dword [ebp + 0xc]
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 0x4c], eax
cmp eax, 0xffffffff
jne 0x1004f189
call fcn.10002c20
mov esi, eax
mov byte [esp + 0x30], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1004f162
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x30], 0xffffffff
mov eax, dword [edi]
mov ecx, dword [eax + 8]
push edi
call ecx
mov eax, esi
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
add edx, 0x1ff
adc eax, 0
shrd edx, eax, 9
push 0
push 0x200
shr eax, 9
push eax
push edx
mov dword [esi + 0x14], 0
mov dword [esi + 0x50], 2
mov dword [esi + 0x348], 0x80000
mov dword [esi + 0x34c], 0x400
mov dword [esi + 0x350], 0x200
call fcn.10065760
push esi
mov ecx, edi
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], edx
call fcn.1004f2d0
mov ebx, eax
test ebx, ebx
jl 0x1004f20c
cmp ebx, 1
je 0x1004f20c
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x18]
push edx
call fcn.10003430
jmp 0x1004f14b
mov edx, dword [esi + 0x4c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0xc]
push eax
mov dword [esi + 0x4c], 0xffffffff
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov byte [esp + 0x30], 0
mov eax, dword [esp + 0x10]
test eax, eax
jmp 0x1004f27d
mov byte [esp + 0x30], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1004f249
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov dword [esp + 0x30], 0xffffffff
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
push edi
call edx
mov eax, 0x80004005
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov byte [esp + 0x30], cl
mov eax, dword [esp + 0x10]
cmp eax, ecx
je 0x1004f287
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x30], 0xffffffff
mov eax, dword [edi]
mov ecx, dword [eax + 8]
push edi
call ecx
mov eax, ebx
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, 0x80070057
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc