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

Disassembly:
push 0xffffffffffffffff
push 0x5b9d2a
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x62ece4]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov esi, ecx
mov ebp, 1
push esi
lea ecx, [esp + 0x70]
mov dword [esi + 0x1ac], ebp
call fcn.004861d5
xor ebx, ebx
mov ecx, esi
mov dword [esp + 0x88], ebx
call fcn.00508430
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xec]
push esi
call eax
push eax
lea ecx, [esp + 0x70]
push ecx
lea ecx, [esp + 0x54]
call fcn.004dc120
push ebx
lea edx, [esp + 0x60]
push edx
push ebx
push 0x30
mov byte [esp + 0x98], 1
call dword [sym.imp.USER32.dll_SystemParametersInfoW]
mov eax, dword [esi]
mov edx, dword [eax + 0x1b0]
lea ecx, [esp + 0x3c]
push ecx
mov ecx, esi
call edx
mov dword [esp + 0x28], ebx
cmp dword [esi + 0x1bc], ebx
je 0x5108a7
mov ecx, esi
call fcn.00508430
push ebx
push ebx
sub esp, 0x10
mov edi, eax
mov dword [esp + 0x2c], esp
mov eax, esp
push ebx
push eax
call dword [sym.imp.USER32.dll_CopyRect]
mov eax, dword [edi]
mov eax, dword [eax + 0xc0]
lea ecx, [esp + 0x84]
push ecx
lea edx, [esp + 0x48]
push edx
mov ecx, edi
call eax
mov ecx, dword [eax]
mov eax, dword [eax + 4]
add dword [esp + 0x40], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], eax
cmp dword [esi + 0xf8], ebp
jne 0x510924
mov edx, dword [esi]
mov eax, dword [edx + 0x1dc]
mov ecx, esi
call eax
push ebx
lea ecx, [esp + 0x40]
push ecx
push 0x142
mov ecx, esi
call fcn.00508510
mov ecx, dword [esi + 0xfc]
push eax
lea edx, [esp + 0x7c]
push edx
lea eax, [esp + 0x28]
push eax
call fcn.0050ed80
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x14]
sub eax, dword [esp + 0x44]
push edx
mov ecx, edx
sub ecx, dword [esp + 0x2c]
push eax
push ecx
mov ecx, dword [esp + 0x48]
push ecx
lea edx, [esi + 0x1c0]
push edx
call dword [sym.imp.USER32.dll_SetRect]
lea eax, [esi + 0x1d0]
push eax
call dword [sym.imp.USER32.dll_SetRectEmpty]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
jmp 0x510b75
mov ecx, dword [esi + 0xfc]
push ebx
push ebp
push 0xffffffffffffffff
push 0xa
call fcn.0050cd20
cmp eax, ebx
je 0x510947
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x110]
call eax
jmp 0x510949
xor eax, eax
mov dword [esi + 0x1e0], eax
mov dword [esp + 0x30], ebx
cmp eax, ebx
je 0x51096c
sub eax, 2
neg eax
sbb eax, eax
and eax, 3
add eax, 8
add dword [esp + 0x48], eax
mov dword [esp + 0x30], eax
cmp dword [esp + 0x94], ebx
jne 0x5109c3
mov ecx, esi
xor edi, edi
call fcn.00508d40
test eax, eax
jle 0x5109b0
push edi
mov ecx, esi
call fcn.00508d50
cmp eax, ebx
je 0x5109a3
cmp dword [eax + 0x100], esi
jne 0x5109a3
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x9c]
push ebx
call eax
mov ecx, esi
add edi, ebp
call fcn.00508d40
cmp edi, eax
jl 0x510982
mov ecx, esi
call fcn.00510150
mov edx, dword [esi]
mov eax, dword [edx + 0x1dc]
mov ecx, esi
call eax
mov ecx, dword [esi + 0xfc]
push 0x23be
call fcn.0050e6b0
xor ebp, ebp
mov edi, eax
cmp dword [esi + 0x1b0], ebx
je 0x510a8b
mov ecx, esi
call fcn.00508430
mov edx, dword [eax]
mov edx, dword [edx + 0xb8]
push ebx
push ebx
push esi
push ebx
push 1
lea ecx, [esp + 0x80]
push ecx
lea ecx, [esp + 0x4c]
push ecx
mov ecx, eax
call edx
mov ecx, dword [eax]
mov ebp, dword [eax + 4]
add dword [esp + 0x48], ebp
mov dword [esp + 0x14], ecx
cmp edi, ebx
jne 0x510a8f
push 0x174
call fcn.0047b2c8
mov edi, eax
add esp, 4
mov dword [esp + 0x14], edi
mov byte [esp + 0x88], 2
cmp edi, ebx
je 0x510a63
mov ecx, edi
call fcn.004ff5e0
mov dword [edi], vtable.CXTPPopupBar::CControlExpandButton.1.0
mov dword [edi + 0x20], vtable.CXTPPopupBar::CControlExpandButton.0
mov dword [edi + 0xfc], 1
mov dword [edi + 0xd4], 0x5a
jmp 0x510a65
xor edi, edi
mov ecx, dword [esi + 0xfc]
push 1
push 0xffffffffffffffff
push 0x60584c
push 0x23be
push edi
mov byte [esp + 0x9c], 1
call fcn.0050fb10
mov edi, eax
jmp 0x510a8f
cmp edi, ebx
je 0x510a9d
mov edx, dword [edi]
mov eax, dword [edx + 0x8c]
push 1
mov ecx, edi
call eax
lea ecx, [esp + 0x3c]
push ecx
mov ecx, esi
call fcn.00508510
mov edx, dword [esp + 0x98]
push eax
push edx
lea eax, [esp + 0x78]
push eax
lea ecx, [esp + 0x2c]
push ecx
mov ecx, dword [esi + 0xfc]
call fcn.0050e000
cmp dword [esi + 0x1b0], ebx
je 0x510b1c
mov edx, dword [edi]
mov eax, dword [edx + 0x8c]
push ebx
mov ecx, edi
call eax
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x48]
mov edx, dword [esp + 0x1c]
sub edx, dword [esp + 0x44]
mov ebx, dword [esp + 0x3c]
lea ecx, [eax + ebp]
mov ebp, dword [edi]
mov dword [esp + 0x94], ecx
sub esp, 0x10
mov ecx, esp
mov dword [ecx], ebx
mov dword [ecx + 4], eax
mov eax, dword [ebp + 0x74]
mov dword [ecx + 8], edx
mov edx, dword [esp + 0xa4]
mov dword [ecx + 0xc], edx
mov ecx, edi
call eax
xor ebx, ebx
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x1c]
sub eax, dword [esp + 0x44]
mov edi, dword [sym.imp.USER32.dll_SetRect]
push edx
mov ecx, edx
sub ecx, dword [esp + 0x2c]
push eax
push ecx
mov ecx, dword [esp + 0x48]
push ecx
lea edx, [esi + 0x1c0]
push edx
call edi
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x30]
lea edx, [eax + ecx]
mov ecx, dword [esp + 0x1c]
sub ecx, dword [esp + 0x44]
push edx
mov edx, dword [esp + 0x40]
push ecx
push eax
push edx
lea eax, [esi + 0x1d0]
push eax
call edi
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov dword [esi + 0x1ac], ebx
mov esi, dword [esp + 0x90]
mov dword [esi], ecx
lea ecx, [esp + 0x4c]
mov dword [esi + 4], edx
mov byte [esp + 0x88], bl
call fcn.004dc1a0
lea ecx, [esp + 0x6c]
mov dword [esp + 0x88], 0xffffffff
call fcn.00486229
mov eax, esi
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x78
ret 0xc