Function at 0x40fb80
Capabilities:
Delete file
Move file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47af2b
mov eax, dword fs:[0]
push eax
sub esp, 0x670
mov eax, dword [0x4a90d4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [0x4a9070]
mov edi, dword [ebp + 0x10]
cmp eax, 0xffffffff
jne 0x40fc42
push 0x80000002
push 0
lea ecx, [ebp - 0x658]
mov dword [0x4a9070], 3
call fcn.00422300
push 0x20119
push 0x80000002
push str.SoftwareMicrosoftWindows_NTCurrentVersionWinlogonCMGShield
lea ecx, [ebp - 0x658]
mov dword [ebp - 4], 0
call fcn.00422610
test eax, eax
je 0x40fc1e
push 0
push str.LogSize
lea ecx, [ebp - 0x658]
call fcn.00422370
test eax, eax
mov ecx, 3
cmove eax, ecx
jmp 0x40fc23
mov eax, dword [0x4a9070]
shl eax, 0x14
lea ecx, [ebp - 0x658]
mov dword [0x4a9070], eax
mov dword [ebp - 4], 0xffffffff
call fcn.00422330
mov eax, dword [0x4a9070]
cmp dword [ebp + 8], eax
jbe 0x40ff91
push 0x80000002
push 0
lea ecx, [ebp - 0x668]
call fcn.00422300
push 0x20119
push 0x80000002
push str.SoftwareMicrosoftWindows_NTCurrentVersionWinlogonCMGShield
lea ecx, [ebp - 0x668]
mov dword [ebp - 4], 1
xor ebx, ebx
call fcn.00422610
test eax, eax
je 0x40fca1
push ebx
push str.RollOvers
lea ecx, [ebp - 0x668]
call fcn.00422370
mov ebx, eax
mov eax, 9
test ebx, ebx
cmovle ebx, eax
push 0
push 4
push 4
push 0
push 1
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x640], eax
cmp eax, 0xffffffff
je 0x40fd91
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0xa
push 0x105
lea eax, [ebp - 0x21c]
push eax
push 0
push 0
call fcn.00410f70
mov ecx, 0x105
sub ecx, eax
push str.____ROLLING_OVER_LOG_FILE______r_n
push ecx
lea ecx, [ebp - 0x21c]
lea eax, [ecx + eax*2]
push eax
call fcn.0043703a
add esp, 0x20
mov dword [ebp - 0x644], 0
mov eax, 0x110
call fcn.00428b10
mov esi, esp
test esi, esi
je 0x40fd85
mov dword [esi], 0xcccc
add esi, 8
je 0x40fd85
push 0xffffffffffffffff
lea eax, [ebp - 0x21c]
push eax
push 0x105
lea eax, [ebp - 0x644]
push esi
push eax
call fcn.00437be4
mov ecx, esi
add esp, 0x14
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40fd51
push 0
lea eax, [ebp - 0x648]
sub ecx, edx
push eax
push ecx
push esi
push dword [ebp - 0x640]
call dword [sym.imp.KERNEL32.dll_WriteFile]
add esi, 0xfffffff8
cmp dword [esi], 0xdddd
jne 0x40fd85
push esi
call fcn.0043609c
add esp, 4
push dword [ebp - 0x640]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x2e
push edi
call fcn.0042e8b4
mov ecx, eax
xor edx, edx
dec ebx
mov dword [ebp - 0x644], ecx
add esp, 8
mov word [ecx], dx
lea eax, [ecx + 2]
mov dword [ebp - 0x640], eax
test ebx, ebx
jle 0x40fe1b
push eax
lea esi, [ebx - 1]
push esi
push edi
push str._s._d._s
lea eax, [ebp - 0x63c]
push 0xffffffffffffffff
push eax
call fcn.0040b5a0
push dword [ebp - 0x640]
lea eax, [ebp - 0x42c]
push ebx
push edi
push str._s._d._s
push 0xffffffffffffffff
push eax
call fcn.0040b5a0
add esp, 0x30
lea eax, [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x42c]
push eax
lea eax, [ebp - 0x63c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
mov eax, dword [ebp - 0x640]
mov ebx, esi
test ebx, ebx
jg 0x40fdb7
push eax
push 0
push edi
push str._s._d._s
lea eax, [ebp - 0x42c]
push 0xffffffffffffffff
push eax
call fcn.0040b5a0
mov eax, dword [ebp - 0x644]
add esp, 0x18
mov ecx, 0x2e
mov word [eax], cx
lea eax, [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x42c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileW]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push edi
call fcn.00411a90
mov ebx, eax
add esp, 8
cmp ebx, 0xffffffff
je 0x40ff86
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40fec2
push 1
lea eax, [ebp - 0x67c]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x40fec2
push 0
push 0
push 1
lea eax, [ebp - 0x67c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x40fec2
lea eax, [ebp - 0x67c]
push eax
push 4
push edi
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
push 2
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0xa
push 0x105
lea eax, [ebp - 0x21c]
push eax
push 0
push 0
call fcn.00410f70
mov ecx, 0x105
sub ecx, eax
push str.____LOG_FILE_ROLLED_OVER______r_n
push ecx
lea ecx, [ebp - 0x21c]
lea ecx, [ecx + eax*2]
push ecx
call fcn.0043703a
add esp, 0x20
mov dword [ebp - 0x644], 0
mov eax, 0x110
call fcn.00428b10
mov esi, esp
test esi, esi
je 0x40ff7f
mov dword [esi], 0xcccc
add esi, 8
je 0x40ff7f
push 0xffffffffffffffff
lea eax, [ebp - 0x21c]
push eax
push 0x105
lea eax, [ebp - 0x644]
push esi
push eax
call fcn.00437be4
mov ecx, esi
add esp, 0x14
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ff50
push 0
lea eax, [ebp - 0x648]
sub ecx, edx
push eax
push ecx
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
add esi, 0xfffffff8
cmp dword [esi], 0xdddd
jne 0x40ff7f
push esi
call fcn.0043609c
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x668]
call fcn.00422330
lea esp, [ebp - 0x68c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00428a63
mov esp, ebp
pop ebp
ret