Function at 0x40ff30
Capabilities:
Access peb ldr_data
Create thread
Get kernel32 base address
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x415756
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
xor ebx, ebx
mov dword [esi + 0x3c], 0x416324
mov dword [esp + 0x1c], ebx
mov dword [esi + 0x48], ebx
mov dword [esi + 0x4c], ebx
mov dword [esi + 0x44], ebx
mov dword [esi + 0x40], ebx
mov dword [esi + 0x50], ebx
mov dword [esi + 0x54], 0xa
lea edi, [esi + 0x64]
mov byte [esp + 0x1c], 1
mov ecx, edi
call sub.MFC42u.DLL_CString::CString_1
mov cl, byte [esp + 0x28]
mov al, byte [esp + 0x24]
lea edx, [esp + 0x2c]
mov byte [esi + 0x39], cl
push edx
mov ecx, edi
mov byte [esp + 0x20], 2
mov dword [esi], 0x416320
mov byte [esi + 0x38], al
call fcn.00413dfa
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov dword [esi + 0x60], eax
lea eax, [esi + 8]
xor edx, edx
mov dword [esi + 0x58], ecx
mov dword [esi + 0x6c], ebx
mov dword [esi + 4], ebx
mov dword [eax], edx
xor ecx, ecx
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventW]
push ebx
mov dword [eax + 4], edx
push 1
push ebx
push ebx
mov dword [eax + 8], edx
mov dword [eax + 0xc], edx
mov dword [eax + 0x10], edx
lea edx, [esi + 0x1c]
mov dword [esi + 0x1c], ecx
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov dword [edx + 0xc], ecx
mov dword [edx + 0x10], ecx
mov byte [esi + 0x68], bl
call edi
push ebx
push 1
push ebx
push ebx
mov dword [esi + 0x30], eax
call edi
mov ecx, dword [esi + 0x30]
mov dword [esi + 0x34], eax
mov dword [esi + 0x2c], eax
mov al, byte [esi + 0x38]
cmp al, bl
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ecx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
je 0x4100b7
mov edx, dword [esp + 0x38]
mov dword [esi + 0x5c], edx
je 0x4100b7
push str.RR_ServerReadyEvent
push ebx
push 1
push ebx
call edi
cmp eax, ebx
mov dword [esi + 4], eax
jne 0x410074
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push 0x4207b8
call fcn.00413dc4
push ecx
mov byte [esp + 0x24], 3
mov ecx, esp
mov dword [esp + 0x30], esp
push str.CreateEvent
call fcn.00413dc4
push ebx
mov byte [esp + 0x28], 2
call fcn.00406a10
add esp, 0xc
lea eax, [esp + 0x10]
push eax
push ebx
push esi
push 0x410760
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
mov dword [esi + 0x6c], eax
jne 0x41011f
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push 0x4207b8
call fcn.00413dc4
push ecx
mov byte [esp + 0x24], 4
mov ecx, esp
mov dword [esp + 0x30], esp
push str.CreateThread__MainServerThread_
jmp 0x41010c
mov ecx, esi
call fcn.00410d50
cmp dword [esi + 0x48], ebx
jle 0x41011f
mov edi, dword [esi + 0x40]
add edi, 8
je 0x41011f
cmp byte [esi + 0x39], bl
je 0x41011f
lea ecx, [edi + 8]
push ecx
push ebx
push esi
push 0x410940
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
mov dword [edi + 4], eax
jne 0x41011f
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push 0x4207b8
call fcn.00413dc4
push ecx
mov byte [esp + 0x24], 5
mov ecx, esp
mov dword [esp + 0x30], esp
push str.CreateThread__Worker_
call fcn.00413dc4
push ebx
mov byte [esp + 0x28], 2
call fcn.00406a10
add esp, 0xc
lea ecx, [esp + 0x2c]
mov dword [esp + 0x1c], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x14]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x14
ret 0x18