Function at 0x41365d
Capabilities:
Read file on windows

Disassembly:
push 0x88
mov eax, 0x41a2db
call fcn.0041a007
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 0x41396d
cmp dword [ebp + 0x10], eax
je 0x41396d
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 0x4136cd
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 0x413979
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 0x41388c
cmp dword [ebp - 0x6c], 4
jne 0x41388c
mov eax, dword [ebp - 0x4c]
lea ecx, [eax - 5]
cmp ecx, 0xfffa
ja 0x41388c
cmp dword [ebp - 0x68], eax
jae 0x41373d
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 0x41388c
mov eax, dword [ebp - 0x4c]
lea ecx, [eax - 4]
cmp dword [ebp - 0x6c], ecx
jne 0x41388c
movzx ecx, word [edi + 0x38]
cmp ecx, eax
jae 0x41388c
movzx esi, word [edi + 0x3a]
cmp esi, eax
jae 0x41388c
movzx ecx, word [edi + 0x3c]
cmp ecx, eax
jae 0x41388c
movzx ecx, word [edi + 0x3e]
cmp ecx, eax
ja 0x41388c
mov eax, dword [ebp + 8]
cmp dword [edi + 0x30], eax
jne 0x4136e4
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 [0x428138]
jmp 0x4137ec
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 + 0x428138]
xor ax, word [esi + ebx*2]
movzx eax, ax
test ax, ax
jne 0x4137d0
mov eax, dword [ebp - 0x78]
mov eax, dword [eax]
cmp dword [eax - 0xc], 0
je 0x413819
cmp dword [ebp - 0x30], 8
mov ecx, dword [ebp - 0x44]
jae 0x41380b
lea ecx, [ebp - 0x44]
push eax
push ecx
call dword [sym.imp.MSVCR80.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
jbe 0x413878
mov ebx, dword [ebp - 0x50]
cmp ebx, dword [ebp + 0x10]
jb 0x41384b
test ebx, ebx
je 0x41384b
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 0x413841
and dword [ebp - 0x54], 0
dec ebx
mov dword [ebp - 0x50], ebx
jne 0x41384b
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.00413a63
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 0x4136e4
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 0x4138b0
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov esi, dword [ebp - 0x54]
cmp esi, edi
jbe 0x4138bd
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp ebx, edi
je 0x4138f1
mov esi, ebx
jb 0x4138cb
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp dword [ebp - 0x58], ebx
ja 0x4138d5
mov esi, ebx
sub esi, dword [ebp - 0x58]
mov eax, dword [ebp - 0x5c]
push dword [eax + esi*4]
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
cmp ebx, edi
jb 0x4138ee
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
inc ebx
jmp 0x4138b0
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 0x41392f
test edi, edi
je 0x41392f
lea eax, [edi + esi - 1]
cmp dword [ebp - 0x58], eax
ja 0x413920
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 0x413910
mov esi, dword [ebp - 0x58]
jmp 0x413948
mov eax, dword [ebp - 0x5c]
dec esi
lea eax, [eax + esi*4]
cmp dword [eax], 0
je 0x413948
push dword [eax]
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
pop ecx
test esi, esi
ja 0x413934
cmp dword [ebp - 0x5c], 0
je 0x41395b
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 0x41398b
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.0041a08a
ret