Function at 0x58c94a
Capabilities:
Clear file content
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x84c
push ebx
push esi
push edi
lea eax, [ebp - 0x448]
push eax
call fcn.00401aa4
mov esi, dword [ebp + 8]
push 3
push esi
call fcn.0058d20d
mov ebx, edx
push ebx
mov dword [ebp - 0x10], eax
push eax
mov eax, esi
mov dword [ebp - 0xc], ebx
call fcn.0058c762
mov byte [ebp - 1], al
test al, al
lea eax, [ebp - 0x240]
je 0x58c99f
push str..tmp
push eax
lea eax, [ebp - 0x448]
push eax
call fcn.004a21be
jmp 0x58c9a7
push eax
mov eax, dword [esi]
call fcn.00401016
lea eax, [ebp - 0x240]
push eax
lea esi, [ebp - 0x14]
call fcn.004476b9
mov esi, dword [ebp - 0x14]
cmp esi, 0xffffffff
jne 0x58c9d2
lea ecx, [ebp - 0x448]
call fcn.004a32d9
xor al, al
pop edi
pop esi
pop ebx
leave
ret 8
cmp byte [ebp - 1], 0
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
je 0x58c9f5
push ebx
push dword [ebp - 0x10]
xor eax, eax
push eax
push eax
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 8]
call fcn.0058cf5c
jmp 0x58ca00
push 0
push 0
push ebx
push dword [ebp - 0x10]
push esi
call edi
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0xc]
call fcn.0058d3a2
test al, al
jne 0x58ca28
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor bl, bl
lea ecx, [ebp - 0x448]
call fcn.004a32d9
mov al, bl
jmp 0x58c9cb
cmp byte [ebp - 1], 0
je 0x58cb65
mov eax, dword [ebp + 8]
push 0x3e8
push dword [eax]
lea esi, [ebp - 8]
call fcn.004474c3
cmp dword [ebp - 8], 0xffffffff
je 0x58cb6c
push 2
xor ecx, ecx
push ecx
push ecx
xor eax, eax
push eax
push dword [ebp - 8]
call edi
mov eax, esi
push eax
call fcn.004019a4
cmp edx, ebx
ja 0x58ca77
jb 0x58cb5a
cmp eax, dword [ebp - 0x10]
jbe 0x58cb5a
sub eax, dword [ebp - 0x10]
push 0
push 0
push dword [ebp - 0xc]
sbb edx, ebx
push dword [ebp - 0x10]
mov esi, edx
push dword [ebp - 8]
mov ebx, eax
mov dword [ebp - 0x34], esi
call edi
xor ecx, ecx
mov eax, ebx
shrd eax, esi, 0xa
shr esi, 0xa
cmp esi, ecx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], ecx
jb 0x58cb1d
ja 0x58cabf
cmp eax, ecx
jbe 0x58cb1d
mov edi, 0x400
push edi
lea eax, [ebp - 0x848]
push eax
lea eax, [ebp - 8]
push eax
call fcn.00401f65
add dword [ebp - 0x10], eax
push edi
lea eax, [ebp - 0x848]
adc dword [ebp - 0xc], 0
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.00402005
add dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x10]
adc dword [ebp - 0x24], 0
cmp eax, dword [ebp - 0x28]
jne 0x58cb5a
mov eax, dword [ebp - 0x24]
cmp dword [ebp - 0xc], eax
jne 0x58cb5a
add dword [ebp - 0x20], 1
adc dword [ebp - 0x1c], 0
cmp dword [ebp - 0x1c], esi
jb 0x58cac4
ja 0x58cb1b
mov eax, dword [ebp - 0x30]
cmp dword [ebp - 0x20], eax
jb 0x58cac4
xor ecx, ecx
mov esi, ebx
and esi, 0x3ff
je 0x58cb5a
sub ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x34]
sbb eax, dword [ebp - 0xc]
cmp esi, ebx
jne 0x58cb5a
cmp ecx, eax
jne 0x58cb5a
push esi
lea eax, [ebp - 0x848]
push eax
lea eax, [ebp - 8]
push eax
call fcn.00401f65
push esi
lea eax, [ebp - 0x848]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.00402005
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x58cb6c
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov edi, dword [ebp + 0xc]
mov eax, dword [edi]
push 3
mov ecx, edi
call dword [eax]
mov esi, dword [ebp + 8]
push eax
lea eax, [ebp - 0x14]
push eax
push esi
call fcn.0058d0e3
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 1], 0
jne 0x58cba7
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
push eax
call fcn.0058d1dd
mov bl, 1
jmp 0x58ca19
push dword [esi]
lea eax, [ebp - 0x240]
push eax
call fcn.00401a8b
test al, al
je 0x58cbc5
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
push eax
call fcn.0058d1dd
lea eax, [ebp - 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x58cba0