Function at 0x409cff
Capabilities:
Check if file exists
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41bcee
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x428024]
xor eax, esp
mov dword [esp + 0x58], eax
push ebx
push esi
push edi
mov eax, dword [0x428024]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
xor edi, edi
mov ebx, ecx
mov esi, edx
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x78], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], edi
push esi
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x1c]
push eax
mov byte [esp + 0x84], 1
call fcn.0040ed41
add esp, 0xc
test eax, eax
je 0x409f3c
cmp dword [esp + 0x18], edi
je 0x409f3c
mov eax, dword [esp + 0x1c]
sub eax, dword [esp + 0x18]
sar eax, 2
je 0x409f3c
push 0x421930
push ebx
call dword [sym.imp.MSVCR80.dll__wfopen]
mov ebx, eax
cmp ebx, edi
pop ecx
pop ecx
je 0x409f58
push 2
push edi
push ebx
call dword [sym.imp.MSVCR80.dll_fseek]
add esp, 0xc
push ebx
call dword [sym.imp.MSVCR80.dll_ftell]
cmp eax, edi
pop ecx
jne 0x409de9
push ebx
push 1
lea eax, [esp + 0x18]
push 3
push eax
mov byte [esp + 0x20], 0xef
mov byte [esp + 0x21], 0xbb
mov byte [esp + 0x22], 0xbf
call dword [sym.imp.MSVCR80.dll_fwrite]
add esp, 0x10
lea ecx, [esp + 0x4c]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_void_]
mov byte [esp + 0x78], 2
mov esi, dword [esp + 0x18]
cmp esi, dword [esp + 0x1c]
mov dword [esp + 0x40], 1
mov dword [esp + 0x48], edi
mov dword [esp + 0x44], ebx
jbe 0x409e18
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x18], eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x24], eax
jbe 0x409e30
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov esi, dword [esp + 0x2c]
cmp esi, dword [esp + 0x24]
je 0x409ef1
cmp esi, dword [esp + 0x1c]
jb 0x409e4a
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [esi]
sub eax, 0x10
call fcn.00404f3d
add eax, 0x10
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
mov byte [esp + 0x78], 3
call fcn.00404662
mov esi, dword [esp + 0x10]
cmp dword [esi - 0xc], 3
jl 0x409eca
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x409eca
cmp dword [esi - 4], 1
jle 0x409e95
push dword [esi - 0xc]
lea eax, [esp + 0x14]
push eax
call fcn.004015bf
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x44]
push eax
push 0x4099b5
push 1
push 1
push esi
call fcn.00409588
add esp, 0x18
cmp esi, edi
jne 0x409eb9
xor eax, eax
jmp 0x409ec1
push esi
call dword [sym.imp.MSVCR80.dll_wcslen]
pop ecx
lea edx, [esp + 0x10]
call fcn.004014bf
lea eax, [esi - 0x10]
mov byte [esp + 0x78], 2
call fcn.004016a7
mov eax, dword [esp + 0x2c]
cmp eax, dword [esp + 0x1c]
jb 0x409ee7
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
add dword [esp + 0x2c], 4
jmp 0x409e30
mov esi, dword [sym.imp.MSVCR80.dll_fprintf]
push str._r_n_________________________________________r_n
push ebx
call esi
push dword [esp + 0x50]
push str.Total_Files:__d
push ebx
call esi
add esp, 0x14
push ebx
call dword [sym.imp.MSVCR80.dll_fclose]
pop ecx
lea ecx, [esp + 0x4c]
mov byte [esp + 0x78], 1
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea esi, [esp + 0x30]
call fcn.00404949
lea esi, [esp + 0x14]
call fcn.00404949
xor eax, eax
inc eax
jmp 0x409f6c
cmp esi, edi
jne 0x409f45
mov esi, 0x4211c8
push esi
push str.log_file_md5_fail._get_md5_fail__s
push 0x420388
call fcn.00411e0e
add esp, 0xc
lea esi, [esp + 0x30]
call fcn.00404949
lea esi, [esp + 0x14]
call fcn.00404949
xor eax, eax
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.00419580
mov esp, ebp
pop ebp
ret