Function at 0x529480
Capabilities:
Access peb ldr_data
Generate random numbers using the delphi lcg
Get process heap flags
Get process heap force flags

Disassembly:
push 0xffffffffffffffff
push 0x591428
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov eax, dword [0x61e69c]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov esi, ecx
xor ebp, ebp
push ebp
push 0xc
lea ecx, [esp + 0x24]
call fcn.00521dc0
mov eax, dword [esp + 0x38]
push eax
mov ecx, esi
mov dword [esp + 0x34], ebp
call fcn.005292e0
push ebp
call fcn.004f8fbf
push eax
call fcn.004f90b2
mov ecx, dword [esp + 0x28]
add esp, 8
mov dword [esp + 0x18], ecx
mov edi, edi
call fcn.004f90c4
mov ecx, eax
sar ecx, 6
mov byte [esp + 0x38], cl
test cl, cl
jne 0x5294f6
mov byte [esp + 0x38], al
mov eax, dword [esi + 0xc]
mov edi, dword [esi + 4]
and eax, 0xfffd
or eax, 2
mov ebx, eax
xor ebx, 1
imul ebx, eax
sar ebx, 8
call fcn.0052a950
movsx edx, byte [esp + 0x38]
xor edx, edi
and edx, 0xff
mov eax, dword [eax + edx*4]
shr edi, 8
xor eax, edi
mov edi, dword [esi + 0xc]
mov dword [esi + 4], eax
movzx eax, al
add eax, dword [esi + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 8], eax
shr eax, 0x18
mov byte [esp + 0x14], al
call fcn.0052a950
movsx ecx, byte [esp + 0x14]
xor bl, byte [esp + 0x38]
mov edx, dword [esp + 0x18]
xor ecx, edi
and ecx, 0xff
shr edi, 8
xor edi, dword [eax + ecx*4]
inc ebp
cmp ebp, 0xa
mov dword [esi + 0xc], edi
mov byte [edx + ebp - 1], bl
jl 0x5294e0
mov eax, dword [esp + 0x3c]
movzx ebp, word [eax + 0xc]
mov edi, dword [esi + 4]
shl ebp, 0x10
mov eax, ebp
sar eax, 0x10
mov byte [esp + 0x38], al
mov eax, dword [esi + 0xc]
and eax, 0xfffd
or eax, 2
mov ebx, eax
xor ebx, 1
imul ebx, eax
sar ebx, 8
call fcn.0052a950
movsx ecx, byte [esp + 0x38]
xor ecx, edi
and ecx, 0xff
mov eax, dword [eax + ecx*4]
shr edi, 8
xor eax, edi
mov edi, dword [esi + 0xc]
mov dword [esi + 4], eax
movzx eax, al
add eax, dword [esi + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 8], eax
shr eax, 0x18
mov byte [esp + 0x14], al
call fcn.0052a950
movsx edx, byte [esp + 0x14]
xor bl, byte [esp + 0x38]
xor edx, edi
and edx, 0xff
shr edi, 8
xor edi, dword [eax + edx*4]
mov eax, dword [esp + 0x18]
mov dword [esi + 0xc], edi
mov byte [eax + 0xa], bl
mov edi, dword [esi + 4]
mov eax, ebp
sar eax, 0x18
mov byte [esp + 0x38], al
mov eax, dword [esi + 0xc]
and eax, 0xfffd
or eax, 2
mov ebx, eax
xor ebx, 1
imul ebx, eax
sar ebx, 8
call fcn.0052a950
movsx ecx, byte [esp + 0x38]
xor ecx, edi
and ecx, 0xff
mov eax, dword [eax + ecx*4]
shr edi, 8
xor eax, edi
mov edi, dword [esi + 0xc]
mov dword [esi + 4], eax
movzx eax, al
add eax, dword [esi + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 8], eax
shr eax, 0x18
mov byte [esp + 0x14], al
call fcn.0052a950
movsx edx, byte [esp + 0x14]
mov ecx, dword [esp + 0x18]
xor edx, edi
and edx, 0xff
shr edi, 8
xor edi, dword [eax + edx*4]
mov al, byte [esp + 0x38]
xor al, bl
mov dword [esi + 0xc], edi
push 0
mov byte [ecx + 0xb], al
mov edx, dword [esp + 0x24]
push 0xc
mov ecx, dword [esp + 0x48]
push edx
call fcn.00526c60
mov eax, dword [esp + 0x3c]
add dword [eax + 0x14], 0xc
lea ecx, [esp + 0x1c]
mov dword [esp + 0x30], 0xffffffff
call fcn.00521df0
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc