Function at 0x409cb8
Capabilities:
Access peb ldr_data
Allocate or change rwx memory
Get number of processors

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb0
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 0x10], edx
mov dword [ebp - 4], eax
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
xor eax, eax
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x50]
mov edx, 0x28
call fcn.0040288c
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
cmp dword [ebp + 8], 0
je 0x409d32
mov eax, dword [ebp + 8]
mov dword [eax], 0xffffffff
push ebp
lea eax, [ebp - 0x50]
call fcn.00408648
pop ecx
push ebp
lea eax, [ebp - 0x50]
call fcn.00408850
pop ecx
mov eax, 0x1694
call sub.rtl120.bpl__System__GetMem_qqri
mov dword [ebp - 0x24], eax
mov edx, 0x1694
mov eax, dword [ebp - 0x24]
call fcn.0040288c
xor ecx, ecx
push ebp
push 0x40a158
push dword fs:[ecx]
mov dword fs:[ecx], esp
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x50]
mov edx, dword [ebp - 0x24]
mov dword [edx], eax
mov edx, dword [ebp - 0x24]
mov eax, 0x8000
mov dword [edx + 0x14], eax
dec eax
mov edx, dword [ebp - 0x24]
mov dword [edx + 0x1c], eax
mov edx, dword [ebp - 0x24]
mov eax, 0xf
mov dword [edx + 0x38], eax
mov ecx, eax
mov edx, 1
shl edx, cl
mov eax, dword [ebp - 0x24]
mov dword [eax + 0x34], edx
dec edx
mov eax, dword [ebp - 0x24]
mov dword [eax + 0x3c], edx
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x38]
add eax, 3
dec eax
mov ecx, 3
xor edx, edx
div ecx
mov edx, dword [ebp - 0x24]
mov dword [edx + 0x40], eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x14]
add eax, eax
call sub.rtl120.bpl__System__GetMem_qqri
mov edx, dword [ebp - 0x24]
mov dword [edx + 0x20], eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x14]
add eax, eax
call sub.rtl120.bpl__System__GetMem_qqri
mov edx, dword [ebp - 0x24]
mov dword [edx + 0x28], eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x34]
add eax, eax
call sub.rtl120.bpl__System__GetMem_qqri
mov edx, dword [ebp - 0x24]
mov dword [edx + 0x2c], eax
mov edx, dword [ebp - 0x24]
mov eax, 0x4000
mov dword [edx + 0x166c], eax
push 0x40
push 0x1000
add eax, eax
add eax, eax
push eax
push 0
call sub.kernel32.dll_VirtualAlloc
mov edx, dword [ebp - 0x24]
mov dword [edx + 4], eax
mov edx, dword [ebp - 0x24]
mov edx, dword [edx + 0x166c]
add edx, edx
add edx, edx
mov ecx, dword [ebp - 0x24]
mov dword [ecx + 8], edx
mov edx, dword [ebp - 0x24]
mov edx, dword [edx + 0x166c]
shr edx, 1
lea eax, [eax + edx*2]
mov edx, dword [ebp - 0x24]
mov dword [edx + 0x1674], eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x166c]
lea eax, [eax + eax*2]
mov edx, dword [ebp - 0x24]
mov edx, dword [edx + 4]
lea eax, [edx + eax]
mov edx, dword [ebp - 0x24]
mov dword [edx + 0x1668], eax
mov eax, dword [ebp - 0x24]
xor edx, edx
mov dword [eax + 0x10], edx
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 4]
mov edx, dword [ebp - 0x24]
mov dword [edx + 0xc], eax
mov eax, dword [ebp - 0x24]
xor edx, edx
mov dword [eax + 0x1680], edx
mov eax, dword [ebp - 0x24]
add eax, 0x64
mov edx, dword [ebp - 0x24]
mov dword [edx + 0xae8], eax
mov eax, dword [ebp - 0x24]
mov dword [eax + 0xaf0], 0x58cd2c
mov eax, dword [ebp - 0x24]
add eax, 0x958
mov edx, dword [ebp - 0x24]
mov dword [edx + 0xaf4], eax
mov eax, dword [ebp - 0x24]
mov dword [eax + 0xafc], 0x58cd40
mov eax, dword [ebp - 0x24]
add eax, 0xa4c
mov edx, dword [ebp - 0x24]
mov dword [edx + 0xb00], eax
mov eax, dword [ebp - 0x24]
mov dword [eax + 0xb08], 0x58cd54
mov eax, dword [ebp - 0x24]
mov word [eax + 0x168c], 0
mov eax, dword [ebp - 0x24]
xor edx, edx
mov dword [eax + 0x1690], edx
mov eax, dword [ebp - 0x24]
mov dword [eax + 0x1688], 8
mov eax, dword [ebp - 0x24]
call fcn.00408cc8
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x14]
add eax, eax
mov edx, dword [ebp - 0x24]
mov dword [edx + 0x24], eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x34]
mov edx, dword [ebp - 0x24]
mov edx, dword [edx + 0x2c]
mov word [edx + eax*2 - 2], 0
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x34]
dec eax
mov edx, eax
add edx, edx
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x2c]
call fcn.0040288c
mov eax, dword [ebp - 0x24]
xor edx, edx
mov dword [eax + 0x54], edx
mov eax, dword [ebp - 0x24]
xor edx, edx
mov dword [eax + 0x44], edx
mov eax, dword [ebp - 0x24]
xor edx, edx
mov dword [eax + 0x5c], edx
mov eax, dword [ebp - 0x24]
mov dword [eax + 0x60], 2
mov eax, dword [ebp - 0x24]
mov dword [eax + 0x48], 2
mov eax, dword [ebp - 0x24]
mov byte [eax + 0x50], 0
mov eax, dword [ebp - 0x24]
xor edx, edx
mov dword [eax + 0x30], edx
xor eax, eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x24]
cmp dword [eax + 0x5c], 0x106
jae 0x409fe1
push ebp
mov edi, dword [ebp - 0x24]
mov eax, edi
call fcn.00408b5c
pop ecx
mov eax, dword [ebp - 0x24]
cmp dword [eax + 0x5c], 0
jne 0x409fe1
push ebp
mov eax, edi
mov dl, 1
call fcn.00409ba0
pop ecx
cmp dword [ebp - 0x3c], 0
je 0x40a144
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
push edx
push eax
mov eax, dword [ebp + 0x24]
xor edx, edx
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
jmp 0x40a144
mov eax, dword [ebp - 0x24]
cmp dword [eax + 0x5c], 3
jb 0x409ffb
lea ecx, [ebp - 0x28]
mov eax, dword [ebp - 0x24]
mov edx, dword [eax + 0x54]
mov eax, dword [ebp - 0x24]
call fcn.00409c74
cmp dword [ebp - 0x28], 0
je 0x40a02b
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x54]
sub eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov edx, dword [edx + 0x14]
sub edx, 0x106
cmp eax, edx
ja 0x40a02b
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
call fcn.00408964
mov edx, dword [ebp - 0x24]
mov dword [edx + 0x48], eax
mov eax, dword [ebp - 0x24]
mov esi, dword [eax + 0x48]
cmp esi, 3
jb 0x40a103
mov eax, dword [ebp - 0x24]
mov edx, dword [eax + 0x54]
mov eax, dword [ebp - 0x24]
sub edx, dword [eax + 0x58]
mov ecx, esi
sub ecx, 3
mov eax, dword [ebp - 0x24]
call fcn.00409be4
mov ebx, eax
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x48]
mov edx, dword [ebp - 0x24]
sub dword [edx + 0x5c], eax
mov eax, dword [ebp - 0x24]
cmp dword [eax + 0x48], 5
ja 0x40a0aa
mov eax, dword [ebp - 0x24]
cmp dword [eax + 0x5c], 3
jb 0x40a0aa
mov eax, dword [ebp - 0x24]
dec dword [eax + 0x48]
mov eax, dword [ebp - 0x24]
inc dword [eax + 0x54]
lea ecx, [ebp - 0x28]
mov eax, dword [ebp - 0x24]
mov edx, dword [eax + 0x54]
mov eax, dword [ebp - 0x24]
call fcn.00409c74
mov eax, dword [ebp - 0x24]
dec dword [eax + 0x48]
mov eax, dword [ebp - 0x24]
cmp dword [eax + 0x48], 0
jne 0x40a079
mov eax, dword [ebp - 0x24]
inc dword [eax + 0x54]
jmp 0x40a12b
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x48]
mov edx, dword [ebp - 0x24]
add dword [edx + 0x54], eax
mov eax, dword [ebp - 0x24]
xor edx, edx
mov dword [eax + 0x48], edx
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x54]
mov edx, dword [ebp - 0x24]
mov edx, dword [edx + 0x20]
movzx eax, byte [edx + eax]
mov edx, dword [ebp - 0x24]
mov dword [edx + 0x30], eax
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0x40]
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x30]
shl eax, cl
mov edx, dword [ebp - 0x24]
mov edx, dword [edx + 0x54]
mov ecx, dword [ebp - 0x24]
mov ecx, dword [ecx + 0x20]
movzx edx, byte [ecx + edx + 1]
xor eax, edx
mov edx, dword [ebp - 0x24]
and eax, dword [edx + 0x3c]
mov edx, dword [ebp - 0x24]
mov dword [edx + 0x30], eax
jmp 0x40a12b
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x54]
mov edx, dword [ebp - 0x24]
mov edx, dword [edx + 0x20]
movzx ecx, byte [edx + eax]
mov eax, dword [ebp - 0x24]
xor edx, edx
call fcn.00409be4
mov ebx, eax
mov eax, dword [ebp - 0x24]
dec dword [eax + 0x5c]
mov eax, dword [ebp - 0x24]
inc dword [eax + 0x54]
test bl, bl
je 0x409f8a
push ebp
mov eax, dword [ebp - 0x24]
xor edx, edx
call fcn.00409ba0
pop ecx
jmp 0x409f8a
push ebp
lea eax, [ebp - 0x50]
call fcn.00408798
pop ecx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x40a170
cmp dword [ebp - 8], 0
je 0x40a185
cmp dword [ebp + 0x20], 0
je 0x40a185
mov eax, dword [ebp + 0x20]
push eax
call sub.kernel32.dll_UnmapViewOfFile
cmp dword [ebp + 0x28], 0
je 0x40a19a
cmp dword [ebp + 0x1c], 0
je 0x40a19a
mov eax, dword [ebp + 0x1c]
push eax
call sub.kernel32.dll_UnmapViewOfFile
push 0x8000
push 0
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 4]
push eax
call sub.kernel32.dll_VirtualFree
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x2c]
call sub.rtl120.bpl__System__FreeMem_qqrpv
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x28]
call sub.rtl120.bpl__System__FreeMem_qqrpv
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x20]
call sub.rtl120.bpl__System__FreeMem_qqrpv
mov eax, dword [ebp - 0x24]
call sub.rtl120.bpl__System__FreeMem_qqrpv
cmp dword [ebp - 0xc], 0
je 0x40a1ec
push 0x8000
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_VirtualFree
cmp dword [ebp - 0x14], 0
je 0x40a202
push 0x8000
push 0
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_VirtualFree
cmp dword [ebp + 8], 0
je 0x40a20d
mov eax, dword [ebp + 8]
not dword [eax]
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24