Function at 0x51fc30
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov edi, edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x51fe42
push dword fs:[eax]
mov dword fs:[eax], esp
xor esi, esi
xor edx, edx
mov eax, edi
call fcn.0041571c
mov eax, dword [edi + 4]
mov ebx, eax
add ebx, 0xe
mov edx, dword [ebx + 4]
mov dword [ebp - 8], edx
mov edx, dword [ebx + 8]
mov dword [ebp - 0xc], edx
mov edx, ebx
add edx, 0x28
mov dword [ebp - 0x10], edx
mov edx, dword [edi + 4]
add eax, dword [edx + 0xa]
mov edi, eax
mov ax, word [ebx + 0xe]
dec ax
je 0x51fc97
sub ax, 3
je 0x51fc9e
sub ax, 4
je 0x51fca5
jmp 0x51fcac
mov esi, 2
jmp 0x51fcc1
mov esi, 0x10
jmp 0x51fcc1
mov esi, pe_nt_image_headers32
jmp 0x51fcc1
lea edx, [ebp - 0x14]
mov eax, 0xeea5
call fcn.0040a580
mov eax, dword [ebp - 0x14]
call fcn.0051e16c
mov eax, dword [ebp - 4]
mov byte [eax + 0x1c], 0
mov eax, dword [ebp - 0x10]
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
add eax, 0x16
mov ecx, esi
call fcn.0051ee70
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 8]
test eax, eax
jne 0x51fd01
mov dl, 1
mov eax, dword [0x411f2c]
call fcn.004032d8
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0xc]
mov dword [edx + 8], eax
jmp 0x51fd07
xor edx, edx
mov ecx, dword [eax]
call dword [ecx]
xor eax, eax
push ebp
push 0x51fd42
push dword fs:[eax]
mov dword fs:[eax], esp
push edi
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
push eax
push 0x5221a8
mov eax, dword [ebp - 4]
mov cl, byte [eax + 0x1c]
mov edx, ebx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 8]
call fcn.0051eec4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x51fd74
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov byte [eax + 0x15], 1
jmp 0x51fd83
inc byte [eax + 0x15]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov cl, byte [eax + 0x15]
mov edx, 1
shl edx, cl
cmp edx, dword [eax + 0x16]
jl 0x51fd80
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x20]
cmp dword [eax + 0xf], 0
jne 0x51fdcf
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0xc]
lea esi, [edx + 0x16]
lea edi, [eax + 0xf]
mov ecx, 0xc1
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0xc]
mov dl, byte [edx + 0x15]
mov byte [eax + 0xd], dl
mov eax, dword [ebp - 4]
mov byte [eax + 0x27], 0
jmp 0x51fdd6
mov eax, dword [ebp - 4]
mov byte [eax + 0x27], 1
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0xc]
mov eax, dword [ebp - 8]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [ebx + 0x10], eax
mov edx, dword [ebx + 0xc]
mov eax, dword [ebp - 4]
add edx, dword [eax + 0x14]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
movzx eax, word [eax + 0x30]
call fcn.004c5b8c
mov edx, dword [ebp - 4]
mov esi, dword [edx + 4]
mov word [esi + 0x30], ax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov edx, dword [eax + 0x10]
mov eax, dword [ebp - 4]
add edx, dword [eax + 0x18]
movzx eax, word [esi + 0x32]
call fcn.004c5b8c
mov edx, dword [ebp - 4]
mov edx, dword [edx + 4]
mov word [edx + 0x32], ax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51fe49
lea eax, [ebp - 0x14]
call fcn.00404070
ret