Function at 0x40cde0
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x320
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
xor eax, eax
push edi
xor edi, edi
cmp dword [ebp + 0x28], 2
mov dword [ebp - 0x14], edi
setne al
mov dword [ebp - 0xc], esi
mov dword [ebp - 4], esi
mov dword [ebp - 8], esi
mov dword [ebp - 0x10], esi
lea eax, [eax*8 + 0x18]
mov dword [ebp - 0x18], eax
cmp ebx, esi
je 0x40ce2e
push 0x442090
push ebx
call sub.MSVCRT.dll__wfopen
add esp, 8
mov dword [ebp - 0x14], eax
mov edi, eax
jmp 0x40ce4f
cdq
and edx, 7
add eax, edx
sar eax, 3
imul eax, dword [ebp + 0x10]
imul eax, dword [ebp + 0x14]
add eax, 0x8000
push 1
push eax
call fcn.00416f00
mov dword [ebp - 0xc], eax
test edi, edi
jne 0x40ce5c
cmp dword [ebp - 0xc], esi
je 0x40d142
push 0
push 0
push 0
push str.1.5.12
call fcn.0041c5c0
add esp, 0x10
mov dword [ebp - 4], eax
test eax, eax
je 0x40d0fa
push 0x40
push sub.MSVCRT.dll_longjmp
push eax
call fcn.0041c9d0
push 0
push eax
call sub.MSVCRT.dll__setjmp3
add esp, 0x14
test eax, eax
je 0x40ceef
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 4]
push ecx
call fcn.0041c5f0
mov eax, dword [ebp - 0x10]
add esp, 8
test eax, eax
je 0x40ceb6
push eax
call fcn.00415711
add esp, 4
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40cedb
push eax
call sub.MSVCRT.dll_fclose
mov edx, dword [ebp + 8]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
mov eax, dword [ebp - 0xc]
push eax
call fcn.00417110
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
test eax, eax
je 0x40cf05
push eax
push ecx
call fcn.0041d130
add esp, 8
jmp 0x40cf16
mov edx, dword [ebp - 0xc]
push edx
lea eax, [ebp - 0x20]
push eax
push ecx
call fcn.0040d240
add esp, 0xc
mov edx, dword [ebp - 4]
push edx
call fcn.0041e4c0
push 8
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
push 0
push eax
call fcn.0041b9c0
mov ecx, dword [ebp - 4]
push 9
push ecx
call fcn.0041bd70
mov edi, dword [ebp + 0x24]
lea edx, [edi - 1]
add esp, 0x18
cmp edx, 7
ja 0x40d04e
mov eax, dword [ebp + 0x20]
mov edx, dword [ebp - 0x18]
mov ebx, dword [ebp + 0x14]
push eax
mov eax, dword [ebp + 0x10]
mov ecx, edi
push edi
mov esi, 1
shl esi, cl
mov ecx, dword [ebp + 0x18]
push ecx
mov ecx, dword [ebp + 0xc]
push edx
push ebx
push eax
push ecx
call fcn.00415563
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp - 4]
push 0
push 0
push 0
push 3
push edi
push ebx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
push edx
push eax
push ecx
call fcn.0041edc0
add esp, 0x40
test esi, esi
jle 0x40cfc2
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x31f]
add eax, 0x51
mov edi, esi
movzx edx, byte [eax + 1]
mov byte [ecx - 1], dl
movzx edx, byte [eax]
mov byte [ecx], dl
movzx edx, byte [eax - 1]
mov byte [ecx + 1], dl
add eax, 4
add ecx, 3
dec edi
jne 0x40cfa6
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
push esi
lea eax, [ebp - 0x320]
push eax
push ecx
push edx
call fcn.0041eff0
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
push eax
push ecx
call fcn.0041b220
add esp, 0x18
test byte [ebp + 0x1c], 2
je 0x40d01b
dec ebx
js 0x40d03d
mov edx, dword [ebp - 0x10]
push ebx
push edx
call fcn.00415b92
push eax
mov eax, dword [ebp - 4]
push eax
call fcn.0041b6c0
add esp, 0x10
dec ebx
jns 0x40cff0
mov eax, dword [ebp - 0x10]
push eax
call fcn.00415711
add esp, 4
jmp 0x40d0d2
xor esi, esi
test ebx, ebx
jle 0x40d03d
mov ecx, dword [ebp - 0x10]
push esi
push ecx
call fcn.00415b92
mov edx, dword [ebp - 4]
push eax
push edx
call fcn.0041b6c0
inc esi
add esp, 0x10
cmp esi, ebx
jl 0x40d021
mov eax, dword [ebp - 0x10]
push eax
call fcn.00415711
add esp, 4
jmp 0x40d0d2
mov ecx, dword [ebp + 0x28]
mov edi, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 8]
push 0
push 0
push 0
push ecx
mov ecx, dword [ebp - 4]
push 8
push edi
push edx
push eax
push ecx
call fcn.0041edc0
mov edx, dword [ebp - 4]
push edx
call fcn.0041f350
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
push eax
push ecx
call fcn.0041b220
add esp, 0x30
test byte [ebp + 0x1c], 2
je 0x40d0b4
mov ebx, dword [ebp + 0x18]
lea esi, [edi - 1]
imul esi, ebx
add esi, dword [ebp + 0xc]
test edi, edi
jle 0x40d0d2
mov edi, edi
mov edx, dword [ebp - 4]
push esi
push edx
call fcn.0041b6c0
add esp, 8
sub esi, ebx
dec edi
jne 0x40d0a0
jmp 0x40d0d2
mov esi, dword [ebp + 0xc]
test edi, edi
jle 0x40d0d2
mov ebx, dword [ebp + 0x18]
mov edi, edi
mov eax, dword [ebp - 4]
push esi
push eax
call fcn.0041b6c0
add esp, 8
add esi, ebx
dec edi
jne 0x40d0c0
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
push ecx
push edx
call fcn.0041b520
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 4]
push ecx
call fcn.0041c5f0
mov ebx, dword [ebp + 8]
mov edi, dword [ebp - 0x14]
add esp, 0x10
mov esi, 1
test edi, edi
je 0x40d11d
push edi
call sub.MSVCRT.dll_fclose
add esp, 4
test esi, esi
jne 0x40d142
push ebx
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 0x40d139
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0xc]
push edx
push eax
call fcn.00417290
mov esi, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.00417110
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24