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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x560c7b
mov eax, dword fs:[0]
push eax
sub esp, 0x50
push ebx
push esi
push edi
mov eax, dword [0x5c3678]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x14], ebx
mov esi, dword [ebp + 8]
test esi, esi
jne 0x508a73
mov eax, 1
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebx + 0x170]
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
mov dword [ecx], eax
test eax, eax
je 0x508a8e
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push eax
call edx
mov eax, dword [esi + 4]
mov ecx, dword [ebx - 0x20]
push eax
lea edi, [esi + 0x14]
push ecx
lea esi, [ebx + 0x174]
call fcn.005082e0
test al, al
je 0x508a59
mov eax, dword [ebx + 0x170]
push 1
push ecx
mov ecx, esp
mov dword [esp + 0x24], esp
mov dword [ecx], eax
test eax, eax
je 0x508ac5
mov edx, dword [eax]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp + 8]
push esi
lea ecx, [ebx + 4]
push ecx
call fcn.004ac550
mov edx, dword [ebx - 0x20]
push edx
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x508d25
cmp dword [esi + 4], 0x200
jne 0x508d25
cmp dword [ebx + 0x158], 0
lea edi, [ebx + 0x158]
je 0x508d25
call dword [sym.imp.USER32.dll_GetMessagePos]
movsx ecx, ax
shr eax, 0x10
movsx edx, ax
lea eax, [esp + 0x24]
mov dword [esp + 0x24], ecx
mov ecx, dword [ebx - 0x20]
push eax
push ecx
mov dword [esp + 0x30], edx
call dword [sym.imp.USER32.dll_ScreenToClient]
mov eax, edi
call fcn.0046f8d0
mov edx, dword [eax]
mov edx, dword [edx + 0x40]
lea ecx, [esp + 0x3c]
push ecx
push eax
call edx
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x50]
push ecx
call dword [sym.imp.USER32.dll_CopyRect]
push ecx
mov eax, edi
mov ecx, esp
mov dword [esp + 0x1c], esp
call fcn.00472530
lea esi, [esp + 0x28]
call fcn.004928f0
add esp, 4
cmp al, 1
jne 0x508d25
push 1
push 0xa034
mov eax, edi
call fcn.0046f8d0
lea esi, [esp + 0x20]
call fcn.0046fb00
lea ecx, [esp + 0x2c]
mov dword [esp + 0x68], 0
call fcn.004724f0
mov byte [esp + 0x68], 2
mov eax, dword [esp + 0x18]
test eax, eax
je 0x508bad
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
push 1
push 0xa036
mov eax, edi
call fcn.0046f8d0
lea esi, [esp + 0x24]
call fcn.0046fb00
lea ecx, [esp + 0x30]
mov byte [esp + 0x68], 3
call fcn.004724f0
mov byte [esp + 0x68], 5
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x508be7
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
push 1
push 0xa038
mov eax, edi
call fcn.0046f8d0
lea esi, [esp + 0x20]
call fcn.0046fb00
lea ecx, [esp + 0x34]
mov byte [esp + 0x68], 6
call fcn.004724f0
mov byte [esp + 0x68], 8
mov eax, dword [esp + 0x18]
test eax, eax
je 0x508c21
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
push 1
push 0xa03a
mov eax, edi
call fcn.0046f8d0
lea esi, [esp + 0x24]
call fcn.0046fb00
lea ecx, [esp + 0x38]
mov byte [esp + 0x68], 9
call fcn.004724f0
mov byte [esp + 0x68], 8
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x508c5b
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [esp + 0x68], 0xa
mov dword [esp + 0x18], 0
lea edi, [esp + 0x2c]
cmp dword [edi], 0
sete al
test al, al
jne 0x508cf5
mov eax, dword [edi]
test eax, eax
je 0x508d48
call fcn.004729a0
movzx ebx, ax
mov eax, dword [esp + 0x14]
cmp word [eax + 0x180], bx
je 0x508cb6
push ecx
mov eax, edi
mov ecx, esp
mov dword [esp + 0x24], esp
call fcn.00472530
lea esi, [esp + 0x28]
call fcn.004928f0
add esp, 4
test al, al
jne 0x508cc7
mov ecx, dword [esp + 0x14]
cmp word [ecx + 0x180], bx
je 0x508cc7
xor ecx, ecx
jmp 0x508ccc
mov ecx, 1
mov eax, dword [edi]
test eax, eax
je 0x508d48
mov edx, dword [eax]
push ecx
push eax
mov eax, dword [edx + 0xf8]
call eax
mov eax, dword [edi]
test eax, eax
je 0x508d48
mov ecx, dword [eax]
mov edx, dword [ecx + 0x9c]
push 1
push eax
call edx
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
inc eax
add edi, 4
mov dword [esp + 0x18], eax
cmp eax, 4
jb 0x508c6f
push 0x472070
push 4
push 4
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x78], 0xffffffff
call fcn.0053de6b
mov ecx, dword [ebp + 8]
mov edx, dword [ebx - 0x20]
push ecx
push edx
call dword [sym.imp.USER32.dll_IsDialogMessageW]
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x80004003
call fcn.0053c010
int3