Function at 0x460b5c
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x324
mov ecx, dword [ebp + 8]
xor eax, eax
cmp dword [ebp + 0x28], 2
push ebx
push esi
mov ebx, eax
mov dword [ebp - 4], eax
push edi
mov edi, eax
mov dword [ebp - 8], eax
mov esi, eax
mov dword [ebp - 0x14], eax
setne al
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x10], ebx
lea eax, [eax*8 + 0x18]
mov dword [ebp - 0x1c], eax
test ecx, ecx
je 0x460bab
push 0x53e2e0
push ecx
call sub.MSVCRT.dll__wfopen
pop ecx
mov edi, eax
pop ecx
mov dword [ebp - 0xc], edi
jmp 0x460bd5
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 [0xb2c63c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [ebp - 0x10], ebx
test edi, edi
jne 0x460be1
test ebx, ebx
je 0x460e7c
xor ebx, ebx
push ebx
push ebx
push ebx
push 0x53e2d8
call fcn.004ca7d0
add esp, 0x10
mov dword [ebp - 4], eax
test eax, eax
je 0x460e2d
push 0x40
push sub.MSVCRT.dll_longjmp
push eax
call fcn.004c57d0
push ebx
push eax
call sub.MSVCRT.dll__setjmp3
add esp, 0x14
test eax, eax
je 0x460c66
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
call fcn.004ca8b0
pop ecx
pop ecx
cmp dword [ebp - 0x14], ebx
je 0x460c36
push dword [ebp - 0x14]
call fcn.0047f728
pop ecx
cmp dword [ebp - 0xc], ebx
je 0x460c4f
push dword [ebp - 0xc]
call sub.MSVCRT.dll_fclose
pop ecx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x460c5f
push dword [ebp - 0x10]
push ebx
push dword [0xb2c63c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
jmp 0x460e7e
mov edi, dword [ebp - 0xc]
test edi, edi
je 0x460c7a
push edi
push dword [ebp - 4]
call fcn.004c0f20
pop ecx
pop ecx
jmp 0x460c8c
push dword [ebp - 0x10]
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 4]
call fcn.00460eb1
add esp, 0xc
push dword [ebp - 4]
call fcn.004bfe10
push 8
push ebx
push dword [ebp - 4]
mov dword [ebp - 8], eax
call fcn.004cb1d0
push 9
push dword [ebp - 4]
call fcn.004cb1b0
mov ecx, dword [ebp + 0x24]
add esp, 0x18
mov esi, dword [ebp + 0x14]
lea eax, [ecx - 1]
cmp eax, 7
ja 0x460da1
push dword [ebp + 0x20]
xor eax, eax
push ecx
push dword [ebp + 0x18]
inc eax
push dword [ebp - 0x1c]
shl eax, cl
push esi
push dword [ebp + 0x10]
mov dword [ebp - 0x18], eax
push dword [ebp + 0xc]
call fcn.0047f56d
mov ebx, eax
xor eax, eax
push eax
push eax
push eax
push 3
push dword [ebp + 0x24]
mov dword [ebp - 0x14], ebx
push esi
push dword [ebp + 0x10]
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.004cc880
mov ecx, dword [ebp - 0x18]
add esp, 0x40
test ecx, ecx
jle 0x460d31
lea edx, [ebp - 0x323]
mov esi, ecx
lea edi, [ebx + 0x51]
mov al, byte [edi + 1]
mov byte [edx - 1], al
mov al, byte [edi]
lea edi, [edi + 4]
mov byte [edx], al
lea edx, [edx + 3]
mov al, byte [edi - 5]
mov byte [edx - 2], al
dec esi
jne 0x460d12
mov edi, dword [ebp - 0xc]
mov esi, dword [ebp + 0x14]
push ecx
lea eax, [ebp - 0x324]
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.004cc940
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.004cbc90
add esp, 0x18
test byte [ebp + 0x1c], 2
jne 0x460d9c
xor esi, esi
cmp dword [ebp + 0x14], esi
jle 0x460d7d
mov edi, dword [ebp + 0x14]
push esi
push ebx
call fcn.0047f774
push eax
push dword [ebp - 4]
call fcn.004cc0a0
add esp, 0x10
inc esi
cmp esi, edi
jl 0x460d62
mov edi, dword [ebp - 0xc]
push ebx
call fcn.0047f728
pop ecx
jmp 0x460e0d
push esi
push ebx
call fcn.0047f774
push eax
push dword [ebp - 4]
call fcn.004cc0a0
add esp, 0x10
dec esi
jns 0x460d89
jmp 0x460d7d
push ebx
push ebx
push ebx
push dword [ebp + 0x28]
push 8
push esi
push dword [ebp + 0x10]
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.004cc880
push dword [ebp - 4]
call fcn.004c5ed0
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.004cbc90
add esp, 0x30
test byte [ebp + 0x1c], 2
je 0x460df5
lea ebx, [esi - 1]
imul ebx, dword [ebp + 0x18]
add ebx, dword [ebp + 0xc]
test esi, esi
jle 0x460e0d
push ebx
push dword [ebp - 4]
call fcn.004cc0a0
sub ebx, dword [ebp + 0x18]
pop ecx
pop ecx
dec esi
jne 0x460de2
jmp 0x460e0d
mov ebx, dword [ebp + 0xc]
test esi, esi
jle 0x460e0d
push ebx
push dword [ebp - 4]
call fcn.004cc0a0
add ebx, dword [ebp + 0x18]
pop ecx
pop ecx
dec esi
jne 0x460dfc
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.004cb460
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
call fcn.004ca8b0
xor esi, esi
add esp, 0x10
inc esi
xor ebx, ebx
test edi, edi
je 0x460e47
push edi
call sub.MSVCRT.dll_fclose
pop ecx
test esi, esi
jne 0x460e7c
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x460e7c
test esi, esi
je 0x460e6c
push 1
push dword [ebp - 0x20]
call fcn.00484d50
mov edi, eax
test edi, edi
je 0x460e6c
push dword [ebp - 0x20]
push dword [ebp - 0x10]
push edi
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov esi, edi
push dword [ebp - 0x10]
push ebx
push dword [0xb2c63c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24