Function at 0x51499c
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb4
push ebx
push esi
push edi
mov dword [ebp - 0x48], edx
mov dword [ebp - 4], eax
mov eax, 0x56498f
mov dword [ebp - 0x3c], 0x6c81b8
mov dword [ebp - 0x38], esp
mov dword [ebp - 0x40], eax
mov word [ebp - 0x34], 0
xor edx, edx
mov edi, 0x7bfd08
mov dword [ebp - 0x28], edx
mov ecx, dword fs:[0]
mov dword [ebp - 0x44], ecx
lea eax, [ebp - 0x44]
mov dword fs:[0], eax
mov word [ebp - 0x34], 8
mov edx, dword [ebp - 4]
xor ecx, ecx
mov dword [edx], ecx
inc dword [ebp - 0x28]
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x48]
add eax, 0x14
call fcn.005f3660
add dword [ebp - 0x28], 3
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x10], 1
mov ebx, dword [ebp - 0x48]
mov eax, dword [ebx]
test eax, eax
je 0x514a17
inc dword [eax]
mov edx, dword [ebp - 4]
mov eax, dword [edx]
test eax, eax
je 0x514a25
call fcn.00408920
mov edx, dword [ebx]
mov ecx, dword [ebp - 4]
mov dword [ecx], edx
cmp dword [0x6a7c68], 0
je 0x514a80
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov esi, dword [ebp - 4]
add esi, 0x18
cmp dword [esi], 0
je 0x514a6c
mov ebx, dword [esi]
test ebx, ebx
jne 0x514a5c
xor eax, eax
jmp 0x514a71
cmp dword [ebx + 4], 0
je 0x514a67
mov eax, dword [ebx + 4]
jmp 0x514a71
lea eax, [ebx + 8]
jmp 0x514a71
mov eax, dword [0x6a9384]
push eax
call dword [0x6a7c68]
mov edx, dword [ebp - 4]
mov dword [edx + 4], eax
jmp 0x514afb
mov word [ebp - 0x34], 0x20
lea ecx, [ebp - 0xc]
mov edx, dword [ebp - 4]
add edx, 0x18
cmp dword [edx], 0
je 0x514aae
mov eax, dword [edx]
test eax, eax
jne 0x514a9e
xor edx, edx
jmp 0x514ab4
cmp dword [eax + 4], 0
je 0x514aa9
mov edx, dword [eax + 4]
jmp 0x514ab4
lea edx, [eax + 8]
jmp 0x514ab4
mov edx, dword [0x6a9384]
mov eax, ecx
call fcn.0043ac80
inc dword [ebp - 0x28]
mov word [ebp - 0x34], 0x2c
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov ecx, dword [ebp - 8]
push ecx
call sub.KERNEL32.DLL_CreateFileA
mov edx, dword [ebp - 4]
mov dword [edx + 4], eax
dec dword [ebp - 0x28]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.0043ad64
mov word [ebp - 0x34], 8
mov eax, dword [ebp - 4]
cmp dword [eax + 4], 0xffffffff
jne 0x514b21
cmp dword [0x7bfddc], 0
je 0x514b14
mov eax, dword [0x7bfddc]
jmp 0x514b19
mov eax, dword [0x7bfdd8]
mov edx, dword [ebp - 0x48]
call fcn.006689e0
mov ecx, dword [ebp - 4]
xor eax, eax
mov dword [ecx + 8], eax
mov edx, dword [ebp - 4]
xor ecx, ecx
mov dword [edx + 0xc], ecx
mov word [ebp - 0x34], 0x38
push 0
push 0
push 0
push 2
push 0
mov eax, dword [ebp - 4]
mov edx, dword [eax + 4]
push edx
call sub.KERNEL32.DLL_CreateFileMappingA
mov ebx, eax
mov eax, dword [ebp - 4]
mov dword [eax + 8], ebx
test ebx, ebx
jne 0x514ba6
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 4]
push ecx
call sub.KERNEL32.DLL_CloseHandle
mov word [ebp - 0x34], 0x44
mov eax, str.CreateFileMapping_failed.
call fcn.00408c54
mov dword [ebp - 0x10], eax
inc dword [ebp - 0x28]
lea edx, [ebp - 0x10]
cmp dword [edi + 8], 0
je 0x514b89
mov eax, dword [edi + 8]
jmp 0x514b8c
mov eax, dword [edi + 4]
call fcn.006689e0
dec dword [ebp - 0x28]
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x514ba0
call fcn.00408920
mov word [ebp - 0x34], 0x38
push 0
push 0
push 0
push 4
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 8]
push ecx
call sub.KERNEL32.DLL_MapViewOfFile
mov ebx, eax
mov eax, dword [ebp - 4]
mov dword [eax + 0xc], ebx
test ebx, ebx
jne 0x514c1f
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 8]
push ecx
call sub.KERNEL32.DLL_CloseHandle
mov eax, dword [ebp - 4]
mov edx, dword [eax + 4]
push edx
call sub.KERNEL32.DLL_CloseHandle
mov word [ebp - 0x34], 0x5c
mov eax, str.MapViewOfFile_failed.
call fcn.00408c54
mov dword [ebp - 0x14], eax
inc dword [ebp - 0x28]
lea edx, [ebp - 0x14]
cmp dword [edi + 8], 0
je 0x514c02
mov eax, dword [edi + 8]
jmp 0x514c05
mov eax, dword [edi + 4]
call fcn.006689e0
dec dword [ebp - 0x28]
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x514c19
call fcn.00408920
mov word [ebp - 0x34], 0x38
push 0x16
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0xc]
push ecx
push str.TVP_pre_rendered_font
call fcn.005644c8
add esp, 0xc
test eax, eax
je 0x514c7a
mov word [ebp - 0x34], 0x74
mov eax, str.Signature_not_found_or_invalid_pre_rendered_font_file.
call fcn.00408c54
mov dword [ebp - 0x18], eax
inc dword [ebp - 0x28]
lea edx, [ebp - 0x18]
cmp dword [edi + 8], 0
je 0x514c5d
mov eax, dword [edi + 8]
jmp 0x514c60
mov eax, dword [edi + 4]
call fcn.006689e0
dec dword [ebp - 0x28]
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x514c74
call fcn.00408920
mov word [ebp - 0x34], 0x38
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0xc]
cmp byte [ecx + 0x17], 2
je 0x514cc7
mov word [ebp - 0x34], 0x8c
mov eax, str.Not_a_16_bit_UNICODE_font_file.
call fcn.00408c54
mov dword [ebp - 0x1c], eax
inc dword [ebp - 0x28]
lea edx, [ebp - 0x1c]
cmp dword [edi + 8], 0
je 0x514caa
mov eax, dword [edi + 8]
jmp 0x514cad
mov eax, dword [edi + 4]
call fcn.006689e0
dec dword [ebp - 0x28]
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x514cc1
call fcn.00408920
mov word [ebp - 0x34], 0x38
mov edx, dword [ebp - 4]
xor eax, eax
mov ecx, dword [edx + 0xc]
mov edx, dword [ebp - 4]
mov al, byte [ecx + 0x16]
mov dword [edx + 0x20], eax
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 0x20]
test eax, eax
je 0x514d26
dec eax
je 0x514d26
mov word [ebp - 0x34], 0xa4
mov eax, str.Invalid_header_version.
call fcn.00408c54
mov dword [ebp - 0x20], eax
inc dword [ebp - 0x28]
lea edx, [ebp - 0x20]
cmp dword [edi + 8], 0
je 0x514d09
mov eax, dword [edi + 8]
jmp 0x514d0c
mov eax, dword [edi + 4]
call fcn.006689e0
dec dword [ebp - 0x28]
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x514d20
call fcn.00408920
mov word [ebp - 0x34], 0x38
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0xc]
mov edx, dword [ebp - 4]
mov eax, dword [ecx + 0x18]
mov dword [edx + 0x2c], eax
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 0xc]
mov ecx, dword [ebp - 4]
mov edx, eax
add edx, dword [eax + 0x1c]
mov dword [ecx + 0x24], edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov edx, eax
add edx, dword [eax + 0x20]
mov dword [ecx + 0x28], edx
mov word [ebp - 0x34], 8
jmp 0x514da2
mov ebx, dword [ebp - 0x48]
mov eax, dword [ebp - 4]
mov dword [ebp - 0x4c], eax
lea edx, [ebp - 0x4c]
push edx
mov eax, ebx
call fcn.00436d10
mov ecx, eax
mov eax, 0x71e19c
mov edx, ebx
call fcn.00514dfc
mov ecx, dword [ebp - 0x44]
mov dword fs:[0], ecx
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret