Function at 0x52f410
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
mov ecx, 8
push 0
push 0
dec ecx
jne 0x52f418
xor eax, eax
push ebp
push 0x52f6e5
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x34]
call fcn.00406990
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
call fcn.005302c4
mov edx, dword [eax + 0x30]
lea eax, [ebp - 0x38]
mov ecx, 0x52f6f0
call fcn.004069d4
mov eax, dword [ebp - 0x38]
push eax
mov eax, dword [eax]
call dword [eax + 0xc]
call fcn.00406a9c
mov edx, dword [ebp - 0x34]
lea eax, [ebp - 0x20]
mov ecx, 0x52f700
call fcn.004069d4
lea eax, [ebp - 0x24]
call fcn.00406990
push eax
push 0x52f710
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [eax]
call dword [eax]
push 0
push 0
push 0
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [eax]
call dword [eax + 0x14]
cmp dword [ebp - 0x24], 0
je 0x52f692
xor eax, eax
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x52f68b
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x28]
call fcn.00406990
push eax
push 0x52f720
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [eax]
call dword [eax]
cmp dword [ebp - 0x28], 0
je 0x52f4dd
push 0
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [eax]
call dword [eax + 0xc]
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [eax]
call dword [eax + 0xc]
test eax, eax
jne 0x52f653
mov eax, dword [ebp - 8]
dec eax
test eax, eax
jl 0x52f653
inc eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], 0
mov eax, dword [ebp - 4]
lea eax, [eax + eax*2]
mov edx, dword [ebp - 0xc]
lea eax, [edx + eax*8]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
cmp dword [eax + 8], 0
jne 0x52f552
lea edx, [ebp - 0x40]
mov eax, dword [ebp - 4]
inc eax
call fcn.00409cec
mov ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x3c]
mov edx, 0x52f738
call fcn.00404b88
mov edx, dword [ebp - 0x3c]
lea eax, [ebp - 0x14]
call fcn.0040511c
jmp 0x52f560
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 0x30]
mov edx, dword [edx + 8]
call fcn.004050e0
mov eax, dword [ebp - 0x30]
cmp word [eax + 0x14], 0x80
jne 0x52f574
mov eax, dword [ebp - 0x30]
mov word [eax + 0x14], 0xcc
mov eax, dword [ebp - 0x30]
cmp word [eax + 0x14], 0x81
jne 0x52f588
mov eax, dword [ebp - 0x30]
mov word [eax + 0x14], 0xc8
mov eax, dword [ebp - 0x30]
mov eax, dword [eax]
and eax, 0xf
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x52f5a0
mov dword [ebp - 0x1c], 1
lea eax, [ebp - 0x18]
call fcn.00406990
push eax
mov eax, dword [0x597ed8]
push dword [eax + 0xc]
push dword [eax + 8]
push dword [eax + 4]
push dword [eax]
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 0x10]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x30]
movzx eax, word [eax + 0x14]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
call fcn.005302c4
mov eax, dword [eax + 0x30]
push eax
mov eax, dword [eax]
call dword [eax + 0x48]
call fcn.00406a9c
mov eax, dword [ebp - 0x30]
mov al, byte [eax + 0x16]
push eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [eax]
call dword [eax + 0x40]
call fcn.00406a9c
mov eax, dword [ebp - 4]
lea eax, [eax + eax*2]
mov edx, dword [ebp - 0xc]
mov al, byte [edx + eax*8 + 0x17]
push eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [eax]
call dword [eax + 0x48]
call fcn.00406a9c
mov eax, dword [ebp - 0x30]
mov eax, dword [eax]
and eax, 0xfffffff0
push eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [eax]
call dword [eax + 0x60]
call fcn.00406a9c
mov eax, dword [ebp + 8]
mov eax, dword [eax - 4]
call fcn.0052fa48
add eax, 0xc
mov edx, dword [ebp - 0x18]
call fcn.004069a8
inc dword [ebp - 4]
dec dword [ebp - 0x2c]
jne 0x52f511
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x52f692
cmp dword [ebp - 0xc], 0
je 0x52f675
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [0x59b02c]
push eax
mov eax, dword [eax]
call dword [eax + 0x14]
cmp dword [ebp - 0x10], 0
je 0x52f68a
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [0x59b02c]
push eax
mov eax, dword [eax]
call dword [eax + 0x14]
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x52f6ec
lea eax, [ebp - 0x40]
mov edx, 2
call fcn.0040488c
lea eax, [ebp - 0x38]
call fcn.00406990
lea eax, [ebp - 0x34]
call fcn.00406990
lea eax, [ebp - 0x28]
call fcn.00406990
lea eax, [ebp - 0x24]
call fcn.00406990
lea eax, [ebp - 0x20]
call fcn.00406990
lea eax, [ebp - 0x18]
call fcn.00406990
lea eax, [ebp - 0x14]
call fcn.00404fa0
ret