Function at 0x51bfb0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x62211f
mov eax, dword fs:[0]
push eax
sub esp, 0xd0
push ebx
push esi
push edi
mov eax, dword [0x6c4490]
xor eax, esp
push eax
lea eax, [esp + 0xe0]
mov dword fs:[0], eax
mov dword [esp + 0x2c], edx
mov edi, ecx
mov dword [esp + 0x30], edi
mov esi, dword [edx + 8]
mov ecx, dword [edx + 0xc]
mov dword [esp + 0x70], 0
test esi, esi
je 0x51c00f
lea eax, [esi - 1]
lea eax, [ecx + eax*4]
cmp dword [eax], 0
jne 0x51c034
sub eax, 4
dec esi
jne 0x51c004
call fcn.00517850
push eax
mov ecx, edi
call fcn.00512370
mov eax, edi
mov ecx, dword [esp + 0xe0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x51c00f
lea ecx, [ecx + esi*4]
add ecx, 0xfffffffc
call fcn.004eab50
lea ecx, [esi - 1]
mov ebx, eax
shl ecx, 5
add ebx, ecx
je 0x51c00f
mov esi, dword [ebp + 0xc]
lea ecx, [esp + 0x74]
push esi
call fcn.00516b50
push esi
push dword [ebp + 8]
lea eax, [esp + 0x20]
mov dword [esp + 0xf0], 0
push eax
call fcn.004edb30
add esp, 0xc
push eax
lea eax, [esp + 0x4c]
mov byte [esp + 0xec], 1
push eax
lea ecx, [esp + 0x7c]
call fcn.004ee480
mov byte [esp + 0xe8], 3
xor eax, eax
mov edx, dword [esp + 0x20]
mov ecx, edx
mov esi, dword [esp + 0x24]
mov edi, esi
rep stosd dword es:[edi], eax
lea eax, [edx*4]
push esi
cmp eax, 0x10
jb 0x51c0bb
call fcn.00618fb8
jmp 0x51c0c0
call fcn.005e0396
add esp, 4
call fcn.00517850
push eax
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x7c]
call fcn.004ee480
lea eax, [esp + 0x48]
mov byte [esp + 0xe8], 4
push eax
lea ecx, [esp + 0x38]
call fcn.00512370
lea eax, [esp + 0x5c]
mov byte [esp + 0xe8], 5
push eax
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x7c]
call fcn.00516d50
push eax
lea ecx, [esp + 0x7c]
call fcn.00516610
push eax
lea ecx, [esp + 0x1c]
call fcn.00512370
mov byte [esp + 0xe8], 6
dec ebx
je 0x51c208
jmp 0x51c130
mov eax, dword [esp + 0x2c]
dec ebx
mov edx, ebx
shr edx, 5
cmp edx, dword [eax + 8]
jae 0x51c1a6
mov eax, dword [eax + 0xc]
mov ecx, ebx
and ecx, 0x1f
mov eax, dword [eax + edx*4]
shr eax, cl
and al, 1
je 0x51c1a6
lea eax, [esp + 0x48]
push eax
push ecx
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x84]
call fcn.00516cc0
add esp, 4
lea ecx, [esp + 0x78]
push eax
call fcn.00516610
push eax
lea ecx, [esp + 0x38]
call fcn.00512700
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x7c]
call fcn.00516d50
push eax
lea ecx, [esp + 0x7c]
call fcn.00516610
lea ecx, [esp + 0x18]
jmp 0x51c1fa
lea eax, [esp + 0x48]
push eax
push ecx
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x84]
call fcn.00516cc0
add esp, 4
lea ecx, [esp + 0x78]
push eax
call fcn.00516610
push eax
lea ecx, [esp + 0x1c]
call fcn.00512700
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x7c]
call fcn.00516d50
push eax
lea ecx, [esp + 0x7c]
call fcn.00516610
lea ecx, [esp + 0x34]
push eax
call fcn.00512700
test ebx, ebx
jne 0x51c130
mov ebx, dword [esp + 0x30]
lea eax, [esp + 0x34]
push eax
push ebx
lea ecx, [esp + 0x7c]
call fcn.00516dd0
mov edx, dword [esp + 0x20]
xor eax, eax
mov esi, dword [esp + 0x24]
mov ecx, edx
mov edi, esi
rep stosd dword es:[edi], eax
lea eax, [edx*4]
push esi
cmp eax, 0x10
jb 0x51c23f
call fcn.00618fb8
jmp 0x51c244
call fcn.005e0396
mov edx, dword [esp + 0x40]
xor eax, eax
mov esi, dword [esp + 0x44]
add esp, 4
mov edi, esi
mov ecx, edx
rep stosd dword es:[edi], eax
lea eax, [edx*4]
push esi
cmp eax, 0x10
jb 0x51c26b
call fcn.00618fb8
jmp 0x51c270
call fcn.005e0396
mov edx, dword [esp + 0x68]
xor eax, eax
mov esi, dword [esp + 0x6c]
add esp, 4
mov edi, esi
mov ecx, edx
rep stosd dword es:[edi], eax
lea eax, [edx*4]
push esi
cmp eax, 0x10
jb 0x51c297
call fcn.00618fb8
jmp 0x51c29c
call fcn.005e0396
mov edx, dword [esp + 0x54]
xor eax, eax
mov esi, dword [esp + 0x58]
add esp, 4
mov edi, esi
mov ecx, edx
rep stosd dword es:[edi], eax
lea eax, [edx*4]
push esi
cmp eax, 0x10
jb 0x51c2e5
call fcn.00618fb8
add esp, 4
lea ecx, [esp + 0x74]
call fcn.004ee740
mov eax, ebx
mov ecx, dword [esp + 0xe0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.005e0396
add esp, 4
lea ecx, [esp + 0x74]
call fcn.004ee740
mov eax, ebx
mov ecx, dword [esp + 0xe0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret