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

Disassembly:
push 0xffffffffffffffff
push 0x59e042
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x108
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 0x7c]
mov ecx, dword [eax + 0x44]
mov esi, dword [ecx + 0x44]
mov ecx, edi
mov dword [esp + 0x40], esi
call fcn.00516a10
lea ecx, [esp + 0x4c]
mov dword [esp + 0x38], eax
call fcn.005786bc
mov edx, dword [edi + 0x1c]
xor ebx, ebx
push edx
mov dword [esp + 0x124], ebx
call dword [sym.imp.USER32.dll_GetWindowDC]
push eax
lea ecx, [esp + 0x50]
call fcn.00578773
lea eax, [esi + 0xc]
lea ecx, [esp + 0x84]
push eax
lea eax, [esp + 0x50]
push eax
call fcn.0045cc50
mov edx, dword [esp + 0x54]
lea ecx, [esp + 0xe0]
mov ebp, 3
push ecx
push edx
mov byte [esp + 0x128], 1
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x1c], ebp
call dword [sym.imp.GDI32.dll_GetTextMetricsA]
mov ecx, edi
call fcn.005166d0
mov eax, dword [edi + 0x3c]
push eax
call dword [sym.imp.USER32.dll_GetMenuItemCount]
xor ecx, ecx
xor esi, esi
cmp eax, ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0x10], esi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x18], ecx
jle 0x516f6a
push 0x1c
call fcn.0056dbe7
xor ebp, ebp
add esp, 4
cmp eax, ebp
je 0x516c62
mov ecx, dword [esp + 0x18]
push ecx
push edi
mov ecx, eax
call fcn.005162b0
mov esi, eax
mov dword [esp + 0x1c], esi
jmp 0x516c68
mov dword [esp + 0x1c], ebp
mov esi, ebp
lea edx, [esp + 0x20]
mov ecx, esi
push edx
call fcn.00516450
mov ecx, esi
mov byte [esp + 0x120], 2
call fcn.00516510
test eax, eax
je 0x516cf9
xor ebp, ebp
mov ecx, esi
mov dword [esp + 0x6c], 1
mov dword [esp + 0x70], ebp
call fcn.005163e0
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x74], eax
lea eax, [esp + 0x94]
mov dword [esp + 0x78], ebp
push eax
push 1
push 0x5e87c4
push ecx
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32A]
mov edx, dword [esp + 0x98]
mov ecx, esi
mov dword [esp + 0x7c], edx
call fcn.00516430
mov ecx, dword [edi + 0x78]
mov dword [esp + 0x80], eax
lea eax, [esp + 0x6c]
push eax
push ebp
push 0x2c
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edx, dword [esp + 0x78]
mov esi, dword [esp + 0x7c]
lea ebp, [edx + 0xc]
jmp 0x516e83
mov ecx, esi
call fcn.005164f0
test eax, eax
je 0x516d17
mov esi, dword [esp + 0x38]
neg esi
sbb esi, esi
and esi, 0xfffffffd
add esi, 9
jmp 0x516e83
mov ecx, esi
call fcn.00516420
mov dword [esp + 0x30], eax
mov dword [esp + 0x48], 0
mov dword [esp + 0x44], vtable.CFont.0
test eax, eax
mov byte [esp + 0x120], 3
je 0x516d8a
mov ecx, dword [esp + 0x40]
lea eax, [esp + 0xa4]
push eax
push 0x3c
mov edx, dword [ecx + 0x10]
push edx
call dword [sym.imp.GDI32.dll_GetObjectA]
lea eax, [esp + 0xa4]
mov dword [esp + 0xb4], 0x2bc
push eax
call dword [sym.imp.GDI32.dll_CreateFontIndirectA]
push eax
lea ecx, [esp + 0x48]
call fcn.00579297
lea ecx, [esp + 0x44]
push ecx
lea ecx, [esp + 0x88]
call fcn.0045ccd0
push 9
lea ecx, [esp + 0x24]
call fcn.00572b23
mov esi, eax
xor ebp, ebp
cmp esi, 0xffffffff
je 0x516df8
lea edx, [esp + 0x3c]
push esi
push edx
lea ecx, [esp + 0x28]
call fcn.0056ae5e
push esi
lea ecx, [esp + 0x24]
mov byte [esp + 0x124], 4
call fcn.00572adb
mov eax, dword [esp + 0x3c]
lea edx, [esp + 0x5c]
push edx
mov ecx, dword [eax - 8]
push ecx
push eax
mov eax, dword [esp + 0x60]
push eax
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32A]
mov ecx, dword [esp + 0x60]
mov ebp, dword [esp + 0x5c]
mov dword [esp + 0xa0], ecx
lea ecx, [esp + 0x3c]
mov byte [esp + 0x120], 3
call fcn.0057265c
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x64]
push edx
mov ecx, dword [eax - 8]
push ecx
push eax
mov eax, dword [esp + 0x60]
push eax
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32A]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x64]
mov esi, dword [esp + 0x68]
mov dword [esp + 0x9c], eax
test ecx, ecx
je 0x516e38
cmp esi, 0x16
lea ebp, [eax + ebp + 0x58]
jg 0x516e46
mov esi, 0x16
jmp 0x516e46
cmp esi, 0x11
lea ebp, [eax + ebp + 0x3d]
jg 0x516e46
mov esi, 0x11
mov eax, dword [esp + 0x30]
test eax, eax
je 0x516e62
mov ecx, dword [esp + 0x40]
lea eax, [ecx + 0xc]
lea ecx, [esp + 0x84]
push eax
call fcn.0045ccd0
mov dword [esp + 0x44], vtable.CGdiObject.0
lea ecx, [esp + 0x44]
mov byte [esp + 0x120], 5
call fcn.005792ee
mov byte [esp + 0x120], 2
mov ecx, dword [esp + 0x1c]
call fcn.00516530
test al, 0x60
je 0x516ee8
mov eax, dword [esp + 0x18]
cmp ebx, eax
je 0x516ee8
jge 0x516eb8
mov edx, dword [edi + 0x44]
mov eax, dword [edx + ebx*4]
mov edx, dword [esp + 0x10]
mov ecx, dword [eax]
add ecx, edx
inc ebx
mov dword [eax + 8], ecx
mov eax, dword [esp + 0x18]
cmp ebx, eax
jl 0x516e9a
mov dword [esp + 0x2c], ebx
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
lea ecx, [edx + eax + 4]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x28]
cmp ecx, eax
jg 0x516ed8
mov dword [esp + 0x28], eax
mov dword [esp + 0x14], 3
mov dword [esp + 0x10], 0
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
lea ebx, [esi + edx]
mov edx, dword [esp + 0x10]
cmp edx, ebp
lea eax, [ecx + ebp]
jg 0x516f02
mov dword [esp + 0x10], ebp
mov edx, dword [esp + 0x1c]
lea esi, [edi + 0x40]
push 0xffffffffffffffff
mov dword [edx], ecx
mov ecx, dword [esp + 0x18]
mov dword [edx + 4], ecx
mov ecx, esi
mov dword [edx + 8], eax
mov dword [edx + 0xc], ebx
mov ebp, dword [esi + 8]
lea edx, [ebp + 1]
push edx
call fcn.004b8d90
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x14], ebx
mov byte [esp + 0x120], 1
mov dword [eax + ebp*4], ecx
lea ecx, [esp + 0x20]
call fcn.0057265c
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x34]
mov ebx, dword [esp + 0x2c]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x516c3d
mov esi, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
mov eax, ecx
cmp ebx, eax
mov ecx, ebx
jge 0x516f82
mov edx, dword [edi + 0x44]
mov ebx, esi
mov edx, dword [edx + ecx*4]
add ebx, dword [edx]
inc ecx
cmp ecx, eax
mov dword [edx + 8], ebx
jl 0x516f70
mov eax, dword [esp + 0x24]
lea ecx, [esi + eax + 3]
mov eax, dword [esp + 0x28]
cmp eax, ebp
mov dword [esp + 0x30], ecx
jle 0x516f98
mov ebp, eax
lea ecx, [esp + 0x84]
lea ebx, [ebp + 3]
call fcn.0045cd00
lea ecx, [esp + 0x4c]
call fcn.005787aa
mov edx, dword [edi + 0x1c]
push eax
push edx
call dword [sym.imp.USER32.dll_ReleaseDC]
mov esi, dword [esp + 0x128]
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x84]
mov byte [esp + 0x120], 0
mov dword [esi], eax
mov dword [esi + 4], ebx
call fcn.0045ccb0
lea ecx, [esp + 0x4c]
mov dword [esp + 0x120], 0xffffffff
call fcn.005787f1
mov ecx, dword [esp + 0x118]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x114
ret 4