Function at 0x52f6d4
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
mov ecx, 8
push 0
push 0
dec ecx
jne 0x52f6dc
xor eax, eax
push ebp
push 0x52f9a9
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.00530588
mov edx, dword [eax + 0x30]
lea eax, [ebp - 0x38]
mov ecx, 0x52f9b4
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, 0x52f9c4
call fcn.004069d4
lea eax, [ebp - 0x24]
call fcn.00406990
push eax
push 0x52f9d4
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 0x52f956
xor eax, eax
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x52f94f
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x28]
call fcn.00406990
push eax
push 0x52f9e4
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [eax]
call dword [eax]
cmp dword [ebp - 0x28], 0
je 0x52f7a1
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 0x52f917
mov eax, dword [ebp - 8]
dec eax
test eax, eax
jl 0x52f917
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 0x52f816
lea edx, [ebp - 0x40]
mov eax, dword [ebp - 4]
inc eax
call fcn.00409cfc
mov ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x3c]
mov edx, 0x52f9fc
call fcn.00404b88
mov edx, dword [ebp - 0x3c]
lea eax, [ebp - 0x14]
call fcn.0040511c
jmp 0x52f824
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 0x52f838
mov eax, dword [ebp - 0x30]
mov word [eax + 0x14], 0xcc
mov eax, dword [ebp - 0x30]
cmp word [eax + 0x14], 0x81
jne 0x52f84c
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 0x52f864
mov dword [ebp - 0x1c], 1
lea eax, [ebp - 0x18]
call fcn.00406990
push eax
mov eax, dword [0x598ed8]
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.00530588
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.0052fd0c
add eax, 0xc
mov edx, dword [ebp - 0x18]
call fcn.004069a8
inc dword [ebp - 4]
dec dword [ebp - 0x2c]
jne 0x52f7d5
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x52f956
cmp dword [ebp - 0xc], 0
je 0x52f939
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [0x59c02c]
push eax
mov eax, dword [eax]
call dword [eax + 0x14]
cmp dword [ebp - 0x10], 0
je 0x52f94e
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [0x59c02c]
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 0x52f9b0
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