Function at 0x524a46
Capabilities:
Check for peb beingdebugged flag

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov ebx, ecx
xor ecx, ecx
push edi
mov dword [ebp - 0x10], ecx
mov edi, ecx
mov dword [ebp - 4], ecx
mov esi, ecx
test eax, eax
je 0x524a6a
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
jmp 0x524a7f
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x14]
call fcn.00524da4
mov esi, eax
test esi, esi
js 0x524d06
cmp word [ebx], 0x5b
jne 0x524d01
lea eax, [ebx + 2]
push 0x5d
push eax
call dword [0x42a4d8]
pop ecx
pop ecx
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x524d01
sub eax, ebx
sar eax, 1
dec eax
add eax, eax
mov dword [ebp + 8], eax
add eax, 2
push eax
xor eax, eax
push eax
mov eax, dword fs:[0x30]
push dword [eax + 0x18]
call dword [0x42a510]
mov ecx, eax
mov dword [ebp - 8], ecx
test ecx, ecx
jne 0x524ad5
mov esi, 0xc000009a
jmp 0x524d06
push dword [ebp + 8]
lea eax, [ebx + 2]
push eax
push ecx
call fcn.0053855e
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 8]
mov ebx, dword [0x42a4e8]
xor edx, edx
mov word [eax + ecx], dx
mov eax, dword [ebp - 0x1c]
add eax, 2
push 0x401544
push ecx
mov dword [ebp + 8], eax
call ebx
add esp, 0x14
test eax, eax
jne 0x524b1a
push 0x14
mov dword [ebp - 0xc], 1
pop edx
xor ebx, ebx
jmp 0x524b87
push 0x401720
push dword [ebp - 8]
call ebx
pop ecx
pop ecx
test eax, eax
jne 0x524b52
mov edi, dword [ebp + 8]
push 8
pop eax
mov ecx, edi
mov dword [ebp - 0xc], eax
lea edx, [ecx + 2]
xor ebx, ebx
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x524b3a
sub ecx, edx
sar ecx, 1
lea edx, [ecx*2 + 0x22]
jmp 0x524b8a
mov ecx, dword [ebp - 8]
lea edx, [ebp - 4]
call fcn.005296fb
mov esi, eax
test esi, esi
js 0x524bce
mov ecx, dword [ebp - 4]
push 2
pop eax
mov dword [ebp - 0xc], eax
lea edx, [ecx + 2]
xor ebx, ebx
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x524b71
sub ecx, edx
sar ecx, 1
lea edx, [ecx*2 + 0x16]
mov edi, dword [ebp + 8]
mov ecx, edi
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x524b8f
sub ecx, edi
sar ecx, 1
lea ebx, [ecx*2 + 0x2e]
lea eax, [edx + 0x22]
add eax, ebx
push eax
mov dword [ebp - 0x1c], eax
xor eax, eax
push eax
mov eax, dword fs:[0x30]
push dword [eax + 0x18]
mov dword [ebp - 0x18], ebx
call dword [0x42a510]
mov edi, eax
test edi, edi
jne 0x524bf1
mov esi, 0xc000009a
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x524cd1
mov eax, dword fs:[0x30]
push ebx
xor ebx, ebx
push ebx
push dword [eax + 0x18]
call dword [fcn.0042a514]
jmp 0x524cd3
push dword [ebp - 0x1c]
xor eax, eax
push eax
push edi
call fcn.0053856a
mov edx, dword [ebp + 8]
add esp, 0xc
xor eax, eax
mov dword [edi + 0x14], eax
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x1c], eax
mov ecx, edx
mov dword [edi], 8
mov dword [edi + 0x18], 0x22
lea eax, [ecx + 2]
mov dword [edi + 0x36], ebx
mov dword [edi + 0x22], 3
mov dword [ebp - 0x14], eax
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x10]
jne 0x524c2d
sub ecx, dword [ebp - 0x14]
push edx
sar ecx, 1
lea eax, [ecx + 1]
push eax
lea eax, [edi + 0x3a]
push eax
call fcn.00537c9f
mov eax, dword [ebp - 0xc]
add esp, 0xc
mov dword [edi + ebx + 0x22], eax
mov ebx, dword [ebp - 4]
cmp eax, 2
jne 0x524c80
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x10]
jne 0x524c63
sub ecx, edx
sar ecx, 1
lea eax, [ecx + 1]
push ebx
push eax
mov eax, dword [ebp - 0x18]
add eax, 0x36
jmp 0x524cb4
cmp eax, 8
jne 0x524cbf
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x18]
lea eax, [ecx + 2]
mov dword [edi + edx + 0x36], 1
mov dword [ebp - 0x18], eax
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x10]
jne 0x524c99
sub ecx, dword [ebp - 0x18]
push dword [ebp + 8]
sar ecx, 1
lea eax, [ecx + 1]
push eax
lea eax, [edx + 0x42]
add eax, edi
push eax
call fcn.00537c9f
add esp, 0xc
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov dword [eax], edi
mov eax, dword [ebp - 0x1c]
mov dword [ecx], eax
jmp 0x524bd1
xor ebx, ebx
push dword [ebp - 8]
mov eax, dword fs:[0x30]
push ebx
push dword [eax + 0x18]
call dword [fcn.0042a514]
test esi, esi
jns 0x524d06
test edi, edi
je 0x524d06
mov eax, dword fs:[0x30]
push edi
push ebx
push dword [eax + 0x18]
call dword [fcn.0042a514]
jmp 0x524d06
mov esi, 0xc000000d
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0xc