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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
push 0xffffffffffffffff
push 0x58a168
mov eax, dword fs:[0]
push eax
sub esp, 0x68
push ebx
push esi
push edi
mov eax, dword [0x5eb3c0]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov edi, ecx
push edi
call fcn.00513720
mov ecx, dword [ebp + 8]
mov eax, dword [edi]
mov edx, dword [eax + 0x40]
push ecx
mov ecx, edi
call edx
mov ebx, eax
mov eax, dword [edi + 0x3c]
cmp eax, dword [edi + 0x40]
mov dword [esp + 0x1c], ebx
jbe 0x5134c4
call fcn.00565fa7
test ebx, ebx
je 0x513701
mov eax, dword [edi]
mov edx, dword [eax + 0x20]
mov ecx, edi
call edx
cmp dword [eax + 0x44], 0
mov esi, dword [ebp + 0xc]
jne 0x51351b
fld dword [esi]
sub esp, 8
fstp dword [esp + 0x20]
fld dword [esp + 0x20]
fstp qword [esp]
call fcn.00568c10
mov ecx, dword [ebp + 0x10]
fstp dword [esp + 0x20]
fld dword [esp + 0x20]
add esp, 8
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
fst dword [esi]
fld dword [ecx + 8]
fcompp
fnstsw ax
test ah, 0x41
jp 0x51351b
fld dword [ecx]
fstp dword [esi]
fldz
mov ecx, dword [edi + 0x24]
fst dword [esp + 0x34]
xor eax, eax
fst dword [esp + 0x38]
mov dword [esp + 0x20], ecx
fst dword [esp + 0x3c]
mov dword [esp + 0x10], eax
fstp dword [esp + 0x40]
mov edx, dword [ecx - 0xc]
test edx, edx
mov dword [esp + 0x18], edx
jle 0x5136f7
jmp 0x51355f
mov esi, dword [ebp + 0xc]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
lea ebx, [esp + 0x34]
push ebx
mov ebx, dword [ebp + 0x10]
sub edx, eax
lea eax, [ecx + eax*2]
mov ecx, dword [esp + 0x20]
push edx
push eax
push ecx
mov ecx, edi
call fcn.00513830
push 0x20
mov dword [esp + 0x18], eax
call fcn.00566e45
mov esi, eax
xor ebx, ebx
add esp, 4
cmp esi, ebx
je 0x5136dd
fldz
mov dword [esi + 0x14], ebx
fst dword [esi + 4]
mov dword [esi + 0x18], ebx
fst dword [esi + 8]
mov dword [esi], vtable.CBkRichTextSubTextObj.0
fst dword [esi + 0xc]
mov ecx, 0x5f7780
fstp dword [esi + 0x10]
mov edx, dword [0x5f7780]
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esi + 0x1c], eax
fild dword [edi + 0x30]
mov eax, dword [edi + 0x14]
mov ecx, dword [esp + 0x10]
fstp dword [esp + 0x24]
lea edx, [esp + 0x28]
fld dword [esp + 0x34]
fldz
fadd st(1), st(0)
fxch st(1)
fstp dword [esp + 0x34]
fadd dword [esp + 0x3c]
fstp dword [esp + 0x3c]
fld dword [esp + 0x38]
fld dword [esp + 0x24]
fld st(0)
faddp st(2)
fxch st(1)
fstp dword [esp + 0x38]
fadd dword [esp + 0x40]
fstp dword [esp + 0x40]
mov dword [esi + 0x14], eax
mov eax, dword [edi + 0x18]
mov dword [esi + 0x18], eax
lea eax, [edi + 0x24]
push eax
mov eax, dword [esp + 0x18]
call fcn.00473d60
mov dword [esp + 0x80], ebx
mov ecx, dword [eax]
cmp ecx, ebx
je 0x513645
mov eax, ecx
lea edx, [eax + 2]
mov dword [esp + 0x24], edx
mov dx, word [eax]
add eax, 2
cmp dx, bx
jne 0x513632
sub eax, dword [esp + 0x24]
sar eax, 1
mov ebx, eax
push ecx
lea eax, [esi + 0x1c]
call fcn.00480ff0
mov dword [esp + 0x80], 0xffffffff
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x513679
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esi]
mov edx, dword [edx + 0xc]
lea eax, [esp + 0x34]
push eax
mov ecx, esi
call edx
mov ecx, dword [edi + 0x3c]
test ecx, ecx
lea ebx, [edi + 0x38]
mov dword [esp + 0x24], esi
jne 0x513699
xor edx, edx
jmp 0x5136a1
mov edx, dword [ebx + 8]
sub edx, ecx
sar edx, 2
test ecx, ecx
je 0x5136be
mov eax, dword [ebx + 0xc]
sub eax, ecx
sar eax, 2
cmp edx, eax
jae 0x5136be
mov eax, dword [ebx + 8]
mov dword [eax], esi
add eax, 4
mov dword [ebx + 8], eax
jmp 0x5136dd
mov esi, dword [ebx + 8]
cmp ecx, esi
jbe 0x5136ca
call fcn.00565fa7
push esi
push ebx
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x38]
push ecx
mov eax, ebx
call fcn.00522680
mov eax, dword [esp + 0x10]
add eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x18]
mov dword [esp + 0x10], eax
jl 0x513550
mov ebx, dword [esp + 0x1c]
mov edx, dword [edi]
mov eax, dword [edx + 0x44]
push ebx
mov ecx, edi
call eax
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc