Function at 0x4049c0
Capabilities:
Delete file
Move file

Disassembly:
sub esp, 0x8b0
mov eax, dword [0x48e0ec]
xor eax, esp
mov dword [esp + 0x8ac], eax
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov dword [esp + 0x14], 0
mov edi, dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
xor al, al
mov byte [esp + 0x13], al
xor eax, eax
mov dword [esp + 0x18], eax
cmp byte [ebp + 0xc], al
jne 0x4049fd
mov byte [ebp + 0xc], 1
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x404c32
mov eax, dword [ebx + 8]
cmp eax, 2
je 0x404a15
cmp eax, 4
jne 0x404a7d
push dword [ebx + 4]
push dword [ebp]
call fcn.004046f0
add esp, 8
mov esi, eax
lea eax, [esp + 0x2a4]
push 0x104
push eax
push 0xffffffffffffffff
push esi
push 0
push 0xfde9
call edi
test eax, eax
je 0x404a50
lea eax, [esp + 0x2a4]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
push esi
call fcn.00442387
push dword [ebx + 4]
push dword [ebp]
call fcn.00403b80
xor eax, eax
add esp, 0xc
cmp dword [ebx + 8], 2
mov cl, 1
mov byte [esp + 0x13], cl
setne al
lea eax, [eax*2 + 1]
mov dword [ebx + 8], eax
mov eax, dword [ebx + 8]
cmp eax, 1
je 0x404a8e
cmp eax, 5
jne 0x404b6c
push dword [ebx + 4]
push dword [ebp]
call fcn.004046f0
mov edi, eax
mov eax, dword [ebx]
inc eax
push eax
push dword [ebp + 8]
lea eax, [esp + 0x2c]
push str.TMP__d__d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x34]
push eax
push dword [ebp]
call fcn.004046f0
add esp, 0x20
mov esi, eax
lea eax, [esp + 0x6b4]
push 0x104
push eax
push 0xffffffffffffffff
push esi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
test eax, eax
je 0x404b2e
push 0x104
lea eax, [esp + 0x4b0]
push eax
push 0xffffffffffffffff
push edi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
test eax, eax
je 0x404b2e
push 3
lea eax, [esp + 0x4b0]
push eax
lea eax, [esp + 0x6bc]
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileExW]
test eax, eax
setne al
test al, al
je 0x404b2e
mov byte [esp + 0x13], 1
jmp 0x404b46
cmp dword [esp + 0x14], 5
mov dword [esp + 0x18], 0x12
jne 0x404b57
push esi
call fcn.00403d80
add esp, 4
xor eax, eax
mov ecx, 3
cmp dword [ebx + 8], 5
cmove eax, ecx
mov dword [ebx + 8], eax
push esi
call fcn.00442387
push edi
call fcn.00442387
mov edi, dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
add esp, 8
cmp dword [ebx + 8], 0
jne 0x404bf1
push dword [ebx]
lea eax, [esp + 0x60]
push dword [ebp + 8]
push str.TMP__d__d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x6c]
push eax
push dword [ebp]
call fcn.004046f0
add esp, 0x18
mov esi, eax
lea eax, [esp + 0x9c]
push 0x104
push eax
push 0xffffffffffffffff
push esi
push 0
push 0xfde9
call edi
test eax, eax
je 0x404bd9
lea eax, [esp + 0x9c]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
jne 0x404bd9
push 4
push eax
lea eax, [esp + 0xa4]
push eax
call dword [sym.imp.KERNEL32.DLL_MoveFileExW]
push esi
call fcn.00442387
mov cl, 1
mov dword [ebx + 8], 3
add esp, 4
mov byte [esp + 0x13], cl
jmp 0x404bf5
mov cl, byte [esp + 0x13]
mov ebx, dword [ebx + 0xc]
test ebx, ebx
jne 0x404a08
mov eax, dword [esp + 0x18]
test eax, eax
je 0x404c32
mov edi, dword [esp + 0x14]
inc edi
cmp edi, 5
jg 0x404c32
xor eax, eax
test cl, cl
cmovne edi, eax
mov eax, 0x64
mov ecx, edi
mov dword [esp + 0x14], edi
shl eax, cl
push eax
call dword [sym.imp.KERNEL32.DLL_Sleep]
jmp 0x4049e2
mov ecx, dword [esp + 0x8bc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00423c9a
add esp, 0x8b0
ret