Function at 0x412320
Capabilities:
Check if file exists
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x428c31
mov eax, dword fs:[0]
push eax
sub esp, 0x2f8
mov eax, dword [0x442580]
xor eax, esp
mov dword [esp + 0x2f0], eax
push ebx
push esi
push edi
mov eax, dword [0x442580]
xor eax, esp
push eax
lea eax, [esp + 0x308]
mov dword fs:[0], eax
mov esi, dword [ebp + 0xc]
xor eax, eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x58], 7
mov dword [esp + 0x54], 0
mov word [esp + 0x44], ax
push eax
mov dword [esp + 0x314], eax
push eax
mov byte [esp + 0x1f], al
mov byte [esp + 0x38], al
mov byte [esp + 0x34], al
mov byte [esp + 0x2c], al
mov byte [esp + 0x2b], al
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
call fcn.00413350
mov dword [esp + 0x34], eax
push 0xfffffffffffffff5
mov byte [esp + 0x314], 1
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0x445f28
push eax
mov dword [0x445f20], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
movzx edx, word [0x443720]
test eax, eax
movzx ecx, word [0x445f30]
cmovne edx, ecx
push 0
mov word [0x443720], dx
call fcn.00414452
add eax, 0x20
push eax
call fcn.00413b44
mov eax, dword [ebp + 8]
add esp, 8
cmp eax, 2
jge 0x412451
mov esi, dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
push 0xa
push dword [0x445f20]
call esi
push str._nDirHash_by_Mounir_IDRASSI__mounir_idrix.fr__Copyright_2010_2018__Editor:_ViOLeT__n_nRecursively_compute_hash_of_a_given_directory_content_in_lexicographical_order._nIt_can_also_compute_the_hash_of_a_single_file._n_nSupported_Algorithms_:_MD5__SHA1__SHA256__SHA384__SHA512_nUsing_OpenSSL_n_n
call fcn.004148ca
movzx eax, word [0x443720]
add esp, 4
push eax
push dword [0x445f20]
call esi
push str.Usage:_DirHash.exe_DirectoryOrFilePath__HashAlgo____t_ResultFileName____overwrite____quiet____nowait____hashnames____exclude_pattern1____exclude_pattern2__n_n__Possible_values_for_HashAlgo__not_case_sensitive__default_is_SHA1_:_n__MD5__SHA1__SHA256__SHA384__SHA512_n_n__ResultFileName:_text_file_where_the_result_will_be_appended_n_n___overwrite__only_when__t_present_:_output_text_file_will_be_overwritten_n_n___quiet:_No_text_is_displayed_or_written_except_the_hash_value_n_n___nowait:_avoid_displaying_the_waiting_prompt_before_exiting_n_n___hashnames:_file_names_will_be_included_in_hash_computation_n_n___exclude_specifies_a_name_pattern_for_files_to_exclude_from_hash_computation._n_n
call fcn.004148ca
add esp, 4
jmp 0x41275b
cmp eax, 3
jl 0x41278f
mov edi, 2
cmp eax, edi
jle 0x41278f
lea ebx, [edi + 1]
lea ebx, [ebx]
mov esi, dword [esi + edi*4]
mov ecx, 0x43f4cc
mov eax, esi
lea ebx, [ebx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4124a6
test dx, dx
je 0x4124a2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4124a6
add eax, 4
add ecx, 4
test dx, dx
jne 0x412480
xor eax, eax
jmp 0x4124ab
sbb eax, eax
or eax, 1
test eax, eax
jne 0x412508
cmp ebx, dword [ebp + 8]
jge 0x412709
mov eax, dword [esp + 0x1c]
mov edx, dword [eax + edi*4 + 4]
cmp word [edx], 0
jne 0x4124de
xor ecx, ecx
push ecx
push edx
lea ecx, [esp + 0x4c]
call fcn.00412ea0
mov esi, dword [esp + 0x18]
inc edi
inc ebx
jmp 0x4126f5
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4124e3
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0x4c]
call fcn.00412ea0
mov esi, dword [esp + 0x18]
inc edi
inc ebx
jmp 0x4126f5
mov ecx, str._overwrite
mov eax, esi
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x412536
test dx, dx
je 0x412532
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x412536
add eax, 4
add ecx, 4
test dx, dx
jne 0x412510
xor eax, eax
jmp 0x41253b
sbb eax, eax
or eax, 1
test eax, eax
jne 0x41254d
mov esi, dword [esp + 0x18]
mov byte [esp + 0x23], 1
jmp 0x4126f5
mov ecx, str._nowait
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41257a
test dx, dx
je 0x412576
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41257a
add eax, 4
add ecx, 4
test dx, dx
jne 0x412554
xor eax, eax
jmp 0x41257f
sbb eax, eax
or eax, 1
test eax, eax
jne 0x412591
mov esi, dword [esp + 0x18]
mov byte [esp + 0x17], 1
jmp 0x4126f5
mov ecx, str._quiet
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4125be
test dx, dx
je 0x4125ba
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4125be
add eax, 4
add ecx, 4
test dx, dx
jne 0x412598
xor eax, eax
jmp 0x4125c3
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4125d5
mov esi, dword [esp + 0x18]
mov byte [esp + 0x24], 1
jmp 0x4126f5
mov ecx, str._hashnames
mov eax, esi
lea esp, [esp]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x412606
test dx, dx
je 0x412602
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x412606
add eax, 4
add ecx, 4
test dx, dx
jne 0x4125e0
xor eax, eax
jmp 0x41260b
sbb eax, eax
or eax, 1
test eax, eax
jne 0x41261d
mov esi, dword [esp + 0x18]
mov byte [esp + 0x30], 1
jmp 0x4126f5
mov ecx, str._stripnames
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41264a
test dx, dx
je 0x412646
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41264a
add eax, 4
add ecx, 4
test dx, dx
jne 0x412624
xor eax, eax
jmp 0x41264f
sbb eax, eax
or eax, 1
test eax, eax
jne 0x412661
mov esi, dword [esp + 0x18]
mov byte [esp + 0x2c], 1
jmp 0x4126f5
mov ecx, str._exclude
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41268e
test dx, dx
je 0x41268a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41268e
add eax, 4
add ecx, 4
test dx, dx
jne 0x412668
xor eax, eax
jmp 0x412693
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4126e0
cmp ebx, dword [ebp + 8]
jge 0x412777
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x5c]
push dword [eax + edi*4 + 4]
call fcn.00412be0
lea eax, [esp + 0x5c]
mov byte [esp + 0x310], 2
push eax
lea ecx, [esp + 0x38]
call fcn.00412c40
lea ecx, [esp + 0x5c]
mov byte [esp + 0x310], 1
call fcn.004121b0
mov esi, dword [esp + 0x18]
inc edi
inc ebx
jmp 0x4126f5
mov ecx, esi
call fcn.004119c0
mov esi, eax
mov dword [esp + 0x18], esi
test esi, esi
je 0x4127b7
inc edi
inc ebx
cmp edi, dword [ebp + 8]
jge 0x41278b
mov esi, dword [esp + 0x1c]
jmp 0x412470
mov esi, dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
push 0xa
push dword [0x445f20]
call esi
push str._nDirHash_by_Mounir_IDRASSI__mounir_idrix.fr__Copyright_2010_2018__Editor:_ViOLeT__n_nRecursively_compute_hash_of_a_given_directory_content_in_lexicographical_order._nIt_can_also_compute_the_hash_of_a_single_file._n_nSupported_Algorithms_:_MD5__SHA1__SHA256__SHA384__SHA512_nUsing_OpenSSL_n_n
call fcn.004148ca
movzx eax, word [0x443720]
add esp, 4
push eax
push dword [0x445f20]
call esi
push str.Usage:_DirHash.exe_DirectoryOrFilePath__HashAlgo____t_ResultFileName____overwrite____quiet____nowait____hashnames____exclude_pattern1____exclude_pattern2__n_n__Possible_values_for_HashAlgo__not_case_sensitive__default_is_SHA1_:_n__MD5__SHA1__SHA256__SHA384__SHA512_n_n__ResultFileName:_text_file_where_the_result_will_be_appended_n_n___overwrite__only_when__t_present_:_output_text_file_will_be_overwritten_n_n___quiet:_No_text_is_displayed_or_written_except_the_hash_value_n_n___nowait:_avoid_displaying_the_waiting_prompt_before_exiting_n_n___hashnames:_file_names_will_be_included_in_hash_computation_n_n___exclude_specifies_a_name_pattern_for_files_to_exclude_from_hash_computation._n_n
call fcn.004148ca
add esp, 4
push str.Error:_Missing_argument_for_switch__t_n
call fcn.00412220
add esp, 4
cmp byte [esp + 0x17], 0
jne 0x4127dc
push str._n_nPress_ENTER_to_exit_the_program_...
call fcn.004148ca
add esp, 4
call fcn.00414ee5
mov esi, 1
jmp 0x412b85
call fcn.004121e0
push str.Error:_Missing_argument_for_switch__exclude_n
call fcn.00412220
add esp, 4
jmp 0x4127d0
test esi, esi
jne 0x4127ee
push 0x64
call fcn.00414f10
mov esi, eax
add esp, 4
mov dword [esp + 0x18], esi
test esi, esi
je 0x4127e6
lea eax, [esi + 4]
mov dword [esi], vtable.Sha1.0
push eax
call fcn.00401b40
add esp, 4
jmp 0x4127ee
call fcn.004121e0
mov eax, dword [esp + 0x1c]
push dword [eax + edi*4]
push str.Error:_Argument___s__not_recognized_n
call fcn.00412220
add esp, 8
cmp byte [esp + 0x17], 0
jne 0x4127dc
call fcn.00412260
mov esi, 1
jmp 0x412b85
mov dword [esp + 0x18], 0
cmp byte [esp + 0x24], 0
mov ebx, dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
jne 0x412822
push 0xa
push dword [0x445f20]
call ebx
push str._nDirHash_by_Mounir_IDRASSI__mounir_idrix.fr__Copyright_2010_2018__Editor:_ViOLeT__n_nRecursively_compute_hash_of_a_given_directory_content_in_lexicographical_order._nIt_can_also_compute_the_hash_of_a_single_file._n_nSupported_Algorithms_:_MD5__SHA1__SHA256__SHA384__SHA512_nUsing_OpenSSL_n_n
call fcn.004148ca
movzx eax, word [0x443720]
add esp, 4
push eax
push dword [0x445f20]
call ebx
cmp dword [esp + 0x54], 0
je 0x412872
cmp dword [esp + 0x58], 8
lea ecx, [esp + 0x44]
mov edx, 0x43f65c
mov eax, 0x43f654
cmovae ecx, dword [esp + 0x44]
cmp byte [esp + 0x23], 0
cmove eax, edx
push eax
push ecx
call fcn.0041471e
mov edi, eax
add esp, 8
mov dword [esp + 0x28], edi
test edi, edi
jne 0x412874
cmp byte [esp + 0x24], al
jne 0x412874
push str.___Failed_to_open_the_result_file_for_writing____n
call fcn.00412220
add esp, 4
jmp 0x412874
xor edi, edi
mov eax, dword [esp + 0x1c]
mov esi, dword [eax + 4]
test esi, esi
je 0x4128ed
lea eax, [esp + 0x40]
mov ecx, esi
push eax
call fcn.00411720
test eax, eax
js 0x4128ed
cmp dword [esp + 0x40], 0x101
jbe 0x4128ed
test edi, edi
je 0x4128a6
push edi
call fcn.00414e61
add esp, 4
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00414c6e
add esp, 4
cmp byte [esp + 0x24], 0
jne 0x4128cc
push 0x104
push str.Error:_Input_directory_file_path_is_too_long._Maximum_length_is__d_characters_n
call fcn.00412220
add esp, 8
cmp byte [esp + 0x17], 0
jne 0x4128e5
push str._n_nPress_ENTER_to_exit_the_program_...
call fcn.004148ca
add esp, 4
call fcn.00414ee5
or esi, 0xffffffff
jmp 0x412b85
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x412949
test edi, edi
je 0x412905
push edi
call fcn.00414e61
add esp, 4
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00414c6e
add esp, 4
cmp byte [esp + 0x24], 0
jne 0x412926
push str.Error:_The_given_input_file_doesnt_exist_n
call fcn.00412220
add esp, 4
cmp byte [esp + 0x17], 0
jne 0x41293f
push str._n_nPress_ENTER_to_exit_the_program_...
call fcn.004148ca
add esp, 4
call fcn.00414ee5
mov esi, 0xfffffffe
jmp 0x412b85
cmp byte [esp + 0x24], 0
mov edi, dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
jne 0x412998
cmp byte [esp + 0x2c], 0
mov eax, dword [esp + 0x1c]
je 0x412968
push dword [eax + 4]
call edi
jmp 0x41296b
mov eax, dword [eax + 4]
mov esi, dword [esp + 0x18]
mov ecx, esi
push eax
mov eax, dword [esi]
call dword [eax + 0x10]
push eax
push str.Using__s_to_compute_hash_of___s__..._n
call fcn.004148ca
add esp, 0xc
call fcn.00414452
add eax, 0x20
push eax
call fcn.004145e1
add esp, 4
jmp 0x41299c
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
push dword [eax + 4]
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x412a7f
mov eax, dword [esp + 0x1c]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
xor edi, edi
lea ecx, [eax + eax]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x3c], ecx
mov eax, dword [eax + 4]
add ecx, eax
movzx eax, word [ecx - 2]
cmp eax, 0x5c
je 0x4129de
cmp eax, 0x2f
jne 0x4129e6
mov edi, eax
xor eax, eax
mov word [ecx - 2], ax
push dword [esp + 0x24]
lea eax, [esp + 0x38]
mov edx, esi
push eax
mov eax, dword [esp + 0x24]
push dword [esp + 0x34]
push dword [esp + 0x3c]
mov ecx, dword [eax + 4]
call fcn.00411dc0
add esp, 0x10
mov esi, eax
test di, di
je 0x412a1f
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x3c]
mov eax, dword [eax + 4]
mov word [ecx + eax - 2], di
mov edi, dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
test esi, esi
jne 0x412b4e
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x74]
push edx
mov eax, dword [ecx]
call dword [eax + 8]
cmp byte [esp + 0x24], 0
jne 0x412ac5
cmp dword [esp + 0x28], esi
je 0x412aa2
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
call dword [eax + 0xc]
push eax
mov eax, dword [esp + 0x20]
push dword [eax + 4]
call edi
mov edi, dword [esp + 0x1c]
mov ecx, edi
push eax
mov eax, dword [edi]
call dword [eax + 0x10]
push eax
push str._s_hash_of___s____d_bytes__
push dword [esp + 0x38]
call fcn.00414324
add esp, 0x14
jmp 0x412aa6
push ecx
lea eax, [esp + 0x38]
mov edx, esi
push eax
mov eax, dword [esp + 0x24]
push dword [esp + 0x34]
push dword [esp + 0x3c]
mov ecx, dword [eax + 4]
call fcn.00411c90
add esp, 0x10
mov esi, eax
jmp 0x412a25
mov edi, dword [esp + 0x18]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0xc]
push eax
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x10]
push eax
push str._s___d_bytes__
call fcn.004148ca
add esp, 0xc
jmp 0x412ac9
mov edi, dword [esp + 0x18]
push 0xe
push dword [0x445f20]
call ebx
lea eax, [esp + 0xf4]
mov ecx, edi
push eax
mov eax, dword [edi]
call dword [eax + 0xc]
mov edx, eax
lea ecx, [esp + 0x78]
call fcn.00412280
add esp, 4
lea eax, [esp + 0xf4]
push eax
call fcn.004148ca
mov eax, dword [esp + 0x2c]
add esp, 4
test eax, eax
je 0x412b19
lea ecx, [esp + 0xf4]
push ecx
push eax
call fcn.00414324
add esp, 8
movzx eax, word [0x443720]
push eax
push dword [0x445f20]
call ebx
push 0x43f874
call fcn.004148ca
mov ebx, dword [esp + 0x2c]
add esp, 4
test ebx, ebx
je 0x412b56
push 0x43f874
push ebx
call fcn.00414324
add esp, 8
jmp 0x412b56
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x28]
push edi
call fcn.00414c6e
add esp, 4
test ebx, ebx
je 0x412b6c
push ebx
call fcn.00414e61
add esp, 4
cmp byte [esp + 0x17], 0
jne 0x412b85
push str._n_nPress_ENTER_to_exit_the_program_...
call fcn.004148ca
add esp, 4
call fcn.00414ee5
lea ecx, [esp + 0x34]
call fcn.00413090
push dword [esp + 0x34]
call fcn.00414c6e
add esp, 4
cmp dword [esp + 0x58], 8
jb 0x412bad
push dword [esp + 0x44]
call fcn.00414c6e
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x308]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2f0]
xor ecx, esp
call fcn.00413975
mov esp, ebp
pop ebp
ret