Function at 0x416828
Capabilities:
Read file on windows

Disassembly:
push 0x88
mov eax, 0x41f428
call fcn.0041eefb
mov eax, dword [ebp + 0xc]
and dword [ebp - 0x70], 0
mov ebx, ecx
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x74], ebx
mov esi, edx
mov dword [ebp - 0x78], eax
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
xor edi, edi
inc edi
xor eax, eax
cmp dword [ebp + 8], eax
mov dword [ebp - 4], edi
je 0x416b38
cmp dword [ebp + 0x10], eax
je 0x416b38
mov esi, dword [esi]
push eax
push eax
push 3
push eax
push edi
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x64], eax
jne 0x416898
lea eax, [ebp - 0x2c]
push eax
mov ecx, ebx
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
jmp 0x416b44
xor ebx, ebx
xor edi, edi
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x50], ebx
mov byte [ebp - 4], 2
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea eax, [ebp - 0x6c]
push eax
push 4
lea eax, [ebp - 0x4c]
push eax
push dword [ebp - 0x64]
call esi
test eax, eax
je 0x416a57
cmp dword [ebp - 0x6c], 4
jne 0x416a57
mov eax, dword [ebp - 0x4c]
lea ecx, [eax - 5]
cmp ecx, 0xfffa
ja 0x416a57
cmp dword [ebp - 0x68], eax
jae 0x416908
push edi
mov dword [ebp - 0x68], eax
call dword [sym.imp.MSVCR80.dll_free]
pop ecx
push dword [ebp - 0x68]
call dword [sym.imp.MSVCR80.dll_malloc]
mov edi, eax
mov eax, dword [ebp - 0x4c]
pop ecx
mov dword [edi], eax
push ebx
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebp - 0x4c]
add eax, 0xfffffffc
push eax
lea eax, [edi + 4]
push eax
push dword [ebp - 0x64]
call esi
test eax, eax
je 0x416a57
mov eax, dword [ebp - 0x4c]
lea ecx, [eax - 4]
cmp dword [ebp - 0x6c], ecx
jne 0x416a57
movzx ecx, word [edi + 0x38]
cmp ecx, eax
jae 0x416a57
movzx esi, word [edi + 0x3a]
cmp esi, eax
jae 0x416a57
movzx ecx, word [edi + 0x3c]
cmp ecx, eax
jae 0x416a57
movzx ecx, word [edi + 0x3e]
cmp ecx, eax
ja 0x416a57
mov eax, dword [ebp + 8]
cmp dword [edi + 0x30], eax
jne 0x4168af
lea ecx, [ebp - 0x48]
add esi, edi
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_]
push 0x100
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 3
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__::reserve_unsigned_int_]
mov ax, word [esi]
xor ax, word [0x432138]
jmp 0x4169b7
push eax
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_]
inc ebx
mov eax, ebx
and eax, 0x3f
mov ax, word [eax*2 + 0x432138]
xor ax, word [esi + ebx*2]
movzx eax, ax
test ax, ax
jne 0x41699b
mov eax, dword [ebp - 0x78]
mov eax, dword [eax]
cmp dword [eax - 0xc], 0
je 0x4169e4
cmp dword [ebp - 0x30], 8
mov ecx, dword [ebp - 0x44]
jae 0x4169d6
lea ecx, [ebp - 0x44]
push eax
push ecx
call dword [sym.imp.MSVCR80.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
jbe 0x416a43
mov ebx, dword [ebp - 0x50]
cmp ebx, dword [ebp + 0x10]
jb 0x416a16
test ebx, ebx
je 0x416a16
mov eax, dword [ebp - 0x5c]
mov esi, dword [ebp - 0x54]
mov ecx, dword [eax + esi*4]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
inc esi
cmp dword [ebp - 0x58], esi
mov dword [ebp - 0x54], esi
ja 0x416a0c
and dword [ebp - 0x54], 0
dec ebx
mov dword [ebp - 0x50], ebx
jne 0x416a16
and dword [ebp - 0x54], 0
push dword [ebp - 0x4c]
lea ecx, [ebp - 0x94]
push edi
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___unsigned_int_]
push eax
lea esi, [ebp - 0x60]
mov byte [ebp - 4], 4
call fcn.00416c2e
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 3
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 2
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_]
xor ebx, ebx
jmp 0x4168af
push edi
call dword [sym.imp.MSVCR80.dll_free]
pop ecx
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x50]
lea edi, [eax + ebx]
cmp ebx, edi
jbe 0x416a7b
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov esi, dword [ebp - 0x54]
cmp esi, edi
jbe 0x416a88
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp ebx, edi
je 0x416abc
mov esi, ebx
jb 0x416a96
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp dword [ebp - 0x58], ebx
ja 0x416aa0
mov esi, ebx
sub esi, dword [ebp - 0x58]
mov eax, dword [ebp - 0x5c]
push dword [eax + esi*4]
lea ecx, [ebp - 0x2c]
call dword [0x422218]
cmp ebx, edi
jb 0x416ab9
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
inc ebx
jmp 0x416a7b
mov ecx, dword [ebp - 0x74]
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
mov byte [ebp - 4], 1
mov edi, dword [ebp - 0x50]
test edi, edi
mov dword [ebp - 0x70], 1
je 0x416afa
test edi, edi
je 0x416afa
lea eax, [edi + esi - 1]
cmp dword [ebp - 0x58], eax
ja 0x416aeb
sub eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x5c]
mov ecx, dword [ecx + eax*4]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
dec edi
jne 0x416adb
mov esi, dword [ebp - 0x58]
jmp 0x416b13
mov eax, dword [ebp - 0x5c]
dec esi
lea eax, [eax + esi*4]
cmp dword [eax], 0
je 0x416b13
push dword [eax]
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
pop ecx
test esi, esi
ja 0x416aff
cmp dword [ebp - 0x5c], 0
je 0x416b26
push dword [ebp - 0x5c]
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
pop ecx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, dword [ebp - 0x74]
jmp 0x416b56
lea eax, [ebp - 0x2c]
push eax
mov ecx, ebx
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x70], edi
mov byte [ebp - 4], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, ebx
call fcn.0041ef7e
ret