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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51fb00
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x569638]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0xc]
xor edi, edi
mov dword [ebp + 0xc], edi
cmp ebx, edi
je 0x489c7a
cmp dword [ebp + 0x10], edi
je 0x489c7a
mov eax, dword [0x570fac]
mov edx, dword [eax + 0xc]
mov ecx, 0x570fac
call edx
lea esi, [eax + 0x10]
mov dword [ebp + 0xc], esi
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocStringLen
mov dword [ebp - 4], edi
push ebx
mov dword [ebp - 0x14], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x489b19
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
lea edi, [ebp + 0xc]
call fcn.00417c10
test eax, eax
je 0x489b14
push 0
lea ecx, [ebp - 0x14]
push ecx
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, dword [ebp + 0xc]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004f422e
add esp, 8
test eax, eax
jl 0x489b0a
cmp eax, dword [esi - 8]
jg 0x489b0a
xor edx, edx
mov dword [esi - 0xc], eax
push ebx
mov word [esi + eax*2], dx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x489b17
push 0x80070057
call fcn.0042c060
mov esi, dword [ebp + 0xc]
xor edi, edi
cmp dword [esi - 0xc], edi
je 0x489c2b
cmp dword [ebp - 0x14], edi
je 0x489c2b
mov eax, dword [0x570fac]
mov edx, dword [eax + 0xc]
mov ecx, 0x570fac
call edx
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 1
cmp dword [esi - 0xc], edi
jl 0x489bf4
push str._language_font_face_
push esi
call fcn.004f5160
add esp, 8
cmp eax, edi
je 0x489bf4
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x489bf4
mov edx, dword [ebp + 0x10]
mov ecx, eax
lea esi, [ebp + 0xc]
call fcn.00417a60
cmp eax, 0xffffffff
je 0x489bf4
mov ecx, eax
mov edx, str.face_
call fcn.00417a60
mov ebx, eax
cmp ebx, 0xffffffff
je 0x489bf4
add ebx, 6
mov ecx, ebx
mov edx, 0x53eb40
call fcn.00417a60
cmp eax, 0xffffffff
je 0x489bf4
push ebx
mov ecx, esi
push ecx
sub eax, ebx
lea ecx, [ebp - 0x18]
call fcn.0042a820
lea edx, [ebp - 0x1c]
push edx
push 0x542178
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
push ecx
mov dword [ebp - 0x1c], edi
call fcn.00427f80
lea edi, [ebp - 0x10]
mov byte [ebp - 4], 3
call fcn.0042b950
lea ecx, [ebp - 0x20]
call fcn.004062c0
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.004062c0
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.0042b8e0
mov esi, dword [ebp + 8]
add eax, 0x10
lea ecx, [ebp - 0x10]
mov dword [esi], eax
call fcn.004062c0
lea ecx, [ebp + 0xc]
call fcn.004062c0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [0x570fac]
mov eax, dword [edx + 0xc]
mov ecx, 0x570fac
call eax
mov edi, dword [ebp + 8]
add eax, 0x10
add esi, 0xfffffff0
mov dword [edi], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x489c66
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x570fac]
mov edx, dword [eax + 0xc]
mov ecx, 0x570fac
call edx
mov ecx, eax
mov eax, dword [ebp + 8]
add ecx, 0x10
mov dword [eax], ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret