Function at 0x512a0c
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 0x512c1e
push dword fs:[eax]
mov dword fs:[eax], esp
xor esi, esi
xor edx, edx
mov eax, edi
call fcn.004140f8
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 0x512a73
sub ax, 3
je 0x512a7a
sub ax, 4
je 0x512a81
jmp 0x512a88
mov esi, 2
jmp 0x512a9d
mov esi, 0x10
jmp 0x512a9d
mov esi, 0x100
jmp 0x512a9d
lea edx, [ebp - 0x14]
mov eax, 0xeea5
call fcn.004095b4
mov eax, dword [ebp - 0x14]
call fcn.00510f48
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.00511c4c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 8]
test eax, eax
jne 0x512add
mov dl, 1
mov eax, dword [0x410984]
call fcn.00402fc0
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0xc]
mov dword [edx + 8], eax
jmp 0x512ae3
xor edx, edx
mov ecx, dword [eax]
call dword [ecx]
xor eax, eax
push ebp
push 0x512b1e
push dword fs:[eax]
mov dword fs:[eax], esp
push edi
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
push eax
push 0x514f50
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.00511ca0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x512b50
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov byte [eax + 0x15], 1
jmp 0x512b5f
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 0x512b5c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x20]
cmp dword [eax + 0xf], 0
jne 0x512bab
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 0x512bb2
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.00471730
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.00471730
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 0x512c25
lea eax, [ebp - 0x14]
call fcn.00403d3c
ret