Function at 0x4126c1
Capabilities:
Delete file

Disassembly:
push 0x54
mov eax, 0x49fbb1
call fcn.00481105
mov esi, ecx
xor edi, edi
mov dword [ebp - 0x54], esi
cmp esi, edi
je 0x412919
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4126e1
sub eax, edx
sar eax, 1
je 0x412919
push esi
mov dword [ebp - 0x50], 1
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x41276d
push esi
lea ecx, [ebp - 0x2c]
call fcn.004029c1
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], edi
call fcn.00419832
pop ecx
mov byte [ebp - 4], 1
cmp dword [eax + 0x14], 0x10
jb 0x41272f
mov ebx, dword [eax]
jmp 0x412731
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x4d4770]
push eax
push str._WARN___d___before_create__delete_file__s___error__d_.
call fcn.00414401
add esp, 0x10
push edi
push 1
lea ecx, [ebp - 0x48]
call fcn.00401587
or dword [ebp - 4], 0xffffffff
push edi
push 1
lea ecx, [ebp - 0x2c]
call fcn.00402a5a
push edi
mov ebx, 0x80
push ebx
push 2
push edi
push edi
mov edi, 0x40000000
push edi
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
call esi
push dword [ebp - 0x54]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x4c], eax
call fcn.004029c1
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 2
call fcn.00419832
pop ecx
mov byte [ebp - 4], 3
cmp dword [eax + 0x14], 0x10
jb 0x4127b5
mov eax, dword [eax]
mov dword [ebp - 0x5c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x4c]
push dword [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x4d4770]
push eax
push str._INFO___d___create_file__s___hFile__d___error__d_.
call fcn.00414401
add esp, 0x14
push 0
push 1
lea ecx, [ebp - 0x48]
call fcn.00401587
or dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x2c]
call fcn.00402a5a
cmp dword [ebp - 0x4c], 0xffffffff
jne 0x4128aa
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x41289a
push 0
push ebx
push 3
push 0
push 3
push edi
push dword [ebp - 0x54]
call esi
push dword [ebp - 0x54]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x4c], eax
call fcn.004029c1
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 4
call fcn.00419832
pop ecx
mov byte [ebp - 4], 5
cmp dword [eax + 0x14], 0x10
jb 0x412855
mov esi, dword [eax]
jmp 0x412857
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x4c]
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x4d4770]
push eax
push str._INFO___d___open_file__s__for_write__hFile__d___error__d_.
call fcn.00414401
add esp, 0x14
xor ebx, ebx
push ebx
push 1
lea ecx, [ebp - 0x48]
call fcn.00401587
push ebx
push 1
lea ecx, [ebp - 0x2c]
call fcn.00402a5a
cmp dword [ebp - 0x4c], 0xffffffff
jne 0x4128ac
mov esi, dword [ebp - 0x50]
push dword [ebp - 0x54]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, esi
jmp 0x41291c
xor ebx, ebx
mov edi, dword [ebp + 0xc]
cmp edi, ebx
jl 0x4128f9
mov esi, dword [ebp + 8]
jg 0x4128bc
cmp esi, ebx
jbe 0x4128f9
push ebx
lea eax, [ebp - 0x5c]
push eax
push esi
push dword [ebp - 0x4c]
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x5c], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x60], eax
cmp eax, 0xffffffff
je 0x4128fc
cmp eax, esi
jne 0x4128fc
cmp dword [ebp - 0x5c], edi
jne 0x4128fc
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
and esi, 0xfffffffe
add esi, 2
jmp 0x4128ff
mov dword [ebp - 0x50], ebx
mov esi, dword [ebp - 0x50]
cmp dword [ebp - 0x4c], ebx
je 0x412913
cmp dword [ebp - 0x4c], 0xffffffff
je 0x412913
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, ebx
je 0x4128a6
jmp 0x41289d
push 3
pop eax
call fcn.00481188
ret