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

Disassembly:
push 0x3d8
mov eax, 0x5359b4
call fcn.005078a4
mov dword [ebp - 0x3e0], ecx
mov eax, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0x3d4], eax
xor esi, esi
call fcn.0049a282
push eax
lea ecx, [ebp - 0x94]
call fcn.00496685
and dword [ebp - 4], esi
call fcn.0049a28e
mov ebx, eax
mov ecx, eax
call fcn.00496f55
lea ecx, [ebp - 0x94]
test al, al
je 0x499351
push dword [ebp - 0x3d4]
call fcn.004968ff
push esi
push 0x80
push 3
push esi
push 1
push SysReAllocString
lea ecx, [ebp - 0x94]
call fcn.00496da4
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
or ebx, 0xffffffff
mov dword [ebp - 0x3d0], eax
cmp eax, ebx
jne 0x4992f8
lea ecx, [ebp - 0x94]
mov dword [ebp - 4], ebx
call fcn.004967ad
jmp 0x4994e7
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x4992e5
and dword [ebp - 0x3d8], 0
push esi
call fcn.004eb6b1
pop ecx
push 0
mov edi, eax
lea eax, [ebp - 0x3d8]
push eax
push esi
push edi
push dword [ebp - 0x3d0]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x3d0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x3d8], esi
je 0x4994d5
push edi
call fcn.0050335f
pop ecx
xor edi, edi
jmp 0x4992e5
push ebx
call fcn.004968e2
call fcn.0049a4f6
test al, al
je 0x49936f
call fcn.0049a294
mov ebx, eax
mov dword [ebp - 0x3d0], ebx
jmp 0x4993db
call fcn.0049a29a
push eax
lea ecx, [ebp - 0x19c]
call fcn.00496685
push 0
lea ecx, [ebp - 0x19c]
mov byte [ebp - 4], 1
call fcn.00496da4
push eax
call fcn.004c78d2
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x3d8], eax
call fcn.00496da4
push eax
call fcn.004c99b0
mov ebx, eax
mov eax, dword [ebp - 0x3d8]
mov dword [ebp - 0x3d0], ebx
pop ecx
pop ecx
test eax, eax
je 0x4993cc
push eax
call fcn.0050335f
pop ecx
lea ecx, [ebp - 0x19c]
mov byte [ebp - 4], 0
call fcn.004967ad
test ebx, ebx
jne 0x4993e7
or ebx, 0xffffffff
jmp 0x4992e5
and dword [ebp - 0x3dc], 0
lea ecx, [ebp - 0x118]
or ebx, 0xffffffff
push ebx
push dword [ebp - 0x3d4]
call fcn.004966aa
push 0x53ade4
push 0x53ade8
lea ecx, [ebp - 0x118]
mov byte [ebp - 4], 2
call fcn.0049711f
lea eax, [ebp - 0x3cc]
push eax
lea eax, [ebp - 0x3dc]
push eax
push 1
lea ecx, [ebp - 0x118]
call fcn.00496da4
push eax
push dword [ebp - 0x3d0]
call fcn.004c9387
add esp, 0x14
test eax, eax
je 0x49945e
lea ecx, [ebp - 0x118]
mov byte [ebp - 4], 0
call fcn.004967ad
jmp 0x4992e5
mov esi, dword [ebp - 0x1a0]
test esi, esi
je 0x49944a
push esi
call fcn.004eb6b1
push esi
mov edi, eax
push edi
push dword [ebp - 0x3dc]
push dword [ebp - 0x3d0]
call fcn.004c9de7
add esp, 0x14
test eax, eax
je 0x4994b1
cmp eax, 0x600
je 0x4994b1
push edi
call fcn.0050335f
pop ecx
xor edi, edi
call fcn.0049a4f6
test al, al
jne 0x49944a
push dword [ebp - 0x3d0]
call fcn.004c916f
pop ecx
jmp 0x49944a
call fcn.0049a4f6
test al, al
jne 0x4994c6
push dword [ebp - 0x3d0]
call fcn.004c916f
pop ecx
lea ecx, [ebp - 0x118]
mov byte [ebp - 4], 0
call fcn.004967ad
lea ecx, [ebp - 0x94]
mov dword [ebp - 4], ebx
call fcn.004967ad
test edi, edi
jne 0x49955d
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push dword [ebp - 0x3d4]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x3d4], eax
cmp eax, ebx
je 0x49955d
xor ebx, ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x49955d
push esi
mov dword [ebp - 0x3d0], ebx
call fcn.004eb6b1
pop ecx
push ebx
mov ebx, dword [ebp - 0x3d4]
mov edi, eax
lea eax, [ebp - 0x3d0]
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x3d0], esi
je 0x49955d
push edi
call fcn.0050335f
pop ecx
xor edi, edi
lea eax, [ebp - 0x3e4]
push eax
push 0
push esi
push edi
call dword [sym.imp.GDI32.dll_AddFontMemResourceEx]
push edi
mov esi, eax
call fcn.0050335f
pop ecx
mov ecx, dword [ebp - 0x3e0]
push esi
add ecx, 0x508
call fcn.0049693d
call fcn.00507853
ret 4