Function at 0x490f10
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x5c
mov esi, dword [0x51a10c]
mov dword [esp + 0x4c], esi
mov esi, dword [esp + 0x78]
mov ebp, dword [esp + 0x70]
mov edi, dword [esp + 0x74]
mov ecx, dword [ebp + 0x58]
test ecx, ecx
je 0x490ff0
mov eax, dword [ecx]
call dword [eax + 0x14]
xor edx, edx
test eax, eax
cmovns edx, eax
mov dword [esp + 0x2c], edx
setle dl
mov eax, edi
mov dword [ebx], 0xffffffff
or eax, esi
mov dword [ebx + 4], 0xffffffff
setne al
mov dword [ebx + 8], 0
and eax, edx
lea edx, [ebp + 0x24]
mov ecx, edx
mov byte [esp + 0x24], al
mov dword [esp + 0x28], edx
call method.std::__basic_file_char_.is_open___const
cmp al, 1
jne 0x490f87
cmp byte [esp + 0x24], 0
je 0x490fa8
mov eax, dword [esp + 0x4c]
sub eax, dword [0x51a10c]
jne 0x49115e
add esp, 0x5c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret 0x14
cmp dword [esp + 0x7c], 1
jne 0x491020
mov eax, edi
or eax, esi
jne 0x491020
cmp byte [ebp + 0x46], 0
jne 0x491008
mov eax, dword [ebp + 0x30]
cmp byte [ebp + 0x45], 0
mov dword [esp + 0x34], eax
je 0x491158
mov eax, dword [ebp + 0x38]
mov ecx, ebp
mov dword [esp + 0x34], eax
lea eax, [esp + 0x34]
mov dword [esp], eax
call method.std::basic_filebuf_wchar_t__std::char_traits_wchar_t___._M_get_ext_pos_int_
mov edi, eax
sub esp, 4
mov esi, eax
sar edi, 0x1f
jmp 0x4910fd
mov dword [esp + 0x2c], 0
mov edx, 1
jmp 0x490f4d
mov ecx, dword [ebp + 0x58]
mov eax, dword [ecx]
call dword [eax + 0x18]
test al, al
jne 0x4910e8
lea esi, cs:[esi]
mov ecx, dword [ebp + 0x30]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x2c]
mov eax, ecx
imul esi, ecx
cdq
mov eax, edx
mov edx, ecx
imul eax, edi
add eax, esi
mov ecx, eax
mov eax, edx
mul edi
mov edi, edx
mov esi, eax
movzx eax, byte [ebp + 0x45]
add edi, ecx
cmp byte [ebp + 0x54], 0
je 0x491081
mov edx, dword [ebp + 4]
cmp dword [ebp + 8], edx
mov byte [ebp + 0x54], 0
mov ecx, dword [ebp + 0x4c]
setne dl
movd xmm0, dword [ebp + 0x3c]
movzx edx, dl
lea edx, [ecx + edx*2]
mov ecx, dword [ebp + 0x50]
movd xmm1, edx
mov dword [ebp + 0x4c], edx
mov dword [ebp + 0xc], ecx
punpckldq xmm0, xmm1
movq qword [ebp + 4], xmm0
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x34], ecx
test al, al
je 0x4910a0
cmp dword [esp + 0x7c], 1
je 0x491163
mov eax, dword [esp + 0x34]
mov dword [esp + 0x24], eax
mov ecx, dword [esp + 0x24]
mov dword [esp + 4], esi
lea eax, [esp + 0x38]
mov dword [esp + 8], edi
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x7c]
mov dword [esp], ebp
mov dword [esp + 0xc], ecx
mov ecx, eax
call method.std::basic_filebuf_wchar_t__std::char_traits_wchar_t___._M_seek_long_long__std::_Ios_Seekdir__int_
sub esp, 0x14
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
mov dword [ebx], eax
mov eax, dword [esp + 0x40]
mov dword [ebx + 4], edx
mov dword [ebx + 8], eax
jmp 0x490f87
mov eax, dword [ebp + 0x30]
cmp byte [ebp + 0x45], 0
mov dword [esp + 0x34], eax
jne 0x490fcc
xor esi, esi
xor edi, edi
cmp byte [ebp + 0x46], 0
je 0x491110
mov esi, dword [ebp + 0x14]
sub esi, dword [ebp + 0x10]
sar esi, 1
mov edi, esi
sar edi, 0x1f
mov dword [esp + 8], 1
mov ecx, dword [esp + 0x28]
mov dword [esp], 0
mov dword [esp + 4], 0
call method.std::__basic_file_char_.seekoff_long_long__std::_Ios_Seekdir_
mov ecx, eax
sub esp, 0xc
and ecx, edx
cmp ecx, 0xffffffff
je 0x490f87
add esi, eax
mov eax, dword [esp + 0x34]
adc edi, edx
mov dword [ebx], esi
mov dword [ebx + 4], edi
mov dword [ebx + 8], eax
jmp 0x490f87
xor esi, esi
xor edi, edi
jmp 0x491110
call dbg.__stack_chk_fail
mov eax, dword [ebp + 0x38]
mov ecx, ebp
mov dword [esp + 0x34], eax
lea eax, [esp + 0x34]
mov dword [esp], eax
call method.std::basic_filebuf_wchar_t__std::char_traits_wchar_t___._M_get_ext_pos_int_
push edx
cdq
add esi, eax
adc edi, edx
jmp 0x491098