Function at 0x40748b
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x48
push ebx
push ebp
push esi
push edi
xor ebx, ebx
xor esi, esi
push ebx
push 0x80
push 3
pop eax
push eax
push ebx
inc esi
mov dword [esp + 0x28], ebx
push esi
push 0x80000000
push dword [esp + 0x74]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4074d8
push dword [esp + 0x5c]
push str.GetTTFNameString
push str._s:_failed_opening_file___s__n
call fcn.00406c04
add esp, 0xc
jmp 0x4077ee
push ebx
lea eax, [esp + 0x1c]
push eax
push 0xc
lea eax, [esp + 0x38]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x30]
shr eax, 8
movzx ebp, al
movzx eax, byte [esp + 0x30]
shl ax, 8
or bp, ax
mov eax, dword [esp + 0x2c]
shr eax, 8
movzx ecx, al
movzx eax, byte [esp + 0x2c]
shl ax, 8
or cx, ax
mov word [esp + 0x30], bp
mov eax, dword [esp + 0x2e]
shr eax, 8
movzx edx, al
movzx eax, byte [esp + 0x2e]
shl ax, 8
or dx, ax
mov word [esp + 0x2c], cx
mov word [esp + 0x2e], dx
cmp cx, si
jne 0x4077f2
test dx, dx
jne 0x4077f2
xor eax, eax
mov esi, ebx
cmp ax, bp
jae 0x4077e7
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea eax, [esp + 0x1c]
push eax
push 0x10
lea eax, [esp + 0x54]
push eax
push edi
call ebp
push 5
lea eax, [esp + 0x4c]
push eax
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [esp + 0x1c]
mov byte [esp + 0x20], bl
push eax
push str.name
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x4075ab
movzx eax, word [esp + 0x30]
inc esi
cmp esi, eax
jl 0x407562
jmp 0x4077e7
mov ecx, dword [esp + 0x54]
mov edx, ecx
movzx eax, cl
shl ax, 8
movzx esi, ax
shr ecx, 8
movzx eax, cl
or esi, eax
mov ecx, dword [esp + 0x50]
shr edx, 0x10
mov eax, edx
shl esi, 0x10
shr eax, 8
movzx eax, al
or esi, eax
movzx eax, dl
shl ax, 8
mov edx, ecx
movzx eax, ax
or esi, eax
shr edx, 0x10
movzx eax, cl
shl ax, 8
mov dword [esp + 0x54], esi
movzx esi, ax
shr ecx, 8
movzx eax, cl
or esi, eax
mov eax, edx
shr eax, 8
movzx eax, al
shl esi, 0x10
or esi, eax
movzx eax, dl
shl ax, 8
push ebx
movzx eax, ax
or esi, eax
push ebx
push esi
push edi
mov dword [esp + 0x60], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [esp + 0x1c]
push eax
push 6
lea eax, [esp + 0x30]
push eax
push edi
call ebp
mov eax, dword [esp + 0x26]
mov esi, ebx
shr eax, 8
movzx edx, al
movzx eax, byte [esp + 0x26]
shl ax, 8
or dx, ax
mov eax, dword [esp + 0x28]
shr eax, 8
movzx ecx, al
movzx eax, byte [esp + 0x28]
shl ax, 8
or cx, ax
mov word [esp + 0x26], dx
xor eax, eax
mov word [esp + 0x28], cx
cmp ax, dx
jae 0x4077e7
push ebx
lea eax, [esp + 0x1c]
push eax
push 0xc
lea eax, [esp + 0x44]
push eax
push edi
call ebp
mov eax, dword [esp + 0x3e]
shr eax, 8
movzx ecx, al
movzx eax, byte [esp + 0x3e]
shl ax, 8
or cx, ax
mov eax, dword [esp + 0x38]
shr eax, 8
movzx edx, al
movzx eax, byte [esp + 0x38]
shl ax, 8
or dx, ax
mov word [esp + 0x3e], cx
mov eax, dword [esp + 0x3c]
shr eax, 8
movzx eax, al
mov word [esp + 0x12], ax
movzx eax, byte [esp + 0x3c]
shl ax, 8
or word [esp + 0x12], ax
mov ax, word [esp + 0x12]
mov word [esp + 0x3c], ax
mov eax, dword [esp + 0x40]
shr eax, 8
movzx eax, al
mov word [esp + 0x14], ax
movzx eax, byte [esp + 0x40]
shl ax, 8
or word [esp + 0x14], ax
mov ax, word [esp + 0x14]
mov word [esp + 0x40], ax
mov eax, dword [esp + 0x42]
shr eax, 8
movzx eax, al
mov word [esp + 0x16], ax
movzx eax, byte [esp + 0x42]
shl ax, 8
or word [esp + 0x16], ax
mov ax, word [esp + 0x16]
mov word [esp + 0x42], ax
movzx eax, cx
mov word [esp + 0x38], dx
cmp eax, dword [esp + 0x60]
jne 0x407750
push 3
pop eax
cmp dx, ax
jne 0x407750
mov eax, 0x409
cmp word [esp + 0x12], ax
je 0x407763
movzx eax, word [esp + 0x26]
inc esi
cmp esi, eax
jl 0x407678
jmp 0x4077e7
movzx eax, word [esp + 0x16]
movzx ecx, word [esp + 0x28]
add eax, dword [esp + 0x50]
movzx ebp, word [esp + 0x14]
add ecx, eax
push ebx
push ebx
push ecx
push edi
shr ebp, 1
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
movzx eax, word [esp + 0x40]
add eax, 2
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
movzx ecx, word [esp + 0x40]
mov esi, eax
push ebx
lea eax, [esp + 0x1c]
push eax
push ecx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test ebp, ebp
jle 0x4077c8
movzx eax, byte [esi + ebx*2]
movzx ecx, byte [esi + ebx*2 + 1]
shl ax, 8
or cx, ax
mov word [esi + ebx*2], cx
inc ebx
cmp ebx, ebp
jl 0x4077af
push dword [esp + 0x68]
xor eax, eax
push esi
push dword [esp + 0x6c]
mov word [esi + ebp*2], ax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
xor ebx, ebx
push esi
inc ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
jmp 0x4077f4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret