Function at 0x5998c9
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
mov eax, dword [0x786f54]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push 0x728904
push eax
mov esi, ecx
call dword [sym.imp.MSVCR80.dll__wfopen]
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
mov dword [ebp - 0x74], ebx
jne 0x599917
call dword [sym.imp.MSVCR80.dll__errno]
push dword [eax]
call dword [sym.imp.MSVCR80.dll_strerror]
pop ecx
push eax
lea ecx, [esi + 0x20]
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_char_const__]
xor al, al
jmp 0x599a78
push edi
mov edi, dword [sym.imp.MSVCR80.dll_fseek]
push 2
push 0
push ebx
call edi
push ebx
call dword [sym.imp.MSVCR80.dll_ftell]
push 0
push 0
push ebx
mov dword [ebp - 0x6c], eax
call edi
mov ebx, dword [sym.imp.MSVCR80.dll_fread]
add esp, 0x1c
cmp dword [ebp - 0x6c], 2
mov byte [ebp - 0x70], 0
mov byte [ebp - 0x6f], 0
jle 0x599a0c
push dword [ebp - 0x74]
lea eax, [ebp - 0x70]
push 1
push 2
push eax
call ebx
add esp, 0x10
cmp byte [ebp - 0x70], 0xff
jne 0x599a0c
cmp byte [ebp - 0x6f], 0xfe
jne 0x599a0c
mov eax, dword [ebp - 0x6c]
or dword [esi + 0x3c], 1
cdq
sub eax, edx
mov edi, eax
sar edi, 1
dec edi
xor ecx, ecx
push 2
pop edx
lea eax, [edi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00610aae
push dword [ebp - 0x74]
mov ecx, dword [ebp - 0x6c]
push 1
add ecx, 0xfffffffe
push ecx
push eax
mov dword [ebp - 0x78], eax
call ebx
mov eax, dword [ebp - 0x78]
xor ecx, ecx
push ecx
push eax
push ecx
mov word [eax + edi*2], cx
call fcn.00595828
mov ebx, eax
lea eax, [ebx + 1]
push eax
call fcn.00610aae
push ebx
push dword [ebp - 0x78]
mov dword [ebp - 0x6c], eax
push eax
call fcn.00595828
push dword [ebp - 0x78]
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 0x34
push ebx
push dword [ebp - 0x6c]
lea ecx, [esi + 4]
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__::assign_char_const___unsigned_int_]
push dword [ebp - 0x6c]
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
push ebx
push edi
lea eax, [ebp - 0x68]
push str.BOM___d_wide_chars_to__d_bytes
push eax
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0x14
jmp 0x599a59
and dword [esi + 0x3c], 0xfffffffe
push 0
push 0
push dword [ebp - 0x74]
call edi
push dword [ebp - 0x6c]
call fcn.00610aae
push dword [ebp - 0x74]
mov edi, eax
push 1
push dword [ebp - 0x6c]
push edi
call ebx
add esp, 0x20
push dword [ebp - 0x6c]
lea ecx, [esi + 4]
push edi
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__::assign_char_const___unsigned_int_]
push edi
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
push dword [ebp - 0x6c]
lea eax, [ebp - 0x68]
push str._d_bytes
push eax
call dword [sym.imp.MSVCR80.dll_sprintf]
add esp, 0x10
lea eax, [ebp - 0x68]
push eax
lea ecx, [esi + 0x20]
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_char_const__]
push dword [ebp - 0x74]
call dword [sym.imp.MSVCR80.dll_fclose]
pop ecx
mov ecx, esi
call fcn.005996ae
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00610c76
leave
ret 4