Function at 0x401380
Capabilities:
Terminate process
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x402405
mov eax, dword fs:[0]
push eax
sub esp, 0x90
push ebx
push ebp
push esi
push edi
mov eax, dword [0x405034]
xor eax, esp
push eax
lea eax, [esp + 0xa4]
mov dword fs:[0], eax
mov ebx, dword [esp + 0xb4]
mov edi, dword [esp + 0xb8]
cmp ebx, 2
jne 0x401492
mov esi, dword [edi + 4]
mov ecx, 0x4036b8
mov eax, esi
mov edi, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4013f0
test dl, dl
je 0x4013ec
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4013f0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4013d0
xor eax, eax
jmp 0x4013f5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x401429
mov ecx, str.__version
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401420
test dl, dl
je 0x40141c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401420
add eax, 2
add ecx, 2
test dl, dl
jne 0x401400
xor eax, eax
jmp 0x401425
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x401492
call dword [sym.imp.libtesseract302.dll_public:_static_char_const____cdecl_tesseract::TessBaseAPI::Version_void_]
mov esi, dword [sym.imp.MSVCR90.dll___iob_func]
push eax
push str.tesseract__s_n
call esi
mov edi, dword [sym.imp.MSVCR90.dll_fprintf]
add eax, 0x40
push eax
call edi
add esp, 0xc
call dword [sym.imp.liblept168.dll_getLeptonicaVersion]
mov ebp, eax
push ebp
push str.__s_n
call esi
add eax, 0x40
push eax
call edi
mov ebx, dword [sym.imp.liblept168.dll_lept_free]
push ebp
call ebx
add esp, 0x10
call dword [sym.imp.liblept168.dll_getImagelibVersions]
mov ebp, eax
push ebp
push str.___s_n
call esi
add eax, 0x40
push eax
call edi
push ebp
call ebx
add esp, 0x10
push 0
call dword [sym.imp.MSVCR90.dll_exit]
lea ecx, [esp + 0x50]
call dword [sym.imp.libtesseract302.dll_public:_void___thiscall_tesseract::TessBaseAPI::constructor_void_]
xor ebp, ebp
lea ecx, [esp + 0x20]
mov dword [esp + 0xac], ebp
call dword [sym.imp.libtesseract302.dll_public:_void___thiscall_STRING::constructor_void_]
mov ecx, dword [edi]
lea eax, [esp + 0x20]
push eax
push ecx
mov byte [esp + 0xb4], 1
call dword [sym.imp.libtesseract302.dll_void___cdecl_truncate_path_char_const___class_STRING__]
add esp, 8
lea ecx, [esp + 0x20]
call dword [sym.imp.libtesseract302.dll_public:_char_const____thiscall_STRING::string_void_const]
push ebp
push ebp
push ebp
push ebp
push ebp
push 3
push ebp
push eax
lea ecx, [esp + 0x70]
call dword [sym.imp.libtesseract302.dll_public:_int___thiscall_tesseract::TessBaseAPI::Init_char_const___char_const___enum_tesseract::OcrEngineMode__char____int__class_GenericVector_class_STRING__const___class_GenericVector_class_STRING__const___bool_]
cmp eax, ebp
je 0x401509
push str.Could_not_initialize_tesseract._n
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 8
push 1
call dword [sym.imp.MSVCR90.dll_exit]
cmp ebx, 2
jne 0x4015d7
mov eax, dword [edi + 4]
mov ecx, str.__list_langs
lea ebx, [ebx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401540
test dl, dl
je 0x40153c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401540
add eax, 2
add ecx, 2
test dl, dl
jne 0x401520
xor eax, eax
jmp 0x401545
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebp
jne 0x4015d7
lea ecx, [esp + 0x38]
call fcn.004011b0
lea edx, [esp + 0x38]
push edx
lea ecx, [esp + 0x54]
mov byte [esp + 0xb0], 2
call dword [sym.imp.libtesseract302.dll_public:_void___thiscall_tesseract::TessBaseAPI::GetAvailableLanguagesAsVector_class_GenericVector_class_STRING___const]
mov eax, dword [esp + 0x3c]
mov edi, dword [sym.imp.MSVCR90.dll___iob_func]
push eax
push str.List_of_available_languages___d_:_n
call edi
mov ebp, dword [sym.imp.MSVCR90.dll_fprintf]
add eax, 0x40
push eax
call ebp
xor esi, esi
add esp, 0xc
cmp dword [esp + 0x3c], esi
jle 0x4015c5
jmp 0x4015a0
mov ecx, dword [esp + 0x44]
lea ecx, [ecx + esi*4]
call dword [sym.imp.libtesseract302.dll_public:_char_const____thiscall_STRING::string_void_const]
push eax
push 0x403630
call edi
add eax, 0x40
push eax
call ebp
inc esi
add esp, 0xc
cmp esi, dword [esp + 0x3c]
jl 0x4015a0
lea ecx, [esp + 0x50]
call dword [sym.imp.libtesseract302.dll_public:_void___thiscall_tesseract::TessBaseAPI::Clear_void_]
push 0
call dword [sym.imp.MSVCR90.dll_exit]
lea ecx, [esp + 0x50]
call dword [sym.imp.libtesseract302.dll_public:_void___thiscall_tesseract::TessBaseAPI::End_void_]
mov esi, 1
cmp ebx, esi
mov dword [esp + 0x30], 0x40362c
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], 6
jle 0x401700
lea ebx, [esi + 1]
lea esp, [esp]
test ebp, ebp
je 0x401620
mov edx, dword [edi + esi*4]
cmp byte [edx], 0x2d
jne 0x4016fc
mov edi, dword [edi + esi*4]
mov ecx, 0x403628
mov eax, edi
lea ebx, [ebx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401650
test dl, dl
je 0x40164c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401650
add eax, 2
add ecx, 2
test dl, dl
jne 0x401630
xor eax, eax
jmp 0x401655
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x401675
cmp ebx, dword [esp + 0xb4]
jge 0x401675
mov eax, dword [esp + 0xb8]
mov ecx, dword [eax + esi*4 + 4]
inc esi
mov dword [esp + 0x30], ecx
inc ebx
jmp 0x4016e6
mov ecx, str._psm
mov eax, edi
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4016a0
test dl, dl
je 0x40169c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4016a0
add eax, 2
add ecx, 2
test dl, dl
jne 0x401680
xor eax, eax
jmp 0x4016a5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4016cf
cmp ebx, dword [esp + 0xb4]
jge 0x4016cf
mov edx, dword [esp + 0xb8]
mov eax, dword [edx + esi*4 + 4]
push eax
call dword [sym.imp.MSVCR90.dll_atoi]
add esp, 4
inc esi
mov dword [esp + 0x2c], eax
inc ebx
jmp 0x4016e6
cmp dword [esp + 0x24], 0
jne 0x4016dc
mov dword [esp + 0x24], edi
jmp 0x4016e6
test ebp, ebp
jne 0x4016e6
mov dword [esp + 0x28], edi
mov ebp, edi
mov edi, dword [esp + 0xb8]
inc esi
inc ebx
cmp esi, dword [esp + 0xb4]
jl 0x401610
test ebp, ebp
jne 0x401777
mov ecx, dword [edi]
mov esi, dword [sym.imp.MSVCR90.dll___iob_func]
push ecx
push str.Usage:_s_imagename_outputbase___l_lang____psm_pagesegmode___configfile...__n_n
call esi
mov edi, dword [sym.imp.MSVCR90.dll_fprintf]
add eax, 0x40
push eax
call edi
add esp, 0xc
push str.pagesegmode_values_are:_n0__Orientation_and_script_detection__OSD__only._n1__Automatic_page_segmentation_with_OSD._n2__Automatic_page_segmentation__but_no_OSD__or_OCR_n3__Fully_automatic_page_segmentation__but_no_OSD.__Default__n4__Assume_a_single_column_of_text_of_variable_sizes._n5__Assume_a_single_uniform_block_of_vertically_aligned_text._n6__Assume_a_single_uniform_block_of_text._n7__Treat_the_image_as_a_single_text_line._n8__Treat_the_image_as_a_single_word._n9__Treat_the_image_as_a_single_word_in_a_circle._n10__Treat_the_image_as_a_single_character._n
call esi
add eax, 0x40
push eax
call edi
add esp, 8
push str._l_lang_and_or__psm_pagesegmode_must_occur_before_anyconfigfile._n_n
call esi
add eax, 0x40
push eax
call edi
add esp, 8
push str.Single_options:_n
call esi
add eax, 0x40
push eax
call edi
add esp, 8
push str.___v___version:_version_info_n
call esi
add eax, 0x40
push eax
call edi
add esp, 8
push str.____list_langs:_list_available_languages_for_tesseract_engine_n
call esi
add eax, 0x40
push eax
call edi
add esp, 8
push 1
call dword [sym.imp.MSVCR90.dll_exit]
push ebp
lea ecx, [esp + 0x54]
call dword [sym.imp.libtesseract302.dll_public:_void___thiscall_tesseract::TessBaseAPI::SetOutputName_char_const__]
mov eax, dword [esp + 0xb4]
push 0
push 0
push 0
sub eax, esi
push eax
mov eax, dword [esp + 0x40]
lea edx, [edi + esi*4]
push edx
push 3
push eax
lea ecx, [esp + 0x3c]
call dword [sym.imp.libtesseract302.dll_public:_char_const____thiscall_STRING::string_void_const]
push eax
lea ecx, [esp + 0x70]
call dword [sym.imp.libtesseract302.dll_public:_int___thiscall_tesseract::TessBaseAPI::Init_char_const___char_const___enum_tesseract::OcrEngineMode__char____int__class_GenericVector_class_STRING__const___class_GenericVector_class_STRING__const___bool_]
test eax, eax
jne 0x4014e9
mov esi, dword [sym.imp.libtesseract302.dll_public:_enum_tesseract::PageSegMode___thiscall_tesseract::TessBaseAPI::GetPageSegMode_void_]
lea ecx, [esp + 0x50]
call esi
lea ecx, [esp + 0x50]
call esi
cmp eax, 6
jne 0x4017e0
mov ecx, dword [esp + 0x2c]
push ecx
lea ecx, [esp + 0x54]
call dword [sym.imp.libtesseract302.dll_public:_void___thiscall_tesseract::TessBaseAPI::SetPageSegMode_enum_tesseract::PageSegMode_]
call dword [sym.imp.libtesseract302.dll_public:_static_char_const____cdecl_tesseract::TessBaseAPI::Version_void_]
push eax
push str.Tesseract_Open_Source_OCR_Engine_v_s_with_Leptonica_n
call dword [sym.imp.libtesseract302.dll_void___cdecl_tprintf_char_const__]
mov esi, dword [esp + 0x2c]
push 0x40329c
push esi
call dword [sym.imp.MSVCR90.dll_fopen]
add esp, 0x10
test eax, eax
jne 0x401829
push esi
push str.Cannot_open_input_file:__s_n
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
push 2
jmp 0x401503
mov ebx, dword [sym.imp.MSVCR90.dll_fclose]
push eax
call ebx
push esi
call dword [sym.imp.liblept168.dll_pixRead]
add esp, 8
mov dword [esp + 0x34], eax
test eax, eax
jne 0x401863
push str.Unsupported_image_type._n
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 8
push 3
jmp 0x401503
lea edx, [esp + 0x34]
push edx
call dword [sym.imp.liblept168.dll_pixDestroy]
add esp, 4
lea ecx, [esp + 0x1c]
call dword [sym.imp.libtesseract302.dll_public:_void___thiscall_STRING::constructor_void_]
lea eax, [esp + 0x1c]
push eax
push 0
push 0
push esi
lea ecx, [esp + 0x60]
mov byte [esp + 0xbc], 3
call dword [sym.imp.libtesseract302.dll_public:_bool___thiscall_tesseract::TessBaseAPI::ProcessPages_char_const___char_const___int__class_STRING__]
mov edi, dword [sym.imp.MSVCR90.dll_fprintf]
mov ebp, dword [sym.imp.MSVCR90.dll___iob_func]
test al, al
jne 0x4018b7
push str.Error_during_processing._n
call ebp
add eax, 0x40
push eax
call edi
add esp, 8
mov esi, dword [sym.imp.libtesseract302.dll_public:_bool___thiscall_tesseract::TessBaseAPI::GetBoolVariable_char_const___bool__const]
lea ecx, [esp + 0x16]
push ecx
push str.tessedit_create_hocr
lea ecx, [esp + 0x58]
mov byte [esp + 0x1e], 0
call esi
lea edx, [esp + 0x17]
push edx
push str.tessedit_create_boxfile
lea ecx, [esp + 0x58]
mov byte [esp + 0x1f], 0
call esi
mov eax, dword [esp + 0x28]
push eax
lea ecx, [esp + 0x1c]
call dword [sym.imp.libtesseract302.dll_public:_void___thiscall_STRING::constructor_char_const__]
cmp byte [esp + 0x16], 0
mov byte [esp + 0xac], 4
je 0x40190c
mov eax, str..html
jmp 0x40191d
cmp byte [esp + 0x17], 0
mov eax, str..box
jne 0x40191d
mov eax, str..txt
push eax
lea ecx, [esp + 0x1c]
call dword [sym.imp.libtesseract302.dll_public:_class_STRING____thiscall_STRING::operator_char_const__]
push 0x4031fc
lea ecx, [esp + 0x1c]
call dword [sym.imp.libtesseract302.dll_public:_char_const____thiscall_STRING::string_void_const]
push eax
call dword [sym.imp.MSVCR90.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
jne 0x401967
lea ecx, [esp + 0x18]
call dword [sym.imp.libtesseract302.dll_public:_char_const____thiscall_STRING::string_void_const]
push eax
push str.Cannot_create_output_file__s_n
call ebp
add eax, 0x40
push eax
call edi
add esp, 0xc
jmp 0x401501
push esi
lea ecx, [esp + 0x20]
call dword [sym.imp.libtesseract302.dll_public:_int___thiscall_STRING::length_void_const]
push eax
push 1
lea ecx, [esp + 0x28]
call dword [sym.imp.libtesseract302.dll_public:_char_const____thiscall_STRING::string_void_const]
push eax
call dword [sym.imp.MSVCR90.dll_fwrite]
push esi
call ebx
mov esi, dword [sym.imp.libtesseract302.dll_public:_void___thiscall_STRING::destructor_void_]
add esp, 0x14
lea ecx, [esp + 0x18]
mov byte [esp + 0xac], 3
call esi
lea ecx, [esp + 0x1c]
mov byte [esp + 0xac], 1
call esi
lea ecx, [esp + 0x20]
mov byte [esp + 0xac], 0
call esi
lea ecx, [esp + 0x50]
mov dword [esp + 0xac], 0xffffffff
call dword [sym.imp.libtesseract302.dll_public_virtual:_void___thiscall_tesseract::TessBaseAPI::destructor_void_]
xor eax, eax
mov ecx, dword [esp + 0xa4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9c
ret