Function at 0x405be0
Capabilities:
Delete file
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x110
mov dword [esp + 0xc], edx
mov ebx, ecx
push 0
call sub.msvcrt.dll_time
add esp, 4
mov ecx, dword [ebx + 0x26c]
test ecx, ecx
mov dword [esp], eax
je 0x405c56
mov esi, dword [0x43e00c]
lea ebp, [esi + eax]
mov edx, 0xc22e4507
mov eax, ebp
imul edx
mov edi, edx
add edi, ebp
mov dword [esp + 4], ebx
mov ebx, edi
shr ebx, 0x1f
sar edi, 0x10
add ecx, esi
mov edx, 0x3dd1baf9
mov eax, ecx
imul edx
mov ebp, edx
add edi, ebx
mov ebx, dword [esp + 4]
sub ebp, ecx
mov eax, ebp
shr eax, 0x1f
sar ebp, 0x10
add ebp, eax
add ebp, edi
mov esi, dword [ebx + 0x168]
test esi, esi
jne 0x405c62
jmp 0x405c6a
xor ebp, ebp
mov esi, dword [ebx + 0x168]
test esi, esi
je 0x405c6a
test ebp, ebp
jle 0x405e55
test esi, esi
je 0x405c90
push esi
call sub.msvcrt.dll_fclose
add esp, 4
mov dword [ebx + 0x168], 0
mov eax, dword [ebx + 0x160]
test eax, eax
jns 0x405ca3
jmp 0x405def
mov ebp, 0x1e
mov eax, dword [ebx + 0x160]
test eax, eax
js 0x405def
xorps xmm0, xmm0
movups xmmword [esp + 0x100], xmm0
movups xmmword [esp + 0xf0], xmm0
movups xmmword [esp + 0xe0], xmm0
movups xmmword [esp + 0xd0], xmm0
movups xmmword [esp + 0xc0], xmm0
movups xmmword [esp + 0xb0], xmm0
movups xmmword [esp + 0xa0], xmm0
movups xmmword [esp + 0x90], xmm0
movups xmmword [esp + 0x80], xmm0
movups xmmword [esp + 0x70], xmm0
movups xmmword [esp + 0x60], xmm0
movups xmmword [esp + 0x50], xmm0
movups xmmword [esp + 0x40], xmm0
movups xmmword [esp + 0x30], xmm0
movups xmmword [esp + 0x20], xmm0
movups xmmword [esp + 0x10], xmm0
cmp ebp, eax
jge 0x405d68
imul eax, eax, 0xfffeae80
add eax, dword [esp]
lea esi, [ebx + 0x54]
mov dword [esp + 8], eax
lea eax, [esp + 8]
push eax
call sub.msvcrt.dll_localtime
add esp, 4
mov ecx, 0x76c
add ecx, dword [eax + 0x14]
mov edx, dword [eax + 0x10]
inc edx
lea edi, [esp + 0x10]
push dword [eax + 0xc]
push edx
push ecx
push esi
push str._s._04d_02d_02d.log
push 0x100
push edi
call fcn.00405bb0
add esp, 0x1c
push edi
call sub.msvcrt.dll_remove
add esp, 4
mov edi, ebx
jmp 0x405de3
lea eax, [ebx + 0x54]
mov dword [esp + 4], eax
imul eax, ebp, 0x15180
inc ebp
mov edi, ebx
mov ebx, dword [esp]
sub ebx, eax
lea esi, [esp + 0x10]
nop word cs:[eax + eax]
mov dword [esp + 8], ebx
lea eax, [esp + 8]
push eax
call sub.msvcrt.dll_localtime
add esp, 4
mov ecx, dword [eax + 0x14]
mov edx, 0x76c
add ecx, edx
mov edx, dword [eax + 0x10]
inc edx
push dword [eax + 0xc]
push edx
push ecx
push dword [esp + 0x10]
push str._s._04d_02d_02d.log
push 0x100
push esi
call fcn.00405bb0
add esp, 0x1c
push esi
call sub.msvcrt.dll_remove
add esp, 4
dec ebp
add ebx, 0x15180
cmp ebp, dword [edi + 0x160]
jg 0x405d90
mov esi, dword [edi + 0x168]
test esi, esi
mov ebx, edi
jne 0x405e55
lea edi, [ebx + 0x54]
lea esi, [ebx + 0x16c]
mov ebp, dword [esp]
mov dword [esp + 0x10], ebp
lea eax, [esp + 0x10]
push eax
call sub.msvcrt.dll_localtime
add esp, 4
mov ecx, 0x76c
add ecx, dword [eax + 0x14]
mov edx, dword [eax + 0x10]
inc edx
push dword [eax + 0xc]
push edx
push ecx
push edi
push str._s._04d_02d_02d.log
push 0x100
push esi
call fcn.00405bb0
add esp, 0x1c
push 0x4388ef
push esi
call sub.msvcrt.dll_fopen
add esp, 8
mov esi, eax
mov dword [ebx + 0x168], eax
mov dword [ebx + 0x26c], ebp
test eax, eax
je 0x405f47
mov eax, dword [ebx + 0x270]
lea ecx, [eax - 1]
mov dword [ebx + 0x270], ecx
test eax, eax
jg 0x405f1f
push 2
push 0
push esi
call sub.msvcrt.dll_fseek
add esp, 0xc
push dword [ebx + 0x168]
call sub.msvcrt.dll_ftell
add esp, 4
mov esi, eax
sar esi, 0x1f
mov ecx, dword [ebx + 0x158]
mov edx, dword [ebx + 0x15c]
cmp ecx, eax
mov edi, edx
sbb edi, esi
jae 0x405efb
push dword [ebx + 0x168]
call sub.msvcrt.dll_fclose
add esp, 4
mov dword [ebx + 0x168], 0
lea esi, [ebx + 0x16c]
push 0x4388f1
push esi
call sub.msvcrt.dll_fopen
add esp, 8
mov dword [ebx + 0x168], eax
test eax, eax
je 0x405f47
push eax
call sub.msvcrt.dll_fclose
add esp, 4
push 0x4388ef
push esi
call sub.msvcrt.dll_fopen
add esp, 8
mov esi, eax
mov dword [ebx + 0x168], eax
test esi, esi
jne 0x405f1f
jmp 0x405f47
sub ecx, eax
sbb edx, esi
mov eax, dword [ebx + 4]
mov esi, dword [ebx + 0x168]
push 0
push eax
push edx
push ecx
call fcn.0040afc4
add esp, 0x10
mov dword [ebx + 0x270], eax
test esi, esi
je 0x405f47
push esi
push dword [esp + 0x128]
push 1
push dword [esp + 0x18]
call sub.msvcrt.dll_fwrite
add esp, 0x10
cmp dword [ebx + 0x164], 0
je 0x405f47
push esi
call sub.msvcrt.dll_fflush
add esp, 4
add esp, 0x110
pop esi
pop edi
pop ebx
pop ebp
ret