Function at 0x4c5e04
Capabilities:
Read file on windows

Disassembly:
push 0x4c
mov eax, 0x5945d5
call fcn.00584fd1
mov esi, dword [ebp + 8]
xor edi, edi
cmp esi, edi
mov ebx, ecx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], esi
jne 0x4c5e35
push edi
push edi
push edi
push 2
call sym.txupd.exe_public:_void___thiscall_TiXmlDocument::SetError_int__char_const___class_TiXmlParsingData___enum_TiXmlEncoding_
xor al, al
call fcn.00585054
ret 8
call sym.txupd.exe_public:_void___thiscall_TiXmlNode::Clear_void_
or dword [ebx + 8], 0xffffffff
or dword [ebx + 4], 0xffffffff
push 2
push edi
mov edi, dword [sym.imp.MSVCR80.dll_fseek]
push esi
call edi
push esi
call dword [sym.imp.MSVCR80.dll_ftell]
push 0
push 0
push dword [ebp - 0x54]
mov esi, eax
call edi
xor eax, eax
add esp, 0x1c
cmp esi, eax
jg 0x4c5e72
push eax
push eax
push eax
push 0xd
mov ecx, ebx
jmp 0x4c5e26
lea eax, [esi + 1]
push eax
call fcn.0058432a
push dword [ebp - 0x54]
mov edi, eax
push 1
push esi
push edi
mov byte [edi], 0
call dword [sym.imp.MSVCR80.dll_fread]
add esp, 0x14
cmp eax, 1
push edi
je 0x4c5ea5
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
pop ecx
xor eax, eax
push eax
push eax
push eax
push 2
jmp 0x4c5e6e
lea ebx, [edi + esi]
lea ecx, [ebp - 0x2c]
mov byte [ebx], 0
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__]
and dword [ebp - 4], 0
push 0
push str.encoding_GB2312_
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP80.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_char_const___unsigned_int_const]
mov ecx, dword [sym.imp.MSVCP80.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
cmp dword [ecx], eax
jne 0x4c5eec
push 0
push str.encoding_gb2312_
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP80.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_char_const___unsigned_int_const]
mov ecx, dword [sym.imp.MSVCP80.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
cmp dword [ecx], eax
je 0x4c5f4d
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0x18]
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP80.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
call fcn.004c4d6b
mov esi, dword [ebp - 0x34]
push edi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
lea eax, [esi + 1]
push eax
call fcn.0058432a
add esp, 0x14
push esi
lea ecx, [ebp - 0x48]
mov edi, eax
call dword [sym.imp.MSVCP80.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
push edi
call sub.MSVCR80.dll_memcpy
lea ebx, [edi + esi]
add esp, 0xc
lea ecx, [ebp - 0x48]
mov byte [ebx], 0
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 dword [ebp - 0x4c], 0x6115d0
push esi
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 2
call fcn.004c476c
mov byte [ebx], 0
cmp byte [edi], 0
mov eax, edi
mov esi, edi
je 0x4c5fc7
mov cl, byte [esi]
cmp cl, 0xa
jne 0x4c5f86
mov ecx, esi
sub ecx, eax
inc ecx
push ecx
push eax
lea ecx, [ebp - 0x4c]
call fcn.004c484f
inc esi
jmp 0x4c5fbd
cmp cl, 0xd
jne 0x4c5fc1
mov ecx, esi
sub ecx, eax
test ecx, ecx
jle 0x4c5f9d
push ecx
push eax
lea ecx, [ebp - 0x4c]
call fcn.004c484f
push 1
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x4c]
mov byte [ebp - 0x50], 0xa
call fcn.004c484f
lea eax, [esi + 1]
cmp byte [eax], 0xa
jne 0x4c5fbb
inc esi
inc esi
jmp 0x4c5fbd
mov esi, eax
mov eax, esi
jmp 0x4c5fc2
inc esi
cmp byte [esi], 0
jne 0x4c5f6d
sub esi, eax
je 0x4c5fd5
push esi
push eax
lea ecx, [ebp - 0x4c]
call fcn.004c484f
push edi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov esi, dword [ebp - 0x58]
mov eax, dword [esi]
pop ecx
push dword [ebp + 0xc]
mov ecx, dword [ebp - 0x4c]
add ecx, 8
push 0
push ecx
mov ecx, esi
call dword [eax + 8]
cmp byte [esi + 0x2c], 0
je 0x4c6020
cmp dword [ebp - 0x4c], 0x6115d0
je 0x4c600a
push dword [ebp - 0x4c]
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
pop ecx
xor bl, bl
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
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 al, bl
jmp 0x4c5e2d
cmp dword [ebp - 0x4c], 0x6115d0
je 0x4c6032
push dword [ebp - 0x4c]
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
pop ecx
mov bl, 1
jmp 0x4c600c