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

Disassembly:
mov eax, dword [esp + 4]
mov edx, dword [eax + 0x20]
test edx, edx
push esi
jne case.0x5065b9.16
mov edx, dword [0x6b9444]
test edx, edx
je 0x506563
mov eax, 0xf4240
pop esi
ret 4
mov edx, dword [eax + 4]
cmp edx, 0x100
je 0x5065a7
cmp edx, 0x101
je 0x5065a7
cmp edx, 0x102
jne case.0x5065b9.16
mov dl, byte [eax + 0x10]
test dl, 4
jg case.0x5065b9.8
test dl, 8
jg case.0x5065b9.8
cmp word [eax + 8], 9
jne case.0x5065b9.8
test dl, 2
setg al
push eax
call fcn.00509df0
mov eax, 0xf4240
pop esi
ret 4
mov edx, dword [eax + 8]
lea esi, [edx - 8]
cmp esi, 0x68
ja case.0x5065b9.9
movzx esi, byte [esi + 0x5065f0]
jmp dword [esi*4 + 0x5065e4]
test byte [eax + 0x10], 4
jle case.0x5065b9.16
cmp edx, 0x41
jb case.0x5065b9.16
cmp edx, 0x5a
ja case.0x5065b9.16
pop esi
mov dword [esp + 4], eax
jmp 0x509ff0
mov eax, 0xf4241
pop esi
ret 4
sub esp, 0xd4
push ebx
push ebp
push esi
mov ebp, ecx
mov eax, dword [ebp + 0x14c]
push edi
xor edi, edi
mov esi, vtable.ytUIEvent.0
lea ecx, [esp + 0x7c]
mov dword [esp + 0x10], eax
mov dword [esp + 0x9c], 0x3f800000
mov dword [esp + 0xa0], 0
mov dword [esp + 0xa4], 0
mov dword [esp + 0xa8], 0
mov dword [esp + 0xac], 0x3f800000
mov dword [esp + 0xb0], 0
mov dword [esp + 0xb4], 0
mov dword [esp + 0xb8], 0
mov dword [esp + 0xbc], 0x3f800000
mov byte [esp + 0xc0], 1
mov dword [esp + 0xc8], 0
mov dword [esp + 0xcc], 0
mov dword [esp + 0xd0], 0
mov dword [esp + 0xd4], 0
mov dword [esp + 0xdc], edi
mov dword [esp + 0x7c], esi
call fcn.004e1fa0
mov ebx, dword [esp + 0xe8]
cmp dword [ebx + 4], 0x101
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], esi
mov dword [esp + 0x74], edi
mov dword [esp + 0x6c], edi
mov dword [esp + 0x68], edi
mov dword [esp + 0x64], edi
mov dword [esp + 0x60], edi
mov byte [esp + 0x58], 1
mov dword [esp + 0x54], 0x3f800000
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x44], 0x3f800000
mov dword [esp + 0x40], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], 0x3f800000
jne 0x50a21b
call fcn.004e1fa0
mov ecx, dword [ebx + 8]
mov dl, byte [ebx + 0x10]
lea eax, [esp + 0x1c]
mov dword [esp + 0x24], ecx
push eax
lea ecx, [esp + 0x88]
mov dword [esp + 0x20], 0x14
mov byte [esp + 0x74], dl
call fcn.0050a5b0
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x84], ecx
mov ecx, edx
mov dword [esp + 0x8c], edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x94], edx
mov edx, dword [esp + 0x60]
mov dword [esp + 0x98], eax
mov eax, dword [esp + 0x64]
mov ecx, 0xa
lea esi, [esp + 0x34]
lea edi, [esp + 0x9c]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0xc4], ecx
mov ecx, dword [esp + 0x68]
mov dword [esp + 0xd0], ecx
lea ecx, [esp + 0x74]
mov dword [esp + 0xc8], edx
mov edx, dword [esp + 0x6c]
mov dword [esp + 0xcc], eax
mov al, byte [esp + 0x70]
push ecx
lea ecx, [esp + 0xe0]
mov dword [esp + 0xd8], edx
mov byte [esp + 0xdc], al
call fcn.00436200
mov dl, byte [esp + 0x78]
mov al, byte [esp + 0x79]
mov esi, vtable.ytUIEvent.0
lea ecx, [esp + 0x74]
mov byte [esp + 0xe0], dl
mov byte [esp + 0xe1], al
mov dword [esp + 0x14], esi
call fcn.004039f0
jmp 0x50a318
call fcn.004e1fa0
mov ecx, dword [ebx + 8]
mov dl, byte [ebx + 0x10]
lea eax, [esp + 0x1c]
mov dword [esp + 0x24], ecx
push eax
lea ecx, [esp + 0x88]
mov dword [esp + 0x20], 0x13
mov byte [esp + 0x74], dl
call fcn.0050a5b0
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x84], ecx
mov ecx, edx
mov dword [esp + 0x8c], edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x94], edx
mov edx, dword [esp + 0x60]
mov dword [esp + 0x98], eax
mov eax, dword [esp + 0x64]
mov ecx, 0xa
lea esi, [esp + 0x34]
lea edi, [esp + 0x9c]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0xc4], ecx
mov ecx, dword [esp + 0x68]
mov dword [esp + 0xd0], ecx
lea ecx, [esp + 0x74]
mov dword [esp + 0xc8], edx
mov edx, dword [esp + 0x6c]
mov dword [esp + 0xcc], eax
mov al, byte [esp + 0x70]
push ecx
lea ecx, [esp + 0xe0]
mov dword [esp + 0xd8], edx
mov byte [esp + 0xdc], al
call fcn.00436200
mov dl, byte [esp + 0x78]
mov al, byte [esp + 0x79]
lea ecx, [esp + 0x74]
mov byte [esp + 0xe0], dl
mov byte [esp + 0xe1], al
mov dword [esp + 0x14], vtable.ytUIEvent.0
call fcn.004039f0
mov esi, vtable.ytUIEvent.0
mov al, byte [ebx + 0x10]
test al, 1
jle 0x50a345
test al, 4
jle 0x50a345
lea ecx, [esp + 0xdc]
mov dword [esp + 0x7c], esi
call fcn.004039f0
mov eax, 0xf4241
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd4
ret 4
mov ecx, dword [ebp + 0x140]
test ecx, ecx
je 0x50a38a
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x80]
push eax
call fcn.004e0f40
cmp eax, 0xf4240
jne 0x50a38a
lea ecx, [esp + 0xdc]
mov dword [esp + 0x7c], esi
call fcn.004039f0
mov eax, 0xf4240
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd4
ret 4
mov ecx, dword [ebp + 0x14c]
test ecx, ecx
jne 0x50a3b3
lea ecx, [esp + 0xdc]
mov dword [esp + 0x7c], esi
call fcn.004039f0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd4
ret 4
mov al, byte [ecx + 0x20e]
test al, al
jne 0x50a415
mov bl, byte [esp + 0xd8]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x80]
or bl, 0x10
push eax
mov byte [esp + 0xe0], bl
call fcn.004e0e70
mov edi, eax
cmp edi, 0xf4240
je 0x50a4e5
mov ecx, dword [ebp + 0x14c]
mov edx, dword [ecx]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x80]
push eax
push ecx
call dword [edx + 0x74]
mov edi, eax
cmp edi, 0xf4240
je 0x50a4e5
mov cl, byte [esp + 0xd8]
mov eax, dword [ebp + 0x158]
and cl, 0xef
xor ebx, ebx
test eax, 0xfffffffe
mov edi, 0xf4241
mov byte [esp + 0xd8], cl
jbe 0x50a510
mov edi, edi
mov ecx, dword [ebp + 0x154]
mov esi, dword [ecx + ebx*4]
mov al, byte [esi + 0x20e]
test al, al
jne 0x50a4cc
cmp esi, dword [ebp + 0x14c]
je 0x50a4cc
mov edx, dword [esp + 0xe8]
mov al, byte [edx + 0x10]
test al, 4
jg 0x50a482
test al, 8
jg 0x50a482
mov eax, dword [esp + 0x8c]
cmp eax, 0xd
je 0x50a47e
cmp eax, 0x1b
jne 0x50a482
mov dword [esp + 0x10], esi
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x80]
push ecx
mov ecx, esi
call fcn.004e0e70
mov edi, eax
cmp edi, 0xf4240
je 0x50a4e5
mov edx, dword [esi]
mov ecx, esi
call dword [edx]
mov eax, dword [esi]
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x80]
push edx
push esi
mov ecx, esi
call dword [eax + 0x74]
mov edi, eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
cmp edi, 0xf4240
je 0x50a4e5
mov ecx, dword [ebp + 0x158]
inc ebx
shr ecx, 1
cmp ebx, ecx
jb 0x50a440
cmp edi, 0xf4240
jne 0x50a510
push 1
push 0
push 1
push 1
sub esp, 0x10
or eax, 0xffffffff
mov ebx, esp
mov dword [ebx], eax
or ecx, 0xffffffff
mov dword [ebx + 4], ecx
or edx, 0xffffffff
or esi, 0xffffffff
mov dword [ebx + 8], edx
mov ecx, ebp
mov dword [ebx + 0xc], esi
call fcn.00506ef0
mov al, byte [ebp + 0x164]
test al, al
je 0x50a529
mov edx, dword [ebp]
mov ecx, ebp
mov byte [ebp + 0x164], 0
call dword [edx + 0x70]
mov eax, dword [esp + 0xdc]
test eax, eax
mov dword [esp + 0x7c], vtable.ytUIEvent.0
je 0x50a596
mov ecx, dword [eax]
and ecx, 0xff
cmp ecx, 0x80
mov esi, eax
jae 0x50a596
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
and eax, 0xff
cmp eax, 0x7f
jne 0x50a582
mov edx, dword [esi]
and edx, 0xff
cmp edx, 0x80
jae 0x50a57d
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
and eax, 0xff
jmp 0x50a582
mov eax, 0xff
test eax, eax
jne 0x50a596
mov eax, dword [esp + 0xdc]
push eax
call fcn.00499410
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd4
ret 4