Function at 0x416910
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
sub esp, 0x234
mov eax, dword [0x984164]
xor eax, esp
mov dword [esp + 0x22c], eax
mov eax, dword [0x98761c]
push ebx
push ebp
push esi
push edi
push str.Subsystem_DLLs
push 0
push 0x1402
mov esi, ecx
push eax
mov dword [esp + 0x28], esi
call dword [sym.imp.USER32.dll_SendMessageW]
mov edi, 1
mov dword [esi + 0x664], 6
mov dword [esp + 0x28], edi
push edi
push str.REGISTRYMachineSYSTEMControlSet_03uControlSession_ManagerSubsystems
lea edx, [esp + 0x38]
mov dword [esp + 0x24], 0
mov byte [esp + 0x1f], 0
call fcn.00401bb0
push 0
lea ecx, [esp + 0x60]
push ecx
push 0x80000002
mov eax, 0x92bc38
call fcn.00500730
mov esi, eax
add esp, 0x14
test esi, esi
je 0x416c12
mov eax, dword [esi + 8]
lea edx, [esi + 0xc]
shr eax, 1
push edx
call fcn.004fef10
add esp, 4
mov ebp, eax
mov eax, dword fs:[0x18]
mov ecx, dword [eax + 0x30]
mov edx, dword [ecx + 0x18]
push esi
push 0
push edx
mov dword [esp + 0x30], ebp
call dword [sym.imp.Ntdll.dll_RtlFreeHeap]
test ebp, ebp
je 0x416c12
push str.ServerDll
push ebp
call fcn.00508631
add esp, 8
test eax, eax
je 0x416bf8
lea edi, [eax + 0x14]
movzx eax, word [edi]
mov ebx, edi
mov dword [esp + 0x20], ebx
test ax, ax
je 0x416a13
movzx eax, ax
cmp ax, 0x3a
je 0x416a0f
cmp ax, 0x2c
je 0x416a0f
movzx eax, word [ebx + 2]
add ebx, 2
test ax, ax
jne 0x4169f7
mov dword [esp + 0x20], ebx
cmp ebx, edi
jb 0x416ba6
mov esi, ebx
sub esi, edi
sar esi, 1
xor ecx, ecx
lea eax, [esi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00507d92
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x416ba2
add esi, esi
push esi
push edi
push ebp
call fcn.005186a0
xor eax, eax
add esp, 0xc
push eax
mov ecx, ebp
mov word [esi + ebp], ax
call fcn.004fabf0
mov ebx, eax
add esp, 4
mov dword [esp + 0x2c], ebx
test ebx, ebx
je 0x416b95
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x416a8d
push ebx
push esi
call fcn.00507f2e
add esp, 8
test eax, eax
je 0x416b84
push str.Subsystem_DLL
mov eax, ebx
call fcn.00505200
mov esi, dword [esp + 0x1c]
add esp, 4
push ebx
push esi
mov dword [esi + 0x784], eax
call fcn.00416140
mov ecx, dword [esi + 0x654]
mov eax, dword [ecx + 0x30]
cmp eax, 5
je 0x416ac0
cmp eax, 0xd
jne 0x416af3
push 6
push str.consrv
push edi
call fcn.00508c31
add esp, 0xc
test eax, eax
jne 0x416af3
mov edx, 0x77
mov eax, 0x69
mov ecx, 0x6e
mov word [edi], dx
mov word [edi + 2], ax
mov word [edi + 4], cx
mov byte [esp + 0x17], 1
mov eax, dword [0x98761c]
mov esi, dword [esi + 0x784]
xor edi, edi
test eax, eax
je 0x416b14
push 8
push eax
call dword [sym.imp.USER32.dll_GetWindowLongW]
mov edi, eax
mov eax, dword [0x98761c]
test esi, esi
je 0x416b72
cmp dword [esi], 0x5441534b
jne 0x416b72
push esi
push 2
push 0x1404
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov edx, dword [0x98761c]
push esi
push 0
push 0x1405
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [esi + 4]
cmp ecx, 4
jl 0x416b62
mov ebx, dword [ecx*4 + 0x985718]
mov ecx, dword [edi + 0x10]
lea eax, [esi + 0xc]
call fcn.004fe380
mov ebx, dword [esp + 0x2c]
push esi
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapFree]
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov dword [eax + 0x784], 0
test esi, esi
je 0x416b91
push esi
call fcn.00507bce
add esp, 4
mov dword [esp + 0x1c], ebx
push ebp
call fcn.00507bce
mov ebx, dword [esp + 0x24]
add esp, 4
mov ebp, dword [esp + 0x24]
push str.ServerDll
push ebx
call fcn.00508631
add esp, 8
test eax, eax
jne 0x4169e3
cmp byte [esp + 0x17], al
je 0x416bf8
mov eax, ebp
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x416bc7
sub eax, edx
sar eax, 1
lea ecx, [eax + eax + 2]
push ecx
lea edx, [esp + 0x34]
push ebp
push edx
call fcn.004f9790
add esp, 0xc
test eax, eax
jne 0x416bf8
mov eax, dword [esp + 0x18]
mov byte [eax + 0x78e], 1
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00507bce
add esp, 4
push ebp
call fcn.00507bce
mov edi, dword [esp + 0x2c]
add esp, 4
inc edi
mov dword [esp + 0x28], edi
cmp edi, 0xa
jb 0x416959
mov ecx, dword [esp + 0x23c]
mov edx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
mov dword [edx + 0x664], 0
xor eax, eax
call fcn.005078c8
add esp, 0x234
ret