Function at 0x481d40
Capabilities:
Get file size
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x14
test eax, eax
push ebx
push ebp
push esi
push edi
mov esi, ecx
jne 0x481d80
mov eax, dword [esi + 0x60]
push eax
push str.TaskID___u_exception_raised_in_method_CFileMgr::LoadMemFile__parameter_pBuffer_can_not_be_NULL
push 0x4c89f8
call fcn.00453c20
add esp, 0xc
mov eax, 0x7e2d
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], 0xb2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0xc
mov ebp, dword [esp + 0x2c]
cmp dword [ebp], 0
jg 0x481db9
mov ecx, dword [esi + 0x60]
push ecx
push str.TaskID___u_exception_raised_in_method_CFileMgr::LoadMemFile__parameter_nNumber_must_greater_than_zero
push 0x4c89f8
call fcn.00453c20
add esp, 0xc
mov eax, 0x7e2e
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], 0xb8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0xc
mov eax, dword [esp + 0x30]
mov ecx, dword [eax + 4]
test ecx, ecx
ja 0x481dfa
jb 0x481dcb
cmp dword [eax], 0
ja 0x481dfa
mov edx, dword [esi + 0x60]
push edx
push str.TaskID___u_exception_raised_in_method_CFileMgr::LoadMemFile__parameter_nNumber_must_greater_than_zero
push 0x4c89f8
call fcn.00453c20
add esp, 0xc
mov eax, 0x7e2e
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], 0xbe
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0xc
cmp dword [esi + 0x58], 0xffffffff
jne 0x481e62
mov eax, dword [esi + 0xc]
test eax, eax
jne 0x481e0c
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push 0
push 0x80
push 4
push 0
push 5
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esi + 0x58], eax
jne 0x481e62
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push eax
mov eax, dword [esi + 0x60]
push eax
push str.TaskID___u_exception_raised_in_method_CFileMgr::LoadMemFile__open_file_fail__error_code_is__d
push 0x4c89f8
call fcn.00453c20
add esp, 0x10
call edi
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], 0xc9
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0xc
mov edx, dword [esi + 0x58]
lea ecx, [esp + 0x10]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x481eb3
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
je 0x481eb3
call edi
push eax
mov eax, dword [esi + 0x60]
push eax
push str.TaskID___u_exception_raised_in_method_CFileMgr::GetSize__get_file_size_fail_call_GetFileSize___error_code_is__d
push 0x4c89f8
call fcn.00453c20
add esp, 0x10
call edi
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], 0xd2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0xc
mov ecx, dword [esp + 0x10]
push 1
push 0
push 0
push ecx
call fcn.00499c50
mov edi, eax
mov ecx, edx
xor edx, edx
add edi, ebx
adc ecx, edx
test ecx, ecx
mov dword [esp + 0x20], ecx
jg 0x481f23
jl 0x481edb
test edi, edi
jae 0x481f0b
mov eax, dword [esi + 0x60]
push eax
push str.TaskID___u_exception_raised_in_method_CFileMgr::GetSize__file_size_is_too_huge
push 0x4c89f8
call fcn.00453c20
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], 0xda
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0xc
test ecx, ecx
jg 0x481f23
jl 0x481f16
cmp edi, 0xc
ja 0x481f23
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x14
ret 0xc
mov eax, dword [ebp]
cdq
cmp edx, ecx
jg 0x481f3e
jl 0x481f31
cmp eax, edi
jae 0x481f3e
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x14
ret 0xc
mov edx, dword [esi + 0x58]
lea ecx, [esp + 0x10]
push 0
push ecx
push 0
push edx
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0x30]
mov edx, dword [esi + 0x58]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [esp + 0x2c]
push 0
push eax
push 8
push ecx
push edx
call ebx
test eax, eax
je 0x4821c6
mov eax, dword [esp + 0x2c]
test eax, eax
jle 0x4821c6
mov edx, dword [esi + 0x58]
lea eax, [esp + 0x2c]
push 0
push eax
lea ecx, [esp + 0x1c]
push 4
push ecx
push edx
call ebx
test eax, eax
je 0x482191
mov eax, dword [esp + 0x2c]
test eax, eax
jle 0x482191
mov eax, dword [esp + 0x14]
add eax, 7
cdq
and edx, 7
add eax, edx
xor edx, edx
sar eax, 3
lea ecx, [eax + 0x10]
cmp edi, ecx
jne 0x481fce
cmp dword [esp + 0x20], edx
je 0x481fdb
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x14
ret 0xc
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x2c]
push 0
push ecx
mov dword [ebp], eax
push eax
mov eax, dword [esi + 0x58]
push edx
push eax
call ebx
test eax, eax
je 0x48215c
mov eax, dword [esp + 0x2c]
test eax, eax
jle 0x48215c
mov eax, dword [esi + 0x58]
lea ecx, [esp + 0x2c]
push 0
push ecx
lea edx, [esp + 0x20]
push 4
push edx
push eax
call ebx
test eax, eax
je 0x482127
mov eax, dword [esp + 0x2c]
test eax, eax
jle 0x482127
mov ecx, dword [ebp]
add ecx, 0xc
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edx, dword [esp + 0x34]
mov ebx, dword [sym.imp.MSVCRT.dll_memmove]
mov edi, eax
push 8
push edx
push edi
call ebx
lea eax, [esp + 0x24]
push 4
lea ecx, [edi + 8]
push eax
push ecx
call ebx
mov edx, dword [ebp]
mov eax, dword [esp + 0x44]
push edx
lea ecx, [edi + 0xc]
push eax
push ecx
call ebx
mov edx, dword [ebp]
add edx, 0xc
push edx
push edi
call fcn.00482200
mov ecx, dword [esp + 0x48]
add esp, 0x30
cmp eax, ecx
je 0x4820a3
push edi
mov dword [esi + 0x54], 0x113
mov dword [esi + 0x50], 0x7e30
call fcn.00437568
mov eax, dword [esi + 0x50]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0xc
push edi
call fcn.00437568
mov eax, dword [ebp]
add esp, 4
mov dword [esi + 0x40], eax
mov eax, dword [esp + 0x30]
mov ecx, dword [eax]
mov dword [esi + 0x48], ecx
mov edx, dword [eax + 4]
mov eax, dword [esp + 0x14]
mov dword [esi + 0x4c], edx
mov dword [esi + 0x44], eax
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x4820df
push eax
call fcn.00437568
add esp, 4
mov dword [esi + 0x3c], 0
mov ecx, dword [ebp]
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esi + 0x3c], eax
test eax, eax
jne 0x48210c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], 0x127
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0xc
mov edx, dword [ebp]
mov ecx, dword [esp + 0x28]
push edx
push ecx
push eax
call ebx
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0xc
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov edx, dword [esi + 0x60]
push eax
push edx
push str.TaskID___u_exception_raised_in_method_CFileMgr::Read__read_from_file_fail_call_ReadFile___error_code_is__d
push 0x4c89f8
call fcn.00453c20
add esp, 0x10
call edi
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], 0x10a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0xc
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push eax
mov eax, dword [esi + 0x60]
push eax
push str.TaskID___u_exception_raised_in_method_CFileMgr::Read__read_from_file_fail_call_ReadFile___error_code_is__d
push 0x4c89f8
call fcn.00453c20
add esp, 0x10
call edi
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], 0x103
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0xc
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov ecx, dword [esi + 0x60]
push eax
push ecx
push str.TaskID___u_exception_raised_in_method_CFileMgr::Read__read_from_file_fail_call_ReadFile___error_code_is__d
push 0x4c89f8
call fcn.00453c20
add esp, 0x10
call edi
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], 0xf6
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0xc
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov edx, dword [esi + 0x60]
push eax
push edx
push str.TaskID___u_exception_raised_in_method_CFileMgr::Read__read_from_file_fail_call_ReadFile___error_code_is__d
push 0x4c89f8
call fcn.00453c20
add esp, 0x10
call edi
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], 0xee
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0xc