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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x431ac7
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1090
call fcn.00430f20
push ebx
push esi
push edi
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x24], vtable.SaFile.0
mov dword [ebp - 0x20], 0xffffffff
call dword [sym.imp.mfc90.dll_Ordinal_316]
mov dword [ebp - 0x24], vtable.SaFileReader.0
mov byte [ebp - 4], 1
cmp esi, ebx
jne 0x41669c
mov eax, 0x80070057
mov dword [ebp - 0x44], eax
push 0x43c408
lea eax, [ebp - 0x44]
push eax
call sub.MSVCR90.dll__CxxThrowException
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x4166bf
mov eax, 0x80042001
jmp 0x41668b
push esi
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x20], eax
call dword [sym.imp.mfc90.dll_Ordinal_820]
mov edi, dword [ebp - 0x20]
cmp edi, 0xffffffff
jne 0x4166de
mov esi, ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], esi
jmp 0x416704
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x28], eax
cmp eax, 0x1000
jae 0x4166fa
mov esi, eax
mov dword [ebp - 0x2c], esi
jmp 0x416704
mov dword [ebp - 0x2c], 0x1000
mov esi, dword [ebp - 0x2c]
mov dword [ebp - 0x18], ebx
mov ebx, dword [ebp - 0x28]
lea ebx, [ebx]
test ebx, ebx
je 0x4167fe
cmp ebx, esi
jae 0x41671e
mov esi, ebx
mov dword [ebp - 0x34], 0
cmp edi, 0xffffffff
jne 0x416731
mov eax, 0x80042007
jmp 0x416757
push 0
lea ecx, [ebp - 0x34]
push ecx
push esi
lea edx, [ebp - 0x109c]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [ebp - 0x20]
neg eax
sbb eax, eax
and eax, 0x7ffbdffd
add eax, 0x80042003
mov cl, 1
test cl, cl
je 0x416772
test eax, eax
jge 0x416772
mov dword [ebp - 0x50], eax
push 0x43c408
lea eax, [ebp - 0x50]
push eax
call sub.MSVCR90.dll__CxxThrowException
cmp dword [ebp - 0x34], esi
je 0x416790
test cl, cl
je 0x416790
push 0x43c408
lea ecx, [ebp - 0x4c]
push ecx
mov dword [ebp - 0x4c], 0x80042009
call sub.MSVCR90.dll__CxxThrowException
xor edx, edx
cmp edx, esi
jae 0x4167ed
cmp byte [ebp + edx - 0x109c], 0xff
jne 0x4167e8
mov al, byte [ebp + edx - 0x109b]
mov cl, al
and cl, 0xe0
cmp cl, 0xe0
jne 0x4167e8
test al, 0x10
je 0x4167e8
and al, 0xa
cmp al, 0xa
jne 0x4167e8
movzx eax, byte [ebp + edx - 0x109a]
mov ecx, eax
shr ecx, 4
dec ecx
cmp ecx, 0xd
ja 0x4167e8
shr eax, 2
and eax, 3
cmp eax, 2
ja 0x4167e8
add dword [ebp - 0x18], edx
cmp edi, 0xffffffff
jne 0x416819
mov eax, 0x80042007
jmp 0x41682d
add edx, 4
jmp 0x416792
xor al, al
jne 0x4167dc
add dword [ebp - 0x18], esi
sub ebx, esi
mov esi, dword [ebp - 0x2c]
jmp 0x416710
mov al, 1
test al, al
je 0x4167dc
push 0x43c408
lea edx, [ebp - 0x38]
push edx
mov dword [ebp - 0x38], 0x80042009
call sub.MSVCR90.dll__CxxThrowException
mov eax, dword [ebp - 0x18]
push 0
push 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [ebp - 0x20]
xor eax, eax
mov cl, 1
test cl, cl
je 0x416848
test eax, eax
jge 0x416848
push 0x43c408
lea ecx, [ebp - 0x48]
push ecx
mov dword [ebp - 0x48], eax
call sub.MSVCR90.dll__CxxThrowException
mov dword [ebp - 0x30], 0
cmp edi, 0xffffffff
jne 0x41685b
mov eax, 0x80042007
jmp 0x41687f
push 0
lea edx, [ebp - 0x30]
push edx
push 4
lea eax, [ebp - 0x40]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, dword [ebp - 0x20]
neg eax
sbb eax, eax
and eax, 0x7ffbdffd
add eax, 0x80042003
mov cl, 1
test cl, cl
je 0x41689a
test eax, eax
jge 0x41689a
push 0x43c408
lea ecx, [ebp - 0x54]
push ecx
mov dword [ebp - 0x54], eax
call sub.MSVCR90.dll__CxxThrowException
cmp dword [ebp - 0x30], 4
je 0x4168b9
test cl, cl
je 0x4168b9
push 0x43c408
lea edx, [ebp - 0x3c]
push edx
mov dword [ebp - 0x3c], 0x80042009
call sub.MSVCR90.dll__CxxThrowException
mov eax, 1
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x58], eax
movzx eax, byte [ebp - 0x3e]
shr eax, 4
mov dword [ebp - 0x90], 0x7d00
mov dword [ebp - 0x8c], 0x9c40
mov dword [ebp - 0x88], 0xbb80
mov dword [ebp - 0x84], 0xdac0
mov dword [ebp - 0x80], 0xfa00
mov dword [ebp - 0x7c], 0x13880
mov dword [ebp - 0x78], 0x17700
mov dword [ebp - 0x74], 0x1b580
mov dword [ebp - 0x70], 0x1f400
mov dword [ebp - 0x6c], 0x27100
mov dword [ebp - 0x68], 0x2ee00
mov dword [ebp - 0x64], 0x36b00
mov dword [ebp - 0x60], 0x3e800
mov dword [ebp - 0x5c], 0x4e200
mov esi, dword [ebp + eax*4 - 0x94]
shr esi, 3
test esi, esi
jne 0x416987
mov dword [ebp - 0x24], vtable.SaFile.0
cmp edi, 0xffffffff
je 0x416968
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x416968
mov dword [ebp - 0x20], 0xffffffff
lea ecx, [ebp - 0x1c]
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x28]
xor ecx, ecx
xor edx, edx
sub eax, dword [ebp - 0x18]
push ecx
push 0x3e8
sbb edx, ecx
push edx
push eax
call fcn.00430ee0
push 0
push esi
push edx
push eax
call fcn.00430f50
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov dword [ebp - 0x24], vtable.SaFile.0
cmp edi, 0xffffffff
je 0x4169d0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4169d0
mov dword [ebp - 0x20], 0xffffffff
lea ecx, [ebp - 0x1c]
call dword [sym.imp.mfc90.dll_Ordinal_601]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret