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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4221a5
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x432034]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
push esi
push edi
mov eax, dword [0x432034]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ebx, ecx
push ebx
push eax
mov edi, 0x42707c
push 0x428bec
mov ecx, edi
mov dword [esp + 0x1c], eax
call fcn.00416d9e
xor esi, esi
add esp, 0xc
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x70], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
push ebx
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x20]
push eax
mov byte [esp + 0x7c], 1
call fcn.004144e3
add esp, 0xc
test eax, eax
je 0x40c04a
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x18], eax
je 0x40c04a
push 0x428c6c
push dword [esp + 0x14]
call dword [sym.imp.MSVCR100.dll__wfopen]
mov ebx, eax
pop ecx
pop ecx
cmp ebx, esi
jne 0x40bef5
push dword [esp + 0x10]
push str.open_file___s__failed
jmp 0x40c059
push 2
push esi
push ebx
call dword [sym.imp.MSVCR100.dll_fseek]
add esp, 0xc
push ebx
call dword [sym.imp.MSVCR100.dll_ftell]
pop ecx
cmp eax, esi
jne 0x40bf2d
push ebx
push 1
lea eax, [esp + 0x18]
push 3
push eax
mov word [esp + 0x20], 0xbbef
mov byte [esp + 0x22], 0xbf
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
xor eax, eax
mov dword [esp + 0x58], 7
mov dword [esp + 0x54], esi
mov word [esp + 0x44], ax
mov byte [esp + 0x70], 2
mov dword [esp + 0x40], esi
mov esi, dword [esp + 0x18]
mov dword [esp + 0x38], 1
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x14], esi
mov eax, dword [esi]
sub eax, 0x10
call fcn.00405f8b
add eax, 0x10
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
mov byte [esp + 0x70], 3
call fcn.004055d9
mov edi, dword [esp + 0x10]
cmp dword [edi - 0xc], 3
jl 0x40bfe3
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40bfe3
cmp dword [edi - 4], 1
jle 0x40bfa8
push dword [edi - 0xc]
lea eax, [esp + 0x14]
push eax
call fcn.00401506
mov edi, dword [esp + 0x10]
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x3c]
push eax
push 0x40baab
push 1
push 1
push edi
call fcn.0040b61f
add esp, 0x18
or eax, 0xffffffff
lea esi, [esp + 0x10]
call fcn.0040583a
lea eax, [edi - 0x10]
mov byte [esp + 0x70], 2
call fcn.00401613
mov esi, dword [esp + 0x14]
jmp 0x40bff0
lea eax, [edi - 0x10]
mov byte [esp + 0x70], 2
call fcn.00401613
add esi, 4
mov dword [esp + 0x14], esi
cmp esi, dword [esp + 0x1c]
jne 0x40bf5d
mov esi, dword [sym.imp.MSVCR100.dll_fprintf]
push str._r_n_________________________________________r_n
push ebx
call esi
push dword [esp + 0x48]
push str.Total_Files:__d
push ebx
call esi
add esp, 0x14
push ebx
call dword [sym.imp.MSVCR100.dll_fclose]
pop ecx
push 1
xor edi, edi
lea esi, [esp + 0x48]
call fcn.0040c444
lea esi, [esp + 0x28]
call fcn.00405aa5
lea esi, [esp + 0x18]
call fcn.00405aa5
xor eax, eax
inc eax
jmp 0x40c076
cmp ebx, esi
jne 0x40c053
mov ebx, 0x428328
push ebx
push str.LogFilesMd5ToFile_failed__MD5_s
mov ecx, edi
call fcn.00416d9e
pop ecx
pop ecx
lea esi, [esp + 0x28]
call fcn.00405aa5
lea esi, [esp + 0x18]
call fcn.00405aa5
xor eax, eax
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.0041f212
mov esp, ebp
pop ebp
ret 4