Function at 0x5921d0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x1b4
push ebx
mov ebx, ecx
push ebp
push esi
mov dword [esp + 0x14], ebx
cmp dword [ebx + 0x5c], 0
je 0x5921fe
push 0
push 0x111
push str.Sourced3dFont.cpp
push str._glyphTexture
call fcn.0058a010
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x6ad4d8], eax
je 0x592225
push 0
push 0x113
push str.Sourced3dFont.cpp
push str.gMainThreadID__GetCurrentThreadId__
call fcn.0058a010
add esp, 0x10
mov edx, dword [esp + 0x1c4]
push edi
mov edi, dword [esp + 0x1d0]
add edx, 4
add edi, edx
push 0
mov dword [esp + 0x40], edi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ebp, eax
mov dword [esp + 0x38], ebp
mov eax, dword [ebx + 0x58]
lea edx, [ebx + 4]
shr eax, 1
and eax, 1
movzx ecx, byte [ebx + 0x58]
push eax
mov eax, dword [ebx + 0x54]
and ecx, 1
push ecx
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x6769e0]
cvtpd2ps xmm0, xmm0
mulss xmm0, dword [ebx + 0x60]
cvttss2si eax, xmm0
push eax
push edx
push ebp
call fcn.005937e0
add esp, 0x14
mov dword [esp + 0x34], eax
push eax
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
mov eax, 0x78
xor esi, esi
mov word [esp + 0x20], ax
xor ebx, ebx
jmp 0x5922b0
lea eax, [ebx + 0x20]
mov byte [esp + 0x20], al
lea eax, [esp + 0x60]
push eax
push 1
lea eax, [esp + 0x28]
push eax
push ebp
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32A]
mov eax, dword [esp + 0x64]
inc ebx
mov ecx, dword [esp + 0x1cc]
add eax, 4
add ecx, dword [esp + 0x1d4]
mov ebp, dword [esp + 0x38]
add ecx, eax
mov eax, dword [esp + 0x60]
add eax, edi
imul ecx, eax
add esi, ecx
cmp ebx, 0x5f
jl 0x5922b0
movd xmm0, esi
mov eax, esi
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x6769e0]
cvtpd2ps xmm0, xmm0
mulss xmm0, dword [0x65f2b4]
sqrtss xmm0, xmm0
cvttss2si eax, xmm0
push eax
call fcn.00593850
mov ecx, dword [0x6a8304]
add esp, 4
mov ebx, eax
add ecx, 0x50
mov dword [esp + 0x44], ebx
call fcn.0058ca10
lea edx, [esp + 0x94]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov eax, dword [esp + 0xec]
cmp ebx, eax
jbe 0x5923a2
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x6769e0]
cvtpd2ps xmm1, xmm0
movd xmm0, ebx
cvtdq2pd xmm0, xmm0
shr ebx, 0x1f
push dword [esp + 0x34]
addsd xmm0, qword [ebx*8 + 0x6769e0]
mov ebx, dword [esp + 0x1c]
cvtpd2ps xmm0, xmm0
divss xmm1, xmm0
movss dword [ebx + 0x60], xmm1
call dword [sym.imp.GDI32.dll_DeleteObject]
jmp 0x59224b
cmp ebx, 0x400
jbe 0x5923b4
movss xmm1, dword [0x65f2b8]
jmp 0x59236e
mov ecx, ebx
mov edi, ebx
shr ecx, 1
mov eax, ecx
imul eax, ebx
cmp eax, esi
cmova edi, ecx
mov eax, edi
mov dword [esp + 0x30], edi
imul eax, ebx
cmp esi, eax
jb 0x5923ea
push 0
push pe_nt_image_headers32
push str.Sourced3dFont.cpp
push str.numpix___m_dwTexWidth__m_dwTexHeight
call fcn.0058a010
add esp, 0x10
push 0xffffff
push ebp
call dword [sym.imp.GDI32.dll_SetTextColor]
push 0
push ebp
call dword [sym.imp.GDI32.dll_SetBkColor]
push 0
push ebp
call dword [sym.imp.GDI32.dll_SetTextAlign]
xorps xmm0, xmm0
mov eax, edi
push 0
movdqu xmmword [esp + 0x6c], xmm0
neg eax
mov dword [esp + 0x6c], 0x28
movq qword [esp + 0x8c], xmm0
push 0
mov dword [esp + 0x78], eax
lea eax, [esp + 0x5c]
push eax
push 0
lea eax, [esp + 0x78]
mov dword [esp + 0x7c], ebx
push eax
movdqu xmmword [esp + 0x8c], xmm0
push ebp
mov dword [esp + 0x8c], 0x200001
mov dword [esp + 0x90], 0
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov esi, dword [sym.imp.GDI32.dll_SelectObject]
push eax
push ebp
mov dword [esp + 0x54], eax
call esi
push 1
push ebp
call dword [sym.imp.GDI32.dll_SetMapMode]
push 0xff0000
push 1
push 0
call dword [sym.imp.GDI32.dll_CreatePen]
push eax
push ebp
mov dword [esp + 0x60], eax
call esi
movss xmm1, dword [0x676968]
mov eax, 0x78
mov word [esp + 0x14], ax
movaps xmm2, xmm1
movd xmm0, ebx
mov eax, ebx
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
xor edi, edi
mov esi, dword [esp + 0x3c]
xor ecx, ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0x40], edi
mov dword [esp + 0x1c], ecx
addsd xmm0, qword [eax*8 + 0x6769e0]
mov eax, dword [esp + 0x30]
cvtpd2ps xmm0, xmm0
divss xmm2, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
movss dword [esp + 0x50], xmm2
addsd xmm0, qword [eax*8 + 0x6769e0]
mov eax, dword [esp + 0x18]
add eax, 0x68
mov dword [esp + 0x2c], eax
cvtpd2ps xmm0, xmm0
divss xmm1, xmm0
movss dword [esp + 0x5c], xmm1
lea eax, [ecx + 0x20]
mov byte [esp + 0x14], al
lea eax, [esp + 0x24]
push eax
push 1
lea eax, [esp + 0x1c]
push eax
push ebp
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32A]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
add eax, ecx
add eax, esi
cmp eax, ebx
jb 0x59258a
mov ecx, dword [esp + 0x1d4]
mov eax, dword [esp + 0x28]
add ecx, 4
add ecx, dword [esp + 0x1cc]
add eax, ecx
mov dword [esp + 0x10], 0
add edi, eax
mov dword [esp + 0x40], edi
cmp edi, dword [esp + 0x30]
jb 0x592588
push 0
push 0x181
push str.Sourced3dFont.cpp
push str.y___m_dwTexHeight
call fcn.0058a010
mov ecx, dword [esp + 0x20]
add esp, 0x10
jmp 0x59258a
xor ecx, ecx
push 0
push 1
lea eax, [esp + 0x1c]
add edi, 2
push eax
mov eax, dword [esp + 0x1d8]
lea esi, [ecx + 2]
push 0
push 2
add eax, edi
push eax
mov eax, dword [esp + 0x1e0]
add eax, esi
push eax
push ebp
call dword [sym.imp.GDI32.dll_ExtTextOutA]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x24]
movd xmm0, esi
add eax, esi
add eax, dword [esp + 0x1c8]
add eax, dword [esp + 0x1d0]
cvtdq2ps xmm0, xmm0
mov esi, dword [esp + 0x10]
push 0
mulss xmm0, dword [esp + 0x54]
movss dword [ecx - 4], xmm0
movd xmm0, edi
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [esp + 0x60]
movss dword [ecx], xmm0
movd xmm0, eax
mov eax, dword [esp + 0x2c]
cvtdq2ps xmm0, xmm0
add eax, edi
mov edi, dword [esp + 0x44]
add eax, dword [esp + 0x1d0]
add eax, dword [esp + 0x1d8]
push edi
push esi
mulss xmm0, dword [esp + 0x5c]
push ebp
movss dword [ecx + 4], xmm0
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [esp + 0x6c]
movss dword [ecx + 8], xmm0
call dword [sym.imp.GDI32.dll_MoveToEx]
mov eax, dword [esp + 0x24]
add eax, esi
mov esi, dword [esp + 0x3c]
push edi
add eax, esi
push eax
push ebp
call dword [sym.imp.GDI32.dll_LineTo]
mov ebx, dword [esp + 0x1d4]
mov eax, dword [esp + 0x28]
add eax, edi
lea ecx, [ebx + 4]
add ecx, dword [esp + 0x1cc]
add eax, ecx
push eax
mov eax, dword [esp + 0x28]
add eax, dword [esp + 0x14]
add eax, esi
push eax
push ebp
call dword [sym.imp.GDI32.dll_LineTo]
mov eax, dword [esp + 0x28]
lea ecx, [ebx + 4]
add ecx, dword [esp + 0x1cc]
add eax, edi
add eax, ecx
push eax
push dword [esp + 0x14]
push ebp
call dword [sym.imp.GDI32.dll_LineTo]
push edi
push dword [esp + 0x14]
push ebp
call dword [sym.imp.GDI32.dll_LineTo]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
add eax, esi
add dword [esp + 0x10], eax
inc ecx
add dword [esp + 0x2c], 0x10
mov ebx, dword [esp + 0x44]
mov dword [esp + 0x1c], ecx
cmp ecx, 0x5f
jl 0x592514
mov ecx, dword [0x6a8304]
call fcn.0059bd90
mov esi, dword [esp + 0x18]
mov ecx, eax
mov edi, dword [esp + 0x30]
push 1
push 1
push 0x15
push edi
push ebx
mov dword [esi + 0x5c], eax
call fcn.0059bf20
mov esi, dword [esi + 0x5c]
mov eax, dword [esi + 0x3c]
cmp dword [eax], 0
jne 0x592714
push 0
push 0x4d
push str.c:warz2_srceternityinclude_r3dTex.h
push str.m_TexArray_0_.Valid__
call fcn.0058a010
add esp, 0x10
mov ecx, dword [esi + 0x3c]
call fcn.0058ce10
push 0
push 0
lea edx, [esp + 0x4c]
mov ecx, dword [eax]
push edx
push 0
push eax
call dword [ecx + 0x4c]
mov esi, dword [esp + 0x48]
test edi, edi
je 0x592792
xor eax, eax
lea ebp, [ebx*4]
mov dword [esp + 0x1c], eax
xor ecx, ecx
test ebx, ebx
je 0x592777
mov edx, eax
lea ebx, [ebx]
mov eax, dword [esp + 0x54]
mov eax, dword [edx + eax]
cmp eax, 0xff
jne 0x592760
jmp 0x59276c
test eax, eax
je 0x59276c
shl eax, 0x18
or eax, 0xffffff
mov dword [esi + ecx*4], eax
add edx, 4
inc ecx
cmp ecx, ebx
jb 0x592750
mov eax, dword [esp + 0x44]
shr eax, 2
lea esi, [esi + eax*4]
mov eax, dword [esp + 0x1c]
add eax, ebp
mov dword [esp + 0x1c], eax
dec edi
jne 0x592742
mov ebp, dword [esp + 0x38]
mov eax, dword [esp + 0x18]
pop edi
mov esi, dword [eax + 0x5c]
mov eax, dword [esi + 0x3c]
cmp dword [eax], 0
jne 0x5927b8
push 0
push 0x4d
push str.c:warz2_srceternityinclude_r3dTex.h
push str.m_TexArray_0_.Valid__
call fcn.0058a010
add esp, 0x10
mov ecx, dword [esi + 0x3c]
call fcn.0058ce10
push 0
push eax
mov ecx, dword [eax]
call dword [ecx + 0x50]
push dword [esp + 0x48]
mov ebx, dword [sym.imp.GDI32.dll_DeleteObject]
call ebx
push ebp
call dword [sym.imp.GDI32.dll_DeleteDC]
push dword [esp + 0x30]
call ebx
push dword [esp + 0x54]
call ebx
pop esi
pop ebp
pop ebx
add esp, 0x1b4
ret 0x10