Function at 0x406650
Capabilities:
Access peb ldr_data
Get ntdll base address
Get process heap flags
Get process heap force flags

Disassembly:
push 0xffffffffffffffff
push 0x44bc20
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebp
push esi
push edi
mov eax, dword [0x45f2c0]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov eax, dword [0x46126c]
mov edx, dword [eax + 0xc]
mov ecx, 0x46126c
mov dword [esp + 0x14], 1
call edx
add eax, 0x10
mov dword [esp + 0x10], eax
mov dword [esp + 0x30], 0
mov eax, dword [0x46126c]
mov edx, dword [eax + 0xc]
mov ecx, 0x46126c
call edx
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x30], 1
mov eax, dword [0x46126c]
mov edx, dword [eax + 0xc]
mov ecx, 0x46126c
call edx
lea ebp, [eax + 0x10]
mov dword [esp + 0x24], ebp
mov byte [esp + 0x30], 2
mov eax, dword [0x46126c]
mov edx, dword [eax + 0xc]
mov ecx, 0x46126c
call edx
lea esi, [eax + 0x10]
mov dword [esp + 0x18], esi
lea eax, [esp + 0x20]
push eax
mov byte [esp + 0x34], 3
call fcn.00409470
add esp, 4
lea edi, [esp + 0x10]
mov byte [esp + 0x30], 4
call fcn.00402100
mov byte [esp + 0x30], 3
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40672d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call fcn.004092a0
add esp, 4
cmp eax, 0xffffffff
je 0x406803
push eax
lea ecx, [esp + 0x24]
call fcn.00409320
add esp, 4
lea edi, [esp + 0x18]
mov byte [esp + 0x30], 5
call fcn.00402100
mov byte [esp + 0x30], 3
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406785
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x18]
mov ecx, dword [esi - 0xc]
test ecx, ecx
mov edi, dword [esp + 0x10]
je 0x406807
mov eax, dword [edi - 0xc]
cmp ecx, eax
jle 0x4067aa
push eax
push edi
push esi
call fcn.004334cf
add esp, 0xc
test eax, eax
je 0x406807
mov ecx, dword [esi - 0xc]
mov eax, dword [edi - 0xc]
cmp ecx, eax
jle 0x4067c3
push eax
push edi
push esi
call fcn.004334cf
add esp, 0xc
test eax, eax
je 0x406807
mov edx, dword [esp + 0x1c]
mov ecx, dword [esi - 0xc]
mov eax, dword [edx - 0xc]
cmp ecx, eax
jle 0x4067e0
push eax
push edx
push esi
call fcn.004334cf
add esp, 0xc
test eax, eax
je 0x406807
mov ecx, dword [esi - 0xc]
mov eax, dword [ebp - 0xc]
cmp ecx, eax
jle 0x4067f9
push eax
push ebp
push esi
call fcn.004334cf
add esp, 0xc
test eax, eax
je 0x406807
mov dword [esp + 0x14], 0
jmp 0x406807
mov edi, dword [esp + 0x10]
lea eax, [esi - 0x10]
mov byte [esp + 0x30], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406828
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
mov byte [esp + 0x30], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406849
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x30], 0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40686e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov dword [esp + 0x30], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406892
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
add esp, 0x24
ret