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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54684d
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push esi
push edi
mov eax, dword [0x58213c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x1c], esi
cmp byte [esi + 0x14], 0
lea eax, [esi + 0x14]
mov dword [ebp - 0x20], eax
jne 0x508560
mov dword [ebp - 0x2c], eax
mov byte [ebp - 0x28], 0
mov byte [eax], 1
mov eax, dword [esi + 8]
mov dword [ebp - 4], 0
test eax, eax
je 0x508546
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x508546
call fcn.004edb20
test al, al
je 0x508546
mov eax, dword [esi + 8]
test eax, eax
je 0x50829c
mov ecx, dword [eax + 8]
jmp 0x50829e
xor ecx, ecx
cmp dword [ecx + 0x24], 0
jle 0x508546
test eax, eax
je 0x5082b1
mov eax, dword [eax + 8]
jmp 0x5082b3
xor eax, eax
cmp dword [eax + 0x28], 0
jle 0x508546
mov edi, dword [esi + 0xc]
test edi, edi
jne 0x508405
mov eax, dword [esi + 4]
push 0x90
mov dword [ebp - 0x14], eax
call fcn.005118c7
mov edi, eax
add esp, 4
mov dword [ebp - 0x24], edi
test edi, edi
je 0x5083e8
mov eax, dword [esi + 8]
test eax, eax
je 0x5082f7
mov eax, dword [eax + 8]
mov dword [ebp - 0x18], eax
jmp 0x5082fe
mov dword [ebp - 0x18], 0
mov ecx, edi
call fcn.004a9520
push dword [ebp - 0x18]
lea ecx, [edi + 0x88]
mov byte [ebp - 4], 2
mov dword [edi], vtable.juce::OutlineWindowComponent.0
call fcn.004a8af0
mov eax, dword [ebp - 0x14]
mov ecx, edi
push 1
mov byte [ebp - 4], 3
mov dword [edi + 0x8c], eax
call fcn.00503c40
mov al, byte [edi + 0x80]
and al, 0xef
or al, 8
mov byte [edi + 0x80], al
mov ecx, dword [edi + 0x88]
test ecx, ecx
je 0x508352
mov eax, dword [ecx + 8]
jmp 0x508354
xor eax, eax
mov al, byte [eax + 0x80]
and al, 1
je 0x508382
push 1
push 1
push dword [edi + 0x20]
mov ecx, edi
push dword [edi + 0x1c]
call fcn.00500240
push 0
push 0x406
mov ecx, edi
call fcn.004ba9c0
mov esi, dword [ebp - 0x1c]
jmp 0x5083ea
test ecx, ecx
je 0x50838b
mov eax, dword [ecx + 8]
jmp 0x50838d
xor eax, eax
mov esi, dword [eax + 0x18]
mov dword [ebp - 0x14], esi
test esi, esi
je 0x5083cc
test ecx, ecx
je 0x5083a0
mov edx, dword [ecx + 8]
jmp 0x5083a2
xor edx, edx
mov ecx, dword [esi + 0x34]
mov eax, dword [esi + 0x3c]
mov esi, dword [ebp - 0x14]
lea eax, [ecx + eax*4]
cmp ecx, eax
je 0x5083bd
cmp edx, dword [ecx]
je 0x5083d1
add ecx, 4
cmp ecx, eax
jne 0x5083b2
or ecx, 0xffffffff
lea eax, [ecx + 1]
mov ecx, esi
push eax
push edi
call fcn.004b9bc0
mov esi, dword [ebp - 0x1c]
jmp 0x5083ea
sub ecx, dword [esi + 0x34]
sar ecx, 2
lea eax, [ecx + 1]
mov ecx, esi
push eax
push edi
call fcn.004b9bc0
mov esi, dword [ebp - 0x1c]
jmp 0x5083ea
xor edi, edi
mov ecx, dword [esi + 0xc]
mov byte [ebp - 4], 0
mov dword [esi + 0xc], edi
test ecx, ecx
je 0x508401
mov eax, dword [ecx]
push 1
call dword [eax]
mov edi, dword [esi + 0xc]
test edi, edi
je 0x508478
mov ecx, dword [edi + 0x78]
test ecx, ecx
jne 0x50846a
push 0xc
call fcn.005118c7
add esp, 4
test eax, eax
je 0x50842c
mov dword [eax + 4], 0
mov dword [eax], vtable.juce::WeakReference_class_juce::Component__class_juce::ReferenceCountedObject_::SharedPointer.0
mov dword [eax + 8], edi
jmp 0x50842e
xor eax, eax
cmp dword [edi + 0x78], eax
je 0x508457
lock inc dword [eax + 4]
mov ecx, dword [edi + 0x78]
mov dword [edi + 0x78], eax
test ecx, ecx
je 0x508457
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
dec eax
sete al
test al, al
je 0x508457
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [edi + 0x78]
mov esi, eax
mov dword [ebp - 0x18], eax
mov ecx, eax
mov dword [ebp - 0x14], esi
test eax, eax
je 0x508480
jmp 0x508472
mov esi, ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], esi
lock inc dword [ecx + 4]
jmp 0x508480
xor esi, esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x18], esi
mov edi, dword [ebp - 0x1c]
mov byte [ebp - 4], 4
mov eax, dword [edi + 8]
test eax, eax
je 0x508493
mov eax, dword [eax + 8]
jmp 0x508495
xor eax, eax
mov al, byte [eax + 0x81]
mov ecx, dword [edi + 0xc]
shr al, 3
and al, 1
movzx eax, al
push eax
call fcn.00500050
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x50855a
cmp dword [esi + 8], 0
jne 0x5084d5
or ecx, 0xffffffff
lock xadd dword [eax + 4], ecx
dec ecx
jne 0x50855a
mov eax, dword [esi]
mov ecx, esi
jmp 0x508556
mov ecx, dword [edi + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
mov eax, dword [edi + 8]
test eax, eax
je 0x5084e9
mov eax, dword [eax + 8]
jmp 0x5084eb
xor eax, eax
push eax
lea eax, [ebp - 0x3c]
push eax
call edx
mov ecx, dword [edi + 0x10]
test ecx, ecx
je 0x508521
mov ecx, dword [ecx + 8]
test ecx, ecx
je 0x508521
movups xmm0, xmmword [ebp - 0x3c]
sub esp, 0x10
mov eax, esp
push 0
movups xmmword [eax], xmm0
push ecx
lea eax, [ebp - 0x4c]
push eax
call fcn.004a5460
movups xmm0, xmmword [ebp - 0x4c]
add esp, 0x1c
jmp 0x508525
movups xmm0, xmmword [ebp - 0x3c]
mov ecx, dword [edi + 0xc]
sub esp, 0x10
mov eax, esp
movups xmmword [eax], xmm0
call fcn.00500390
or eax, 0xffffffff
lock xadd dword [esi + 4], eax
dec eax
jne 0x50855a
mov eax, dword [esi]
mov ecx, esi
jmp 0x508556
mov ecx, dword [esi + 0xc]
mov dword [esi + 0xc], 0
test ecx, ecx
je 0x50855a
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [ebp - 0x20]
mov byte [eax], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret