Function at 0x401000
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x44a2e8
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push esi
push edi
mov eax, dword [0x4590b0]
xor eax, esp
push eax
lea eax, [esp + 0x50]
mov dword fs:[0], eax
mov dword [esp + 0x1c], ecx
mov esi, dword [ecx + 0x14]
mov edi, dword [ecx + 0x18]
sub esi, dword [ecx + 0xc]
sub edi, dword [ecx + 0x10]
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov eax, dword [0x45c424]
mov edx, dword [eax + 0xc]
mov ecx, 0x45c424
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], edi
call edx
lea ebx, [eax + 0x10]
mov dword [esp + 0x18], ebx
push 0xf8
mov dword [esp + 0x5c], 0
call fcn.00401ac0
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x4010a2
lea eax, [esp + 0x18]
push eax
mov eax, 0xf8
call fcn.00401c40
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x58], 1
mov eax, dword [0x45d06c]
mov eax, dword [eax + 8]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
push 0xbcbdca
push eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x44], ecx
mov ecx, dword [ebx - 0xc]
push 0x820
push ecx
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], edi
mov edi, dword [ebp + 8]
push ebx
lea esi, [esp + 0x50]
mov dword [esp + 0x54], edx
call fcn.004019f0
mov edx, dword [0x45d06c]
xor esi, esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
mov eax, dword [edx + 8]
mov ecx, dword [ebx - 0xc]
lea edx, [esp + 0x24]
push edx
push ebx
call fcn.00401990
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
mov eax, dword [eax + 0x28]
add ecx, 2
mov dword [esp + 0x14], ecx
cmp eax, esi
je 0x40137d
push esi
push esi
push ecx
push edi
mov ebx, eax
call fcn.004018f0
mov esi, dword [esp + 0x1c]
mov edi, dword [esi + 0x28]
call fcn.004014e0
mov edx, dword [esi + 0x2c]
mov ecx, dword [esp + 0x14]
mov edi, dword [edi + 0x10]
mov ebx, dword [esi + 0x28]
inc edx
push edx
lea eax, [ecx + edi + 2]
push 0
push eax
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 8]
push eax
call fcn.004018f0
mov esi, dword [esi + 0x28]
mov edi, esi
call fcn.004014e0
mov ecx, dword [esp + 0x14]
mov esi, dword [esi + 0x10]
mov edx, dword [0x45c424]
mov eax, dword [edx + 0xc]
lea esi, [ecx + esi + 2]
mov ecx, 0x45c424
mov dword [esp + 0x14], esi
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x20], ebx
push 0xf9
mov byte [esp + 0x5c], 2
call fcn.00401ac0
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x4011b9
lea edx, [esp + 0x20]
push edx
mov eax, 0xf9
call fcn.00401c40
mov ebx, dword [esp + 0x20]
mov edi, dword [ebp + 8]
mov byte [esp + 0x58], 3
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x40], ecx
mov ecx, dword [0x45d06c]
push 0xbcbdca
mov dword [esp + 0x4c], eax
mov eax, dword [ecx + 8]
mov ecx, dword [ebx - 0xc]
push eax
mov eax, dword [ebp + 0xc]
push 0x820
push ecx
mov dword [esp + 0x4c], esi
push ebx
lea esi, [esp + 0x50]
mov dword [esp + 0x58], edx
call fcn.004019f0
mov edx, dword [0x45d06c]
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov eax, dword [edx + 8]
mov ecx, dword [ebx - 0xc]
lea edx, [esp + 0x24]
push edx
push ebx
call fcn.00401990
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x1c]
lea ecx, [ecx + eax + 2]
mov eax, dword [esi + 0x30]
cdq
mov ebx, 0xa
idiv ebx
mov ebx, dword [esi + 0x28]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], edx
test eax, eax
je 0x401259
inc eax
push eax
jmp 0x40125b
push 0
push 0
push ecx
push edi
call fcn.004018f0
mov edi, dword [esi + 0x28]
call fcn.004014e0
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov edi, dword [edi + 0x10]
mov ebx, dword [esi + 0x28]
inc ecx
push ecx
lea eax, [edx + edi + 2]
mov edx, dword [ebp + 8]
push 0
push eax
push edx
mov dword [esp + 0x24], eax
call fcn.004018f0
mov esi, dword [esi + 0x28]
mov edi, esi
call fcn.004014e0
mov esi, dword [esi + 0x10]
mov eax, dword [esp + 0x14]
mov edx, dword [0x45c424]
lea esi, [eax + esi + 2]
mov eax, dword [edx + 0xc]
mov ecx, 0x45c424
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x1c], ebx
push 0xfa
mov byte [esp + 0x5c], 4
call fcn.00401ac0
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x4012e7
lea edx, [esp + 0x1c]
push edx
mov eax, 0xfa
call fcn.00401c40
mov ebx, dword [esp + 0x1c]
mov edi, dword [ebp + 8]
mov byte [esp + 0x58], 3
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x40], ecx
mov ecx, dword [0x45d06c]
push 0xbcbdca
mov dword [esp + 0x4c], eax
mov eax, dword [ecx + 8]
mov ecx, dword [ebx - 0xc]
push eax
mov eax, dword [ebp + 0xc]
push 0x820
push ecx
mov dword [esp + 0x4c], esi
push ebx
lea esi, [esp + 0x50]
mov dword [esp + 0x58], edx
call fcn.004019f0
lea eax, [ebx - 0x10]
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401354
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x58], 1
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 0x401379
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [esp + 0x18]
lea eax, [ebx - 0x10]
mov dword [esp + 0x58], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4013a1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc