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

Disassembly:
push 0x3e8
mov eax, 0x6703fe
call fcn.00621369
mov dword [ebp - 0x3f4], ecx
mov ebx, dword [ebp + 8]
xor eax, eax
push 0x84
push eax
mov edi, eax
mov dword [ebp - 0x1c], ebx
mov esi, eax
lea eax, [ebp - 0xac]
push eax
call fcn.00638f20
add esp, 0xc
lea ecx, [ebp - 0xac]
push 0x70bd50
call fcn.0050d5b0
xor ecx, ecx
mov dword [ebp - 4], ecx
mov eax, dword [0x70bdd8]
cmp word [eax], cx
jne 0x512fa0
test ebx, ebx
je 0x512f14
push ebx
lea ecx, [ebp - 0xac]
call fcn.0050d5d5
xor ecx, ecx
push ecx
push 0x80
push 3
push ecx
push 1
push closesocket
push dword [ebp - 0xac]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
or ebx, 0xffffffff
mov dword [ebp - 0x3f0], eax
cmp eax, ebx
jne 0x512f50
lea ecx, [ebp - 0xac]
mov dword [ebp - 4], ebx
call fcn.0041b502
jmp 0x513133
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x512f3d
and dword [ebp - 0x18], 0
push esi
call fcn.00620204
pop ecx
push 0
mov edi, eax
lea eax, [ebp - 0x18]
push eax
push esi
push edi
push dword [ebp - 0x3f0]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x3f0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18], esi
je 0x513121
push edi
call fcn.006201f6
pop ecx
xor edi, edi
jmp 0x512f3d
push eax
lea ecx, [ebp - 0xac]
call fcn.0050d5d5
cmp byte [0x703a99], 0
je 0x512fc3
mov ebx, dword [0x715b3c]
mov dword [ebp - 0x3f0], ebx
jmp 0x51302e
push 0x84
lea eax, [ebp - 0x1bc]
push 0
push eax
call fcn.00638f20
add esp, 0xc
lea ecx, [ebp - 0x1bc]
push 0x70be60
call fcn.0050d5b0
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x1bc]
call fcn.005145e5
mov ecx, dword [ebp - 0xac]
xor edx, edx
push eax
push 2
mov dword [ebp - 0x18], eax
call fcn.00519d94
mov ebx, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x3f0], ebx
pop ecx
pop ecx
test eax, eax
je 0x513023
push eax
call fcn.006201f6
pop ecx
lea ecx, [ebp - 0x1bc]
call fcn.0041b502
test ebx, ebx
jne 0x51303a
or ebx, 0xffffffff
jmp 0x512f3d
and dword [ebp - 0x18], 0
lea eax, [ebp - 0x134]
push 0x84
push 0
push eax
call fcn.00638f20
add esp, 0xc
lea ecx, [ebp - 0x134]
or ebx, 0xffffffff
push ebx
push dword [ebp - 0x1c]
call fcn.0050d58c
push 0x6d2884
push 0x6cdc00
lea ecx, [ebp - 0x134]
mov byte [ebp - 4], 2
call fcn.0050d988
mov edx, dword [ebp - 0x134]
lea eax, [ebp - 0x3ec]
push eax
lea eax, [ebp - 0x18]
push eax
push ecx
mov ecx, dword [ebp - 0x3f0]
call fcn.00519e8a
add esp, 0xc
test eax, eax
je 0x5130b3
lea ecx, [ebp - 0x134]
call fcn.0041b502
jmp 0x512f3d
mov esi, dword [ebp - 0x1c0]
test esi, esi
je 0x5130a3
push esi
call fcn.00620204
mov edx, dword [ebp - 0x18]
mov edi, eax
mov ecx, dword [ebp - 0x3f0]
push esi
push edi
call fcn.00519ebd
add esp, 0xc
test eax, eax
je 0x513102
cmp eax, 0x600
je 0x513102
push edi
call fcn.006201f6
xor edi, edi
cmp byte [0x703a99], 0
pop ecx
jne 0x5130a3
mov ecx, dword [ebp - 0x3f0]
call fcn.00519eee
jmp 0x5130a3
cmp byte [0x703a99], 0
jne 0x513116
mov ecx, dword [ebp - 0x3f0]
call fcn.00519eee
lea ecx, [ebp - 0x134]
call fcn.0041b502
lea ecx, [ebp - 0xac]
mov dword [ebp - 4], ebx
call fcn.0041b502
test edi, edi
jne 0x51319d
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x3f0], eax
cmp eax, ebx
je 0x51319d
xor ebx, ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test esi, esi
je 0x51319d
push esi
mov dword [ebp - 0x1c], ebx
call fcn.00620204
pop ecx
push ebx
mov ebx, dword [ebp - 0x3f0]
mov edi, eax
lea eax, [ebp - 0x1c]
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 - 0x1c], esi
je 0x51319d
push edi
call fcn.006201f6
pop ecx
xor edi, edi
lea eax, [ebp - 0x20]
push eax
push 0
push esi
push edi
call dword [sym.imp.GDI32.dll_AddFontMemResourceEx]
push edi
mov esi, eax
call fcn.006201f6
pop ecx
mov ecx, dword [ebp - 0x3f4]
push esi
add ecx, 0x46c
call fcn.0050d3fd
call fcn.00621313
ret 4