Function at 0x540b90
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x324
mov ecx, dword [ebp + 8]
xor eax, eax
push ebx
xor ebx, ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x10], ebx
xor esi, esi
mov dword [ebp - 0xc], edi
cmp dword [ebp + 0x28], 2
mov dword [ebp - 4], ebx
setne al
mov dword [ebp - 8], ebx
mov dword [ebp - 0x14], ebx
lea eax, [eax*8 + 0x18]
mov dword [ebp - 0x1c], eax
test ecx, ecx
je 0x540be0
push 0x6a1cc0
push ecx
call sub.MSVCRT.dll__wfopen
mov ebx, eax
add esp, 8
mov dword [ebp - 0x10], ebx
jmp 0x540c0a
cdq
and edx, 7
add eax, edx
sar eax, 3
imul eax, dword [ebp + 0x10]
imul eax, dword [ebp + 0x14]
add eax, 0x8000
push eax
push 0
push dword [0xb2ad40]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0xc], edi
test ebx, ebx
jne 0x540c16
test edi, edi
je 0x540efd
push 0
push 0
push 0
push str.1.6.19
call fcn.005aeb80
add esp, 0x10
mov dword [ebp - 4], eax
test eax, eax
je 0x540ea2
push 0x40
push sub.MSVCRT.dll_longjmp
push eax
call fcn.005a9be0
push 0
push eax
call sub.MSVCRT.dll__setjmp3
add esp, 0x14
test eax, eax
je 0x540ca7
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
call fcn.005aec60
mov eax, dword [ebp - 0x14]
add esp, 8
test eax, eax
je 0x540c70
push eax
call fcn.00564948
add esp, 4
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x540c94
push eax
call sub.MSVCRT.dll_fclose
add esp, 4
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
push dword [ebp - 0xc]
call fcn.00568670
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x540cbc
push ebx
push dword [ebp - 4]
call fcn.005a5380
add esp, 8
jmp 0x540cce
push dword [ebp - 0xc]
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 4]
call fcn.00540f40
add esp, 0xc
push dword [ebp - 4]
call fcn.005a4290
push 8
push 0
push dword [ebp - 4]
mov dword [ebp - 8], eax
call fcn.005af600
push 9
push dword [ebp - 4]
call fcn.005af5e0
mov ecx, dword [ebp + 0x24]
add esp, 0x18
lea eax, [ecx - 1]
cmp eax, 7
ja 0x540e06
push dword [ebp + 0x20]
mov esi, dword [ebp + 0x10]
mov eax, 1
push ecx
push dword [ebp + 0x18]
shl eax, cl
push dword [ebp - 0x1c]
mov dword [ebp - 0x18], eax
push dword [ebp + 0x14]
push esi
push dword [ebp + 0xc]
call fcn.0056478d
push 0
push 0
push 0
push 3
push dword [ebp + 0x24]
mov edi, eax
push dword [ebp + 0x14]
mov dword [ebp - 0x14], edi
push esi
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.005b0bb0
mov eax, dword [ebp - 0x18]
add esp, 0x40
test eax, eax
jle 0x540d81
lea ecx, [ebp - 0x323]
mov esi, eax
lea edx, [edi + 0x51]
jmp 0x540d60
movzx eax, byte [edx + 1]
lea edx, [edx + 4]
mov byte [ecx - 1], al
lea ecx, [ecx + 3]
movzx eax, byte [edx - 4]
mov byte [ecx - 3], al
movzx eax, byte [edx - 5]
mov byte [ecx - 2], al
dec esi
jne 0x540d60
mov eax, dword [ebp - 0x18]
push eax
lea eax, [ebp - 0x324]
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.005b0c70
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.005b00d0
add esp, 0x18
test byte [ebp + 0x1c], 2
je 0x540dd4
mov esi, dword [ebp + 0x14]
dec esi
js 0x540dfb
mov edi, edi
push esi
push edi
call fcn.00564994
push eax
push dword [ebp - 4]
call fcn.005b04e0
add esp, 0x10
dec esi
jns 0x540db0
push edi
call fcn.00564948
add esp, 4
jmp 0x540e82
xor esi, esi
cmp dword [ebp + 0x14], esi
jle 0x540dfb
mov ebx, dword [ebp + 0x14]
mov edi, edi
push esi
push edi
call fcn.00564994
push eax
push dword [ebp - 4]
call fcn.005b04e0
inc esi
add esp, 0x10
cmp esi, ebx
jl 0x540de0
mov ebx, dword [ebp - 0x10]
push edi
call fcn.00564948
add esp, 4
jmp 0x540e82
mov esi, dword [ebp + 0x14]
push 0
push 0
push 0
push dword [ebp + 0x28]
push 8
push esi
push dword [ebp + 0x10]
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.005b0bb0
push dword [ebp - 4]
call fcn.005ae9f0
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.005b00d0
add esp, 0x30
test byte [ebp + 0x1c], 2
je 0x540e64
lea edi, [esi - 1]
imul edi, dword [ebp + 0x18]
add edi, dword [ebp + 0xc]
test esi, esi
jle 0x540e82
lea ecx, [ecx]
push edi
push dword [ebp - 4]
call fcn.005b04e0
sub edi, dword [ebp + 0x18]
add esp, 8
dec esi
jne 0x540e50
jmp 0x540e82
mov edi, dword [ebp + 0xc]
test esi, esi
jle 0x540e82
jmp 0x540e70
push edi
push dword [ebp - 4]
call fcn.005b04e0
add edi, dword [ebp + 0x18]
add esp, 8
dec esi
jne 0x540e70
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.005af890
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
call fcn.005aec60
add esp, 0x10
mov esi, 1
test ebx, ebx
je 0x540ec7
push ebx
call sub.MSVCRT.dll_fclose
add esp, 4
test esi, esi
jne 0x540efd
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
test esi, esi
je 0x540eec
push 1
push dword [ebp - 0x20]
call fcn.00568610
mov edi, eax
test edi, edi
je 0x540eec
push dword [ebp - 0x20]
push dword [ebp - 0xc]
push edi
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov esi, edi
push dword [ebp - 0xc]
push 0
push dword [0xb2ad40]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24