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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4242d7
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x435024]
xor eax, esp
mov dword [esp + 0x60], eax
push ebx
push esi
push edi
mov eax, dword [0x435024]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ebx, ecx
push ebx
push eax
push 0x42ae34
mov esi, 0x4294f4
push esi
mov dword [esp + 0x24], eax
call fcn.00417869
xor edi, edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x90], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
push ebx
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x30]
push eax
mov byte [esp + 0x9c], 1
call fcn.004143bb
add esp, 0x1c
test eax, eax
je 0x40b2e3
cmp dword [esp + 0x1c], edi
je 0x40b2e3
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x1c]
sar eax, 2
je 0x40b2e3
push 0x42aeb4
push dword [esp + 0x18]
call dword [sym.imp.MSVCR80.dll__wfopen]
mov ebx, eax
cmp ebx, edi
pop ecx
pop ecx
mov dword [esp + 0x28], ebx
jne 0x40b151
push dword [esp + 0x14]
push str.open_file___s__failed
jmp 0x40b2f2
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 0x40b18c
push ebx
push 1
lea eax, [esp + 0x1c]
push 3
push eax
mov byte [esp + 0x24], 0xef
mov byte [esp + 0x25], 0xbb
mov byte [esp + 0x26], 0xbf
call dword [sym.imp.MSVCR80.dll_fwrite]
add esp, 0x10
lea ecx, [esp + 0x54]
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 + 0x80], 2
mov esi, dword [esp + 0x1c]
cmp esi, dword [esp + 0x20]
mov dword [esp + 0x48], 1
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], ebx
jbe 0x40b1be
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x1c], eax
mov dword [esp + 0x30], esi
mov dword [esp + 0x44], eax
jbe 0x40b1d6
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov esi, dword [esp + 0x30]
cmp esi, dword [esp + 0x44]
je 0x40b295
cmp esi, dword [esp + 0x20]
jb 0x40b1f0
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [esi]
sub eax, 0x10
call fcn.00405607
add eax, 0x10
mov dword [esp + 0x14], eax
lea ebx, [esp + 0x14]
mov byte [esp + 0x80], 3
call fcn.00404b4b
mov esi, dword [esp + 0x14]
cmp dword [esi - 0xc], 3
jl 0x40b267
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40b267
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x4c]
push eax
push 0x40ad2d
push 1
push 1
mov esi, ebx
call fcn.00404cc7
push eax
call fcn.0040a90a
mov esi, dword [esp + 0x2c]
add esp, 0x18
cmp esi, edi
jne 0x40b256
xor eax, eax
jmp 0x40b25e
push esi
call dword [sym.imp.MSVCR80.dll_wcslen]
pop ecx
lea edx, [esp + 0x14]
call fcn.00401497
lea eax, [esi - 0x10]
mov byte [esp + 0x80], 2
call fcn.0040167f
mov eax, dword [esp + 0x30]
cmp eax, dword [esp + 0x20]
jb 0x40b287
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
add dword [esp + 0x30], 4
mov ebx, dword [esp + 0x28]
jmp 0x40b1d6
mov esi, dword [sym.imp.MSVCR80.dll_fprintf]
push str._r_n_________________________________________r_n
push ebx
call esi
push dword [esp + 0x58]
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 + 0x54]
mov byte [esp + 0x80], 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 + 0x34]
call fcn.00404f59
lea esi, [esp + 0x18]
call fcn.00404f59
xor eax, eax
inc eax
jmp 0x40b30f
cmp ebx, edi
jne 0x40b2ec
mov ebx, 0x42a598
push ebx
push str.LogFilesMd5ToFile_failed__MD5_s
push esi
call fcn.00417869
add esp, 0xc
lea esi, [esp + 0x34]
call fcn.00404f59
lea esi, [esp + 0x18]
call fcn.00404f59
xor eax, eax
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.00421314
mov esp, ebp
pop ebp
ret 4