Function at 0x505bd3
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x6c
fldz
mov edx, dword [ebp + 0x10]
push ebx
fst dword [ebp - 0x20]
push esi
fst dword [ebp - 0x1c]
push edi
fst dword [ebp - 0x18]
xor edi, edi
xor esi, esi
cmp edx, edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], esi
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], edi
je 0x505f51
cmp word [edx], di
je 0x505f51
mov ecx, dword [ebp + 0x1c]
cmp ecx, edi
jne 0x505c23
fstp st(0)
mov ebx, 0x8876086c
jmp 0x505fa3
fcom dword [ebp + 0x14]
fnstsw ax
test ah, 0x41
jne 0x505c3c
fstp st(0)
push 0x406ac4
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x505c19
fcomp dword [ebp + 0x18]
fnstsw ax
test ah, 0x41
jne 0x505c4d
push 0x406a94
jmp 0x505c34
mov eax, edx
mov dword [ecx], edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, di
jne 0x505c54
sub eax, edx
sar eax, 1
xor ecx, ecx
push 4
mov esi, eax
pop edx
mul edx
seto cl
mov dword [ebp - 0xc], esi
neg ecx
or ecx, eax
push ecx
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
cmp eax, edi
pop ecx
mov dword [ebp - 8], eax
jne 0x505c8d
mov ebx, 0x8007000e
jmp 0x505f80
mov ecx, esi
shl ecx, 2
push ecx
push edi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x6c]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.GDI32.dll_GetTextMetricsA]
test eax, eax
jne 0x505cc3
push 0x406a50
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ebx, 0x8876086c
jmp 0x505f80
test byte [ebp - 0x39], 2
jne 0x505cd0
push 0x406a20
jmp 0x505cb3
fld dword [ebp + 0x18]
lea eax, [ebp - 0x14]
push eax
push ecx
push ecx
fstp dword [esp + 4]
xor edi, edi
fld dword [ebp + 0x14]
inc edi
fstp dword [esp]
push dword [ebp + 0xc]
call fcn.00504ffb
mov ebx, eax
test ebx, ebx
jge 0x505d07
push 0x4069f8
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov esi, dword [ebp - 0x14]
jmp 0x505f72
and dword [ebp + 0x14], 0
test esi, esi
mov esi, dword [ebp - 0x14]
jbe 0x505eb5
mov edi, 0x7334f8
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
movzx ebx, word [eax + ecx*2]
push edi
xor eax, eax
cmp dword [ebp + 0x28], eax
push eax
push eax
lea eax, [ebp - 0x34]
push eax
push 2
push ebx
push dword [ebp + 0xc]
je 0x505d41
call dword [sym.imp.GDI32.dll_GetGlyphOutlineW]
jmp 0x505d47
call dword [sym.imp.GDI32.dll_GetGlyphOutlineA]
cmp eax, 0xffffffff
mov dword [ebp + 0x18], eax
je 0x505f19
cmp eax, dword [ebp - 0x10]
jbe 0x505d7f
cmp dword [ebp - 4], 0
je 0x505d67
push dword [ebp - 4]
call sub.msvcrt.dll_free
pop ecx
mov eax, dword [ebp + 0x18]
push eax
mov dword [ebp - 0x10], eax
call sub.msvcrt.dll_malloc
test eax, eax
pop ecx
mov dword [ebp - 4], eax
je 0x505f20
cmp dword [ebp + 0x28], 0
push edi
push dword [ebp - 4]
lea eax, [ebp - 0x34]
push dword [ebp - 0x10]
push eax
push 2
push ebx
push dword [ebp + 0xc]
je 0x505d9e
call dword [sym.imp.GDI32.dll_GetGlyphOutlineW]
jmp 0x505da4
call dword [sym.imp.GDI32.dll_GetGlyphOutlineA]
cmp eax, 0xffffffff
je 0x505f32
mov eax, dword [ebp - 4]
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 0x18]
mov dword [esi + 0x14], eax
mov eax, esi
call fcn.00505a89
mov ebx, eax
test ebx, ebx
jl 0x505f44
lea eax, [ebp - 0x20]
push eax
mov eax, dword [esi + 0x1bc]
mov ecx, dword [eax + 0x1c]
call fcn.005056b9
mov eax, dword [esi + 0x1bc]
mov eax, dword [eax + 0x1c]
mov ecx, dword [ebp - 8]
mov ebx, dword [ebp + 0x14]
push 0x28
mov dword [ecx + ebx*4], eax
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
test eax, eax
pop ecx
je 0x505e03
mov ecx, eax
call fcn.0050513c
jmp 0x505e05
xor eax, eax
mov ecx, dword [esi + 0x1bc]
mov dword [ecx + 0x1c], eax
mov eax, dword [esi + 0x1bc]
cmp dword [eax + 0x1c], 0
je 0x505f2b
movsx eax, word [ebp - 0x24]
mov dword [ebp + 0x18], eax
movsx eax, word [ebp - 0x22]
fild dword [ebp + 0x18]
fld dword [esi + 8]
mov dword [ebp + 0x18], eax
mov eax, dword [ebp + 0x24]
test eax, eax
fmul st(1)
fadd dword [ebp - 0x20]
fstp dword [ebp - 0x20]
fild dword [ebp + 0x18]
fld dword [esi + 8]
fmul st(1)
fadd dword [ebp - 0x1c]
fstp dword [ebp - 0x1c]
je 0x505ea4
mov ecx, dword [ebp - 0x34]
fild dword [ebp - 0x34]
test ecx, ecx
jge 0x505e5f
fadd dword [0x4014d8]
fmul dword [esi + 8]
mov ecx, dword [ebp - 0x30]
test ecx, ecx
fstp dword [eax]
fild dword [ebp - 0x30]
jge 0x505e74
fadd dword [0x4014d8]
fmul dword [esi + 8]
add eax, 0x18
mov dword [ebp + 0x24], eax
fstp dword [eax - 0x14]
fild dword [ebp - 0x2c]
fmul dword [esi + 8]
fstp dword [eax - 0x10]
fild dword [ebp - 0x28]
fmul dword [esi + 8]
fstp dword [eax - 0xc]
fld dword [esi + 8]
fmulp st(2)
fxch st(1)
fstp dword [eax - 8]
fmul dword [esi + 8]
fstp dword [eax - 4]
jmp 0x505ea8
fstp st(1)
fstp st(0)
inc ebx
cmp ebx, dword [ebp - 0xc]
mov dword [ebp + 0x14], ebx
jb 0x505d1b
mov edi, dword [ebp + 0x1c]
push edi
push dword [ebp - 0xc]
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.00504b64
mov ebx, eax
test ebx, ebx
jl 0x505f63
cmp dword [ebp + 0x20], 0
je 0x505f63
mov eax, dword [edi]
push dword [ebp + 0x20]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
imul eax, eax, 0xc
push eax
call sym.d3dx9_34.dll_D3DXCreateBuffer
mov ebx, eax
test ebx, ebx
jl 0x505f63
mov eax, dword [edi]
mov edi, dword [eax]
mov eax, dword [ebp + 0x20]
mov eax, dword [eax]
mov ecx, dword [eax]
push eax
add edi, 0x58
call dword [ecx + 0xc]
fldz
push eax
mov eax, dword [ebp + 0x1c]
push ecx
fstp dword [esp]
push dword [eax]
call dword [edi]
mov ebx, eax
jmp 0x505f63
push 0x4069d0
jmp 0x505f25
push 0x4069a4
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ebx, 0x8007000e
jmp 0x505f63
push 0x4069d0
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ebx, 0x80004005
jmp 0x505f63
push 0x406970
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x505f63
push 0x40694c
fstp st(0)
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ebx, 0x8876086c
cmp dword [ebp - 4], 0
je 0x505f72
push dword [ebp - 4]
call sub.msvcrt.dll_free
pop ecx
xor edi, edi
cmp esi, edi
je 0x505f80
push dword [ebp + 0xc]
call fcn.0050486c
cmp dword [ebp - 8], edi
je 0x505fa3
xor esi, esi
cmp dword [ebp - 0xc], edi
jbe 0x505fa3
mov eax, dword [ebp - 8]
mov ecx, dword [eax + esi*4]
cmp ecx, edi
je 0x505f9d
push 1
call fcn.00504cc8
inc esi
cmp esi, dword [ebp - 0xc]
jb 0x505f8c
push dword [ebp - 8]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 0x24