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

Disassembly:
push 0xffffffffffffffff
push 0x4a08b6
mov eax, dword fs:[0]
push eax
sub esp, 0x354
mov eax, dword [0x4cacfc]
xor eax, esp
mov dword [esp + 0x350], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4cacfc]
xor eax, esp
push eax
lea eax, [esp + 0x368]
mov dword fs:[0], eax
mov eax, dword [esp + 0x37c]
mov ebp, dword [esp + 0x378]
mov dword [esp + 0x1c], eax
mov eax, dword [0x4cc358]
push 0xffffffffffffffff
lea ecx, [esp + 0x2c]
xor edx, edx
push eax
lea esi, [esp + 0x2c]
mov dword [esp + 0x1c], ebp
xor edi, edi
xor ebx, ebx
mov dword [esp + 0x2c], ecx
mov word [esp + 0x30], dx
call fcn.00402160
mov dword [esp + 0x370], ebx
mov eax, dword [0x4cc3e0]
cmp word [eax], bx
jne 0x4097b4
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4096eb
push eax
mov ecx, esi
push ecx
call fcn.00402020
mov edx, dword [esp + 0x24]
push 0
push 0x80
push 3
push 0
push 1
push connect
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x409738
mov dword [esp + 0x370], 0xffffffff
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x28]
cmp eax, ecx
je 0x4097f1
push eax
call fcn.0048836e
add esp, 4
jmp 0x4097f1
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
test ebx, ebx
jne 0x409770
mov dword [esp + 0x370], 0xffffffff
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x28]
cmp eax, edx
je 0x4097f1
push eax
call fcn.0048836e
add esp, 4
jmp 0x4097f1
push ebx
mov dword [esp + 0x18], 0
call fcn.0048690e
add esp, 4
push 0
mov edi, eax
lea eax, [esp + 0x18]
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x14], ebx
je 0x409a3c
push edi
call fcn.00487d04
add esp, 4
xor edi, edi
jmp 0x40970f
push eax
lea edx, [esp + 0x28]
push edx
call fcn.00402020
mov ebp, dword [0x511380]
test ebp, ebp
jne 0x409900
mov dword [esp + 0x370], 0xffffffff
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x28]
cmp eax, ecx
je 0x4097ed
push eax
call fcn.0048836e
add esp, 4
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
push 0
push 0x80
push 3
push 0
push 1
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40985f
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
test ebx, ebx
je 0x40985f
push ebx
mov dword [esp + 0x1c], 0
call fcn.0048690e
add esp, 4
push 0
lea ecx, [esp + 0x1c]
push ecx
push ebx
mov edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x18], ebx
je 0x40985f
push edi
call fcn.00487d04
add esp, 4
xor edi, edi
lea edx, [esp + 0x20]
push edx
push 0
push ebx
push edi
call dword [sym.imp.GDI32.dll_AddFontMemResourceEx]
push edi
mov ebx, eax
call fcn.00487d04
inc dword [ebp + 0x518]
mov ecx, dword [ebp + 0x518]
mov eax, dword [ebp + 0x51c]
add esp, 4
cmp ecx, eax
jl 0x4098c6
lea esi, [eax + eax]
test esi, esi
jne 0x40989b
mov esi, 0xb
mov ecx, dword [ebp + 0x514]
lea eax, [esi*4]
push eax
push ecx
call fcn.004884d7
add esp, 8
test eax, eax
je 0x409a69
mov dword [ebp + 0x51c], esi
mov dword [ebp + 0x514], eax
mov edx, dword [ebp + 0x518]
mov eax, dword [ebp + 0x514]
mov dword [eax + edx*4 - 4], ebx
mov ecx, dword [esp + 0x368]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x350]
xor ecx, esp
call fcn.00486dc0
add esp, 0x360
ret 8
mov ecx, dword [esp + 0x1c]
push 0xffffffffffffffff
lea edx, [esp + 0xb4]
xor eax, eax
push ecx
lea esi, [esp + 0xb4]
mov dword [esp + 0x20], 0
mov dword [esp + 0xb4], edx
mov word [esp + 0xb8], ax
call fcn.00402160
push 0x4b08ac
mov edx, esi
push edx
mov ecx, 0x4b08a8
mov byte [esp + 0x378], 2
call fcn.00402610
cmp dword [ebp], 1
je 0x40995f
mov dword [0x5113b4], 0x80000
jmp 0x409985
mov edx, dword [esp + 0xac]
mov esi, dword [ebp + 4]
lea eax, [esp + 0x134]
push eax
lea ecx, [esp + 0x1c]
push ecx
push edx
call fcn.0041f7a0
mov dword [0x5113b4], eax
test eax, eax
je 0x4099ba
mov eax, dword [esp + 0xac]
lea ecx, [esp + 0xb0]
cmp eax, ecx
je 0x4099a0
push eax
call fcn.0048836e
add esp, 4
mov dword [esp + 0x370], 0xffffffff
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x28]
cmp eax, edx
jmp 0x4097e2
mov ebx, dword [esp + 0x360]
test ebx, ebx
je 0x409985
push ebx
call fcn.0048690e
add esp, 4
cmp dword [ebp], 1
mov edi, eax
je 0x4099ed
push edi
mov dword [0x5113b4], 0x80000
call fcn.00487d04
add esp, 4
xor edi, edi
jmp 0x409985
mov eax, dword [esp + 0x18]
mov ebp, dword [ebp + 4]
push ebx
push edi
push eax
push ebp
call fcn.0041f880
mov dword [0x5113b4], eax
test eax, eax
je 0x409a1d
cmp eax, 0x600
je 0x409a1d
push edi
call fcn.00487d04
add esp, 4
xor edi, edi
jmp 0x409985
mov eax, dword [esp + 0xac]
lea ecx, [esp + 0xb0]
cmp eax, ecx
je 0x409a38
push eax
call fcn.0048836e
add esp, 4
mov ebp, dword [esp + 0x14]
mov dword [esp + 0x370], 0xffffffff
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x28]
cmp eax, edx
je 0x409a5c
push eax
call fcn.0048836e
add esp, 4
test edi, edi
jne 0x40985f
jmp 0x4097f1
dec dword [ebp + 0x518]
jmp 0x4098d6