Function at 0x4990b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b4cca
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2f8
mov eax, dword [0x4f0dd0]
xor eax, ebp
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], 0
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.00497780
add esp, 4
movzx edx, al
test edx, edx
je 0x49910e
mov eax, dword [ebp - 0x10]
add eax, 0x1c
push eax
call fcn.00497780
add esp, 4
movzx ecx, al
test ecx, ecx
jne 0x49911a
mov dword [ebp - 0x14], 0x19c00b0
jmp 0x49957d
push str.xap.profiles_path
push 0xffffd8ee
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x54]
push eax
call dword [sym.imp.XLLuaRuntime.dll_lua_getfield]
add esp, 0xc
mov dword [ebp - 0x40], 0
lea ecx, [ebp - 0x40]
push ecx
push 0xffffffffffffffff
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x54]
push eax
call dword [sym.imp.XLLuaRuntime.dll_lua_tolstring]
add esp, 0xc
mov dword [ebp - 0x3c], eax
lea ecx, [ebp - 0x64]
call dword [sym.imp.MSVCP71.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], 0
lea ecx, [ebp - 0x64]
push ecx
mov edx, dword [ebp - 0x40]
push edx
mov eax, dword [ebp - 0x3c]
push eax
call fcn.0043c417
add esp, 0xc
push 0xfffffffffffffffe
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x54]
push edx
call dword [sym.imp.XLLuaRuntime.dll_lua_settop]
add esp, 8
mov eax, dword [ebp - 0x10]
push eax
lea ecx, [ebp - 0x64]
push ecx
lea edx, [ebp - 0x38]
push edx
call fcn.00409d39
add esp, 0xc
mov byte [ebp - 4], 1
push 0x4cbb68
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x2f4]
push ecx
call fcn.00406b0a
add esp, 0xc
mov dword [ebp - 0x300], eax
mov edx, dword [ebp - 0x300]
mov dword [ebp - 0x304], edx
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x10]
add eax, 0x1c
push eax
mov ecx, dword [ebp - 0x304]
push ecx
lea edx, [ebp - 0x84]
push edx
call fcn.00409d39
add esp, 0xc
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2f4]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
push 0
push 0x80
push 3
push 0
push 0
push Ordinal_1
lea ecx, [ebp - 0x84]
call dword [sym.imp.MSVCP71.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
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0xffffffff
jne 0x499264
mov dword [ebp - 0x14], 0x19c00ad
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x84]
call dword [sym.imp.MSVCP71.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 - 0x38]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x64]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
jmp 0x49957d
lea ecx, [ebp - 0x84]
call dword [sym.imp.MSVCP71.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
call fcn.0043c8cf
add esp, 4
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
add eax, 1
push eax
call fcn.0049ecdd
add esp, 4
mov dword [ebp - 0x2f8], eax
mov ecx, dword [ebp - 0x2f8]
mov dword [ebp - 0x68], ecx
mov edx, dword [ebp - 0x44]
add edx, 1
push edx
push 0
mov eax, dword [ebp - 0x68]
push eax
call sub.MSVCR71.dll_memset
add esp, 0xc
mov dword [ebp - 0x18], 0
push 0
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x44]
push edx
mov eax, dword [ebp - 0x68]
push eax
mov ecx, dword [ebp - 0x48]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x499315
mov dword [ebp - 0x14], 0x19c00af
mov edx, dword [ebp - 0x48]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x84]
call dword [sym.imp.MSVCP71.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 - 0x38]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x64]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
jmp 0x49957d
mov eax, dword [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x10]
add ecx, 0x38
push ecx
push 0x4cbb6c
call dword [sym.imp.MSVCP71.dll_bool___cdecl_std::operator__char__struct_std::char_traits_char___class_std::allocator_char___char_const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
add esp, 8
movzx edx, al
test edx, edx
je 0x4994ea
lea ecx, [ebp - 0x2d4]
call fcn.0049ef50
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x10]
add ecx, 0x38
call dword [sym.imp.MSVCP71.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::size_void_const]
cmp eax, 0x10
jne 0x499380
push 0x80
mov ecx, dword [ebp - 0x10]
add ecx, 0x38
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
lea ecx, [ebp - 0x2d4]
call fcn.004a1ae9
test eax, eax
je 0x4993c8
mov dword [ebp - 0x14], 0x19c00b2
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2d4]
call fcn.00401095
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x84]
call dword [sym.imp.MSVCP71.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 - 0x38]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x64]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
jmp 0x49957d
lea ecx, [ebp - 0xa4]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
mov byte [ebp - 4], 6
lea eax, [ebp - 0xa4]
push eax
push 0
mov ecx, dword [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0x68]
push edx
lea ecx, [ebp - 0x2d4]
call fcn.004a1bbb
movzx eax, al
test eax, eax
jne 0x499453
mov dword [ebp - 0x14], 0x19c00b4
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xa4]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2d4]
call fcn.00401095
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x84]
call dword [sym.imp.MSVCP71.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 - 0x38]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x64]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
jmp 0x49957d
mov dword [ebp - 0x88], 0
lea ecx, [ebp - 0x88]
push ecx
lea ecx, [ebp - 0xa4]
call dword [sym.imp.MSVCP71.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::size_void_const]
push eax
lea ecx, [ebp - 0xa4]
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x54]
push eax
call fcn.0049a2d0
add esp, 0x10
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x68]
mov dword [ebp - 0x2fc], ecx
mov edx, dword [ebp - 0x2fc]
push edx
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
cmp dword [ebp - 0x14], 0
jne 0x4994c9
lea ecx, [ebp - 0xa4]
call dword [sym.imp.MSVCP71.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::size_void_const]
cmp dword [ebp - 0x88], eax
jae 0x4994c9
mov dword [ebp - 0x14], 0x19bff22
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xa4]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2d4]
call fcn.00401095
jmp 0x49952d
mov dword [ebp - 0x2d8], 0
lea eax, [ebp - 0x2d8]
push eax
mov ecx, dword [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0x68]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x54]
push ecx
call fcn.0049a2d0
add esp, 0x10
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x49952d
mov edx, dword [ebp - 0x2d8]
cmp edx, dword [ebp - 0x44]
jae 0x49952d
mov dword [ebp - 0x14], 0x19bff22
push 0xffffd8f0
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x54]
push ecx
call dword [sym.imp.XLLuaRuntime.dll_luaL_ref]
add esp, 8
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x58], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x84]
call dword [sym.imp.MSVCP71.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 - 0x38]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x64]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
xor eax, eax
jne 0x4990e5
mov ecx, dword [ebp - 0x10]
movzx edx, byte [ecx + 0x61]
test edx, edx
je 0x4995a7
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
push 0x401
mov ecx, dword [0x53ae98]
add ecx, 4
call fcn.004014ef
xor eax, eax
jmp 0x4995aa
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0049f127
mov esp, ebp
pop ebp
ret 4