Function at 0x1012f8f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1013af45
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3c0
push ebx
push esi
push edi
mov dword [ebp - 0x3ac], 0
lea ecx, [ebp - 0x28]
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_]
mov dword [ebp - 4], 1
mov dword [ebp - 0x258], 0
mov word [ebp - 0x254], 0
push 0x206
push 0
lea eax, [ebp - 0x252]
push eax
call sub.MSVCR80.dll_memset
add esp, 0xc
push 0x10146f80
push 0x104
lea ecx, [ebp - 0x254]
push ecx
lea edx, [ebp - 0x258]
push edx
call dword [sym.imp.MSVCR80.dll__wgetenv_s]
add esp, 0x10
lea eax, [ebp - 0x254]
push eax
lea ecx, [ebp - 0x28]
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__::append_wchar_t_const__]
push 0x10146f98
lea ecx, [ebp - 0x28]
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__::append_wchar_t_const__]
push 0x10146fa0
lea ecx, [ebp - 0x28]
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__::append_wchar_t_const__]
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x48]
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_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov byte [ebp - 4], 2
push 0x10146ff0
lea ecx, [ebp - 0x28]
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__::append_wchar_t_const__]
mov dword [ebp - 0x2c], 0
push 0x10146f9c
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVCP80.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
lea edx, [ebp - 0x2c]
push edx
call dword [sym.imp.MSVCR80.dll__wfopen_s]
add esp, 0xc
cmp dword [ebp - 0x2c], 0
je 0x1012fd37
push 2
push 0
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.MSVCR80.dll_fseek]
add esp, 0xc
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.MSVCR80.dll_ftell]
add esp, 4
mov dword [ebp - 0x25c], eax
push 0
push 0
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.MSVCR80.dll_fseek]
add esp, 0xc
mov eax, dword [ebp - 0x25c]
add eax, 1
push eax
call dword [sym.imp.MSVCR80.dll_malloc]
add esp, 4
mov dword [ebp - 0x2c4], eax
mov ecx, dword [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0x25c]
push edx
push 1
mov eax, dword [ebp - 0x2c4]
push eax
call dword [sym.imp.MSVCR80.dll_fread]
add esp, 0x10
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 4
push 0x10147008
lea ecx, [ebp - 0x2c0]
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__]
mov byte [ebp - 4], 3
push 0
lea edi, [ebp - 0x28c]
call fcn.10126a10
mov byte [ebp - 4], 4
push 0
lea edi, [ebp - 0x2a4]
call fcn.10126a10
mov byte [ebp - 4], 5
push 0
lea edi, [ebp - 0x274]
call fcn.10126a10
mov byte [ebp - 4], 6
lea edx, [ebp - 0x344]
push edx
call fcn.10129980
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x2c4]
push eax
lea ecx, [ebp - 0x364]
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__]
mov byte [ebp - 4], 8
mov ecx, dword [ebp - 0x3ac]
or ecx, 1
mov dword [ebp - 0x3ac], ecx
push 1
lea edx, [ebp - 0x28c]
push edx
lea eax, [ebp - 0x364]
lea ebx, [ebp - 0x344]
call fcn.10129a20
movzx eax, al
test eax, eax
je 0x1012fb22
lea ecx, [ebp - 0x28c]
call fcn.101278c0
movzx ecx, al
test ecx, ecx
jne 0x1012fb22
mov dword [ebp - 0x3b0], 1
jmp 0x1012fb2c
mov dword [ebp - 0x3b0], 0
mov dl, byte [ebp - 0x3b0]
mov byte [ebp - 0x345], dl
mov dword [ebp - 4], 7
mov eax, dword [ebp - 0x3ac]
and eax, 1
je 0x1012fb5d
and dword [ebp - 0x3ac], 0xfffffffe
lea ecx, [ebp - 0x364]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
movzx ecx, byte [ebp - 0x345]
test ecx, ecx
je 0x1012fc47
lea edx, [ebp - 0x28c]
push edx
mov edx, 0x10147010
call fcn.101280f0
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x368], esp
push eax
push ecx
call fcn.10126c50
mov dword [ebp - 0x3b4], eax
lea edi, [ebp - 0x2a4]
call fcn.10126e90
lea ecx, [ebp - 0x2a4]
call fcn.101278c0
movzx edx, al
test edx, edx
jne 0x1012fc47
lea eax, [ebp - 0x2a4]
push eax
mov edx, 0x10147018
call fcn.101280f0
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x36c], esp
push eax
push ecx
call fcn.10126c50
mov dword [ebp - 0x3b8], eax
lea edi, [ebp - 0x274]
call fcn.10126e90
lea ecx, [ebp - 0x274]
call fcn.101278c0
movzx edx, al
test edx, edx
jne 0x1012fc47
lea eax, [ebp - 0x274]
push eax
lea ecx, [ebp - 0x388]
call fcn.101270a0
mov dword [ebp - 0x3bc], eax
mov ecx, dword [ebp - 0x3bc]
mov dword [ebp - 0x3c0], ecx
mov byte [ebp - 4], 9
mov edx, dword [ebp - 0x3c0]
push edx
lea ecx, [ebp - 0x2c0]
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__]
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x388]
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 - 0x2c0]
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]
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x38c], esp
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_char_const__]
mov dword [ebp - 0x3c4], eax
lea eax, [ebp - 0x3a8]
push eax
call fcn.1012e920
add esp, 0x20
mov dword [ebp - 0x3c8], eax
mov ecx, dword [ebp - 0x3c8]
mov dword [ebp - 0x3cc], ecx
mov byte [ebp - 4], 0xa
mov edx, dword [ebp - 0x3cc]
push edx
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__::append_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x3a8]
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_]
lea eax, [ebp - 0x48]
push eax
mov ecx, dword [ebp + 8]
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_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
mov ecx, dword [ebp - 0x3ac]
or ecx, 2
mov dword [ebp - 0x3ac], ecx
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x344]
call fcn.1011b390
mov byte [ebp - 4], 5
lea esi, [ebp - 0x274]
call fcn.10126e20
mov byte [ebp - 4], 4
lea esi, [ebp - 0x2a4]
call fcn.10126e20
mov byte [ebp - 4], 3
lea esi, [ebp - 0x28c]
call fcn.10126e20
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2c0]
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 byte [ebp - 4], 1
lea ecx, [ebp - 0x48]
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_]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x28]
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_]
mov eax, dword [ebp + 8]
jmp 0x1012fd71
push 0x10147024
mov ecx, dword [ebp + 8]
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_wchar_t_const__]
mov edx, dword [ebp - 0x3ac]
or edx, 2
mov dword [ebp - 0x3ac], edx
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x48]
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_]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x28]
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_]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret