Function at 0x404a90
Capabilities:
Delete file

Disassembly:
mov eax, 0xe31c
call fcn.0044cc00
push ebx
push ebp
push esi
push edi
xor ebp, ebp
mov ecx, 0x2edf
xor eax, eax
lea edi, [esp + 0x27ae]
mov word [esp + 0x27ac], bp
mov esi, dword [esp + 0xe338]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x20]
push esi
push eax
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], ebp
call fcn.00439960
add esp, 8
cmp word [esp + 0x20], bp
je 0x404d4d
push esi
call fcn.0043a6c0
add esp, 4
mov edi, eax
cmp edi, ebp
mov dword [esp + 0x1c], edi
push 0x4531e4
je 0x404b06
lea ecx, [esp + 0x24]
push ecx
call fcn.0043a600
jmp 0x404b11
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.MSVCRT.dll__wfopen]
add esp, 8
mov dword [esp + 0x10], eax
push 0x4531dc
push esi
call fcn.0043a600
mov ebx, eax
mov eax, dword [esp + 0x18]
add esp, 8
cmp eax, ebp
je 0x404d4d
cmp ebx, ebp
je 0x404d4d
push edi
push 0x800
push 0x45ece8
push eax
call fcn.004385d0
add esp, 0x10
test eax, eax
je 0x404d06
mov ebp, dword [esp + 0xe330]
mov esi, dword [sym.imp.MSVCRT.dll_fwprintf]
cmp word [0x45ece8], 0
je 0x404cc0
push 0x45ece8
call fcn.00404730
add esp, 4
test eax, eax
je 0x404bce
mov ecx, 0x961
xor eax, eax
lea edi, [esp + 0x228]
push 0x45ece8
rep stosd dword es:[edi], eax
lea eax, [esp + 0x22c]
push eax
call fcn.00404690
add esp, 8
test eax, eax
je 0x404ce4
push 0x45ece8
push str._s_r_n
push ebx
call esi
add esp, 0xc
mov dword [esp + 0x14], 1
jmp 0x404cb2
mov eax, dword [esp + 0x14]
test eax, eax
je 0x404ca2
push 0x45ece8
call fcn.00404720
add esp, 4
test eax, eax
jne 0x404ca2
mov ecx, 0x2ee0
lea edi, [esp + 0x27ac]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x228]
lea edx, [esp + 0x27ac]
push ecx
push edx
push 0x45ece8
call fcn.004047c0
add esp, 0xc
test eax, eax
jne 0x404c28
mov word [esp + 0x20], ax
jmp 0x404cc0
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x404c8f
mov edi, dword [esp + 0xe334]
lea eax, [esp + 0x27ac]
push edi
push eax
call fcn.00404410
add esp, 8
test eax, eax
je 0x404c8f
add edi, 0x40
add eax, 0x40
push edi
push eax
call dword [sym.imp.MSVCRT.dll_wcscmp]
add esp, 8
test eax, eax
jne 0x404c8f
lea ecx, [esp + 0x27ac]
push ebp
push ecx
call fcn.00404410
add esp, 8
test eax, eax
je 0x404c8f
lea edx, [ebp + 0x40]
add eax, 0x40
push edx
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
mov dword [esp + 0x18], 1
lea eax, [esp + 0x27ac]
push eax
push ebx
call fcn.00404f50
add esp, 8
jmp 0x404cb2
push 0x45ece8
push str._s_r_n
push ebx
call esi
add esp, 0xc
mov ecx, 0x400
xor eax, eax
mov edi, 0x45ece8
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
push ecx
push 0x800
push 0x45ece8
push edx
call fcn.004385d0
add esp, 0x10
test eax, eax
jne 0x404b65
mov eax, dword [esp + 0x14]
test eax, eax
je 0x404cfd
mov ecx, dword [esp + 0x18]
xor eax, eax
test ecx, ecx
setne al
mov edi, eax
xor ebp, ebp
jmp 0x404d18
mov esi, dword [esp + 0xe338]
xor ebp, ebp
push esi
mov word [esp + 0x24], bp
call dword [sym.imp.MSVCRT.dll__wremove]
add esp, 4
or edi, 0xffffffff
mov ecx, dword [esp + 0x10]
mov esi, dword [sym.imp.MSVCRT.dll_fclose]
push ecx
call esi
push ebx
call esi
add esp, 8
cmp word [esp + 0x20], bp
je 0x404d40
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.MSVCRT.dll__wremove]
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe31c
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0xe31c
ret