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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x586b58
mov eax, dword fs:[0]
push eax
sub esp, 0x60
push ebx
push esi
push edi
mov eax, dword [0x5e95e0]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov ebx, ecx
xor esi, esi
cmp ebx, esi
je 0x50d592
cmp dword [ebx + 0x20], esi
je 0x50d592
call fcn.00530e1f
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x50d39b
push 0x80004005
call fcn.00401f70
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x44], eax
mov dword [esp + 0x78], esi
call fcn.00530e1f
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x50d3c9
push 0x80004005
call fcn.00401f70
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
mov edi, dword [ebp + 8]
mov byte [esp + 0x78], 1
mov eax, dword [edi + 4]
cmp eax, 0x104
ja 0x50d416
je case.0x50d42b.515
sub eax, 7
cmp eax, 0xf9
ja case.0x50d42b.514
movzx ecx, byte [eax + 0x50d6c0]
jmp dword [ecx*4 + 0x50d6b4]
mov dword [esp + 0x20], esi
jmp case.0x50d42b.514
sub eax, 0x200
cmp eax, 0xa
ja case.0x50d42b.514
movzx edx, byte [eax + 0x50d7cc]
jmp dword [edx*4 + 0x50d7bc]
mov esi, ebx
call fcn.0050ebc0
test eax, eax
je case.0x50d42b.515
mov eax, dword [edi + 0x14]
mov ecx, dword [edi + 0x18]
lea edx, [esp + 0x18]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x20]
push edx
push eax
mov dword [esp + 0x24], ecx
call dword [sym.imp.USER32.dll_ScreenToClient]
lea ecx, [esp + 0x18]
lea esi, [ebx + 0x54]
push ecx
call fcn.004fcfd0
test eax, eax
jl case.0x50d42b.515
mov edi, eax
mov eax, esi
call fcn.004fd080
mov esi, ebx
call fcn.0050dca0
jmp case.0x50d42b.514
mov eax, 1
cmp dword [ebx + 0x334], eax
je 0x50d69a
cmp dword [ebx + 0x380], eax
je 0x50d69a
mov edx, dword [ebx + 0x328]
add edi, 0x14
cmp edx, dword [edi]
jne 0x50d4bc
mov eax, dword [ebx + 0x32c]
mov ecx, dword [ebp + 8]
cmp eax, dword [ecx + 0x18]
je case.0x50d42b.514
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.USER32.dll_SetRectEmpty]
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov dword [esp + 0x18], eax
mov dword [ebx + 0x328], eax
lea eax, [esp + 0x18]
mov dword [esp + 0x1c], ecx
mov dword [ebx + 0x32c], ecx
mov ecx, dword [ebx + 0x318]
push eax
push ecx
call dword [sym.imp.USER32.dll_ScreenToClient]
cmp dword [ebx + 0x324], 0
je 0x50d5a9
lea edx, [esp + 0x18]
lea esi, [esp + 0x14]
mov ecx, ebx
call fcn.0050ed50
push eax
lea ecx, [esp + 0x48]
mov byte [esp + 0x7c], 2
call fcn.00402310
mov ecx, esi
mov byte [esp + 0x78], 1
call fcn.004a4690
mov eax, dword [ebx + 0x20]
xor ecx, ecx
push ecx
push 1
mov dword [esp + 0x50], ecx
mov dword [ebx + 0x330], ecx
push eax
lea edi, [esp + 0x3c]
call fcn.0050d7e0
mov byte [esp + 0x78], 0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x50d56a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x78], 0xffffffff
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x50d592
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov esi, ebx
call fcn.0050ebc0
test eax, eax
je 0x50d5d8
mov eax, dword [ebx + 0x360]
test al, 2
jne 0x50d5d8
test al, 8
jne 0x50d5cc
call fcn.0050dc30
jmp case.0x50d42b.514
mov ecx, ebx
call fcn.0050dc70
jmp case.0x50d42b.514
mov edx, dword [edi + 4]
mov eax, dword [edi]
push edx
push eax
lea esi, [esp + 0x38]
mov ecx, ebx
call fcn.0050faa0
mov esi, eax
test esi, esi
jne 0x50d635
push 1
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x20]
push edx
call fcn.0050ec20
mov esi, eax
test esi, esi
jne 0x50d635
mov dword [ebx + 0x330], eax
lea eax, [ebx + 0x33c]
push eax
call dword [sym.imp.USER32.dll_SetRectEmpty]
mov ecx, dword [ebx + 0x20]
push 0x100
push ecx
call dword [sym.imp.USER32.dll_KillTimer]
mov esi, ebx
call fcn.0050dc30
jmp case.0x50d42b.514
cmp esi, dword [ebx + 0x330]
jne 0x50d690
lea edx, [ebx + 0x33c]
push edx
lea ecx, [esp + 0x38]
call fcn.0048c6c0
test eax, eax
jne 0x50d690
mov eax, dword [ebx + 0x360]
test al, 2
je 0x50d670
mov ecx, ebx
call fcn.0050dc70
mov eax, edi
mov esi, ebx
call fcn.0050e210
jmp case.0x50d42b.514
test al, 4
jne 0x50d5cc
cmp esi, dword [ebx + 0x330]
jne 0x50d690
test al, 1
jne 0x50d690
mov esi, ebx
call fcn.0050dc30
jmp case.0x50d42b.514
push 0
push 1
push esi
jmp 0x50d53c
lea ecx, [esp + 0x10]
call fcn.004a4690
lea eax, [esp + 0x30]
call fcn.00511890
jmp 0x50d592