Function at 0x407048
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push dword [ebp + 8]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x407093
push dword [ebp + 8]
push str.GetTTFNameString
push str._s:_failed_opening_file___s__n
call fcn.00406429
add esp, 0xc
jmp 0x4072ab
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x34]
push ecx
push eax
call esi
movzx ax, byte [ebp - 0x2f]
mov ah, byte [ebp - 0x30]
mov word [ebp - 0x30], ax
movzx ax, byte [ebp - 0x33]
mov ah, byte [ebp - 0x34]
mov word [ebp - 0x34], ax
cmp word [ebp - 0x34], 1
movzx ax, byte [ebp - 0x31]
mov ah, byte [ebp - 0x32]
mov word [ebp - 0x32], ax
jne 0x4072b0
cmp ax, bx
jne 0x4072b0
push edi
xor edi, edi
cmp word [ebp - 0x30], bx
jbe 0x4072a1
push ebx
lea eax, [ebp - 8]
push eax
push 0x10
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 4]
call esi
push 5
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x14]
push eax
push str.name
mov byte [ebp - 0x10], bl
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x407130
movzx eax, word [ebp - 0x30]
inc edi
cmp edi, eax
jl 0x4070ec
jmp 0x4072a1
mov eax, dword [ebp - 0x38]
xor ecx, ecx
mov ch, byte [ebp - 0x38]
shr eax, 0x10
xor edx, edx
mov dh, al
movzx eax, ah
mov cl, byte [ebp - 0x37]
push ebx
push ebx
movzx edx, dx
shl ecx, 0x10
or ecx, edx
or ecx, eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x38], ecx
xor ecx, ecx
mov ch, byte [ebp - 0x3c]
shr eax, 0x10
xor edx, edx
mov dh, al
movzx eax, ah
mov cl, byte [ebp - 0x3b]
movzx edx, dx
shl ecx, 0x10
or ecx, edx
or ecx, eax
push ecx
push dword [ebp - 4]
mov dword [ebp - 0x3c], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [ebp - 8]
push eax
push 6
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 4]
call esi
movzx ax, byte [ebp - 0x19]
mov ah, byte [ebp - 0x1a]
xor edi, edi
mov word [ebp - 0x1a], ax
cmp word [ebp - 0x1a], bx
movzx ax, byte [ebp - 0x17]
mov ah, byte [ebp - 0x18]
mov word [ebp - 0x18], ax
jbe 0x4072a1
push ebx
lea eax, [ebp - 8]
push eax
push 0xc
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call esi
movzx ax, byte [ebp - 0x21]
mov ah, byte [ebp - 0x22]
mov word [ebp - 0x22], ax
movzx ax, byte [ebp - 0x27]
mov ah, byte [ebp - 0x28]
mov word [ebp - 0x28], ax
movzx ax, byte [ebp - 0x23]
mov ah, byte [ebp - 0x24]
mov word [ebp - 0x24], ax
movzx ax, byte [ebp - 0x1f]
mov ah, byte [ebp - 0x20]
mov word [ebp - 0x20], ax
movzx ax, byte [ebp - 0x1d]
mov ah, byte [ebp - 0x1e]
mov word [ebp - 0x1e], ax
movzx eax, word [ebp - 0x22]
cmp eax, dword [ebp + 0xc]
jne 0x407218
cmp word [ebp - 0x28], 3
jne 0x407218
cmp word [ebp - 0x24], 0x409
je 0x407223
movzx eax, word [ebp - 0x1a]
inc edi
cmp edi, eax
jl 0x4071b4
jmp 0x4072a1
movzx eax, word [ebp - 0x1e]
movzx ecx, word [ebp - 0x18]
add eax, dword [ebp - 0x3c]
movzx edi, word [ebp - 0x20]
push ebx
push ebx
add ecx, eax
push ecx
push dword [ebp - 4]
shr edi, 1
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
movzx eax, word [ebp - 0x20]
inc eax
inc eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push ebx
lea ecx, [ebp - 8]
push ecx
movzx ecx, word [ebp - 0x20]
push ecx
push eax
push dword [ebp - 4]
mov dword [ebp - 0xc], eax
call esi
xor esi, esi
cmp edi, ebx
jle 0x40727f
mov eax, dword [ebp - 0xc]
lea eax, [eax + esi*2]
movzx cx, byte [eax + 1]
mov ch, byte [eax]
inc esi
cmp esi, edi
mov word [eax], cx
jl 0x40726a
push dword [ebp + 0x14]
mov esi, dword [ebp - 0xc]
push esi
push dword [ebp + 0x10]
mov word [esi + edi*2], bx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
push esi
mov dword [ebp - 0xc], 1
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, dword [ebp - 0xc]
jmp 0x4072b2
xor eax, eax
pop esi
pop ebx
leave
ret