Function at 0x40cc9a
Capabilities:
Check if file exists
Write file on windows

Disassembly:
push 0x4c
mov eax, 0x4245c9
call fcn.004231c0
mov esi, edx
mov edi, ecx
push esi
push edi
push 0x42c064
mov ebx, 0x4269f0
push ebx
call fcn.00419776
xor eax, eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
push esi
lea edx, [ebp - 0x44]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x50]
call fcn.00416574
add esp, 0x14
test eax, eax
je 0x40ce31
mov eax, dword [ebp - 0x50]
cmp eax, dword [ebp - 0x4c]
je 0x40ce31
push 0x42c0e4
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
mov ebx, eax
mov dword [ebp - 0x58], ebx
pop ecx
pop ecx
test ebx, ebx
jne 0x40cd21
push edi
push str.open_file___s__failed
push 0x4269f0
jmp 0x40ce42
push 2
push 0
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
add esp, 0xc
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
pop ecx
test eax, eax
jne 0x40cd57
push ebx
push 1
lea eax, [ebp - 0x38]
mov word [ebp - 0x38], 0xbbef
push 3
push eax
mov byte [ebp - 0x36], 0xbf
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
and dword [ebp - 0x18], 0
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov byte [ebp - 4], 2
and dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x50]
mov dword [ebp - 0x34], 1
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x54], eax
cmp esi, eax
je 0x40ce00
mov ecx, dword [esi]
sub ecx, 0x10
call fcn.00406d2d
add eax, 0x10
mov dword [ebp - 0x38], eax
push ecx
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 3
call fcn.0040628b
mov edi, dword [ebp - 0x38]
cmp dword [edi - 0xc], 3
jl 0x40cde9
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40cde9
cmp dword [edi - 4], 1
jle 0x40cdcb
push dword [edi - 0xc]
lea ecx, [ebp - 0x38]
call fcn.0040161a
mov edi, dword [ebp - 0x38]
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x34]
push eax
push ecx
push ecx
mov ecx, edi
call fcn.0040c514
add esp, 0x10
lea ecx, [ebp - 0x38]
push 0xffffffffffffffff
call fcn.00406678
lea ecx, [edi - 0x10]
mov byte [ebp - 4], 2
call fcn.0040188c
add esi, 4
cmp esi, dword [ebp - 0x54]
jne 0x40cd86
mov ebx, dword [ebp - 0x58]
push str._________________________________________r_n
push ebx
call fcn.0040d0e1
push dword [ebp - 0x2c]
push str.Total_Files:__d
push ebx
call fcn.0040d0e1
add esp, 0x14
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
pop ecx
lea ecx, [ebp - 0x28]
call fcn.0040d0b1
xor ebx, ebx
inc ebx
jmp 0x40ce4c
test esi, esi
mov eax, 0x42b7cc
cmovne eax, esi
push eax
push str.LogFilesMd5ToFile_failed__MD5_s
push ebx
call fcn.00419776
add esp, 0xc
xor ebx, ebx
mov esi, dword [ebp - 0x44]
test esi, esi
je 0x40ce88
mov edi, dword [ebp - 0x40]
cmp esi, edi
je 0x40ce6e
mov ecx, dword [esi]
sub ecx, 0x10
call fcn.0040188c
add esi, 4
cmp esi, edi
jne 0x40ce5a
mov esi, dword [ebp - 0x44]
mov edx, dword [ebp - 0x3c]
mov ecx, esi
sub edx, esi
and edx, 0xfffffffc
call fcn.004082f6
xor eax, eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov esi, dword [ebp - 0x50]
test esi, esi
je 0x40ceb9
mov edi, dword [ebp - 0x4c]
cmp esi, edi
je 0x40ceaa
mov ecx, dword [esi]
sub ecx, 0x10
call fcn.0040188c
add esi, 4
cmp esi, edi
jne 0x40ce96
mov esi, dword [ebp - 0x50]
mov edx, dword [ebp - 0x48]
mov ecx, esi
sub edx, esi
and edx, 0xfffffffc
call fcn.004082f6
mov eax, ebx
call fcn.0042316a
ret