Function at 0x40fd50
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4787e9
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
mov eax, dword [0x49c100]
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 edi, ecx
mov eax, dword [edi + 0x68]
test eax, eax
je 0x40fddd
cmp dword [edi + 0xfc], 0
je 0x40fdb2
mov ecx, dword [edi + 0xfc]
mov dword [ebp - 0x74], eax
test ecx, ecx
jne 0x40fda3
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xbad_function_call_void_]
mov eax, dword [ecx]
lea edx, [ebp - 0x74]
push edx
lea esi, [edi + 0x6c]
push esi
call dword [eax + 8]
jmp 0x40fdb5
lea esi, [edi + 0x6c]
push dword [edi + 0x68]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [edi + 0x68], 0
cmp dword [edi + 0x124], 0
je 0x40fddd
mov ecx, dword [edi + 0x124]
push esi
mov eax, dword [ecx]
call dword [eax + 8]
mov esi, dword [edi + 0x58]
test esi, esi
je 0x40ff33
lea eax, [edi + 0x3c]
lea ebx, [esi - 1]
mov edx, eax
push ebx
lea ecx, [ebp - 0x40]
call fcn.00411d00
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x70]
cmp dword [ebp - 0x2c], 0xf
lea eax, [ebp - 0x40]
push ecx
cmova eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
add esp, 0xc
test eax, eax
jne 0x40feef
push esi
lea edx, [edi + 0x3c]
lea ecx, [ebp - 0x28]
call fcn.00411d00
mov byte [ebp - 4], 1
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 0xf
mov esi, dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
cmova eax, dword [ebp - 0x28]
push eax
call esi
cmp dword [ebp - 0x14], 0xf
lea ecx, [ebp - 0x28]
lea eax, [ebp - 0x40]
cmova ecx, dword [ebp - 0x28]
cmp dword [ebp - 0x2c], 0xf
push ecx
cmova eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_rename]
add esp, 0x10
test eax, eax
je 0x40fea9
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x14], 0xf
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
push eax
call esi
cmp dword [ebp - 0x14], 0xf
lea ecx, [ebp - 0x28]
lea eax, [ebp - 0x40]
cmova ecx, dword [ebp - 0x28]
cmp dword [ebp - 0x2c], 0xf
push ecx
cmova eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_rename]
add esp, 0xc
test eax, eax
jne 0x40ff67
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x14]
cmp ecx, 0xf
jbe 0x40fedd
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40fed3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ff2d
push ecx
push edx
call fcn.0047613e
add esp, 8
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0xf
jbe 0x40ff26
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40ff1c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ff2d
push ecx
push edx
call fcn.0047613e
add esp, 8
mov esi, ebx
jmp 0x40fde0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
cmp dword [edi + 0x7c], 0
lea ecx, [edi + 0x60]
je 0x40ffec
push 1
lea eax, [ecx + 0xc]
push eax
call fcn.004053b0
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.00475cb4
mov esp, ebp
pop ebp
ret
lea ecx, [edi + 0x60]
push ecx
call fcn.004056a0
mov dword [edi + 0x5c], 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
lea edx, [ebp - 0x28]
lea ecx, [ebp - 0x8c]
mov edi, dword [eax]
call fcn.00402760
mov esi, eax
lea edx, [ebp - 0x40]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xa4]
call fcn.00402760
push eax
lea eax, [ebp - 0xbc]
mov byte [ebp - 4], 3
push str.rotating_file_sink:_failed_renaming
push eax
call fcn.00409cd0
push str._to
push eax
lea eax, [ebp - 0xd4]
mov byte [ebp - 4], 4
push eax
call fcn.00407750
push esi
push eax
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 5
push eax
call fcn.004077a0
add esp, 0x24
mov edx, edi
mov byte [ebp - 4], 6
mov ecx, eax
call fcn.004025c0
sub esp, 0x18
mov ecx, esp
push str.Failed_re_opening_file___was_not_opened_before
call fcn.004070f0
call fcn.00402660
int3