Function at 0x5248c0
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push 0xffffffffffffffff
push 0x56f2e6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x120
mov eax, dword [0x5bd5bc]
mov dl, byte [0x5bd5c2]
push ebx
push ebp
push esi
mov esi, ecx
mov cx, word [0x5bd5c0]
push edi
mov word [esp + 0x2c], cx
xor edi, edi
push 6
push 0x5bd5b4
lea ecx, [esp + 0x18]
mov dword [esp + 0x30], eax
mov byte [esp + 0x36], dl
mov dword [esp + 0x28], edi
call fcn.005318a0
mov al, byte [esp + 0x140]
lea ecx, [esp + 0x30]
cmp al, 1
push 2
setne al
lea edx, [esp + 0x2c]
add eax, 2
push ecx
push edx
lea ecx, [esi + 0x78]
mov dword [esp + 0x144], edi
mov byte [esp + 0x38], al
call fcn.0043cb50
mov ecx, eax
cmp cx, di
mov dword [esp + 0x14], ecx
jne 0x5249af
push edi
push 1
push ecx
mov ecx, esp
mov dword [esp + 0x30], esp
push 6
push 0x59b920
call fcn.005318a0
push ecx
mov byte [esp + 0x148], 1
mov ecx, esp
mov dword [esp + 0x2c], esp
push 6
push 0x59b918
call fcn.005318a0
mov ecx, 0x5c6628
mov byte [esp + 0x148], 0
call fcn.00533b90
lea ecx, [esp + 0x10]
mov dword [esp + 0x138], 0xffffffff
call fcn.00531940
or ax, 0xffff
jmp 0x524db2
mov esi, dword [esp + 0x144]
mov ebp, dword [esi + 8]
mov edi, dword [esi + 4]
cmp ebp, ebp
mov ebx, ebp
je 0x5249e4
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push ebx
call fcn.00531810
mov ecx, edi
call fcn.005319b0
add ebx, 4
add edi, 4
cmp ebx, ebp
jne 0x5249c2
mov ecx, dword [esp + 0x14]
mov ebp, dword [esi + 8]
mov ebx, edi
cmp edi, ebp
je 0x5249ff
mov ecx, ebx
call fcn.00531940
add ebx, 4
cmp ebx, ebp
jne 0x5249ed
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x140]
mov dword [esi + 8], edi
and eax, 0xff
sub eax, 0
je 0x524b47
dec eax
jne 0x524d7c
mov edx, 4
cmp cx, dx
mov dword [esp + 0x1c], edx
jle 0x524abe
cmp dx, 6
jg 0x524abe
movsx ebp, dx
mov al, byte [esp + ebp + 0x30]
test al, al
je 0x524ab0
xor ebx, ebx
xor edi, edi
mov al, byte [esp + ebp + 0x30]
mov cl, bl
shr al, cl
test al, 1
je 0x524aa4
mov al, byte [edi + ebp*8 + 0x582028]
test al, al
mov byte [esp + 0x18], al
je 0x524aa4
push 0
push 4
lea ecx, [esp + 0x18]
call fcn.00531ad0
mov ecx, dword [esp + 0x18]
push ecx
push 5
lea ecx, [esp + 0x18]
call fcn.00531ad0
push 0
push 1
lea ecx, [esp + 0x18]
call fcn.00531ad0
mov eax, dword [esi + 8]
lea edx, [esp + 0x10]
push edx
push 1
push eax
mov ecx, esi
call fcn.00404e90
mov edx, dword [esp + 0x1c]
inc ebx
inc edi
cmp bx, 8
jl 0x524a49
mov ecx, dword [esp + 0x14]
inc edx
cmp dx, cx
mov dword [esp + 0x1c], edx
jl 0x524a30
lea edi, [esp + 0x37]
mov ebx, 5
mov al, byte [edi]
cmp al, 1
jb 0x524b3c
cmp al, 0x17
ja 0x524b3c
and eax, 0xff
lea ecx, [eax - 1]
mov eax, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
and ecx, 0x80000007
jns 0x524af1
dec ecx
or ecx, 0xfffffff8
inc ecx
mov al, byte [ecx + eax*8 + 0x582048]
test al, al
mov byte [esp + 0x18], al
je 0x524b3c
push 0
push 4
lea ecx, [esp + 0x18]
call fcn.00531ad0
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x10]
push eax
push 5
call fcn.00531ad0
push 1
push 1
lea ecx, [esp + 0x18]
call fcn.00531ad0
mov eax, dword [esi + 8]
lea ecx, [esp + 0x10]
push ecx
push 1
push eax
mov ecx, esi
call fcn.00404e90
add edi, 3
dec ebx
jne 0x524ac7
jmp 0x524d7c
cmp cx, 0x21
jle 0x524bbb
mov al, byte [esp + 0x50]
test al, al
je 0x524bbb
xor ebx, ebx
mov edi, 0x582060
mov dl, byte [esp + 0x50]
mov cl, bl
shr dl, cl
test dl, 1
je 0x524baf
mov al, byte [edi]
test al, al
mov byte [esp + 0x18], al
je 0x524baf
push 1
push 4
lea ecx, [esp + 0x18]
call fcn.00531ad0
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x10]
push eax
push 5
call fcn.00531ad0
push 2
push 1
lea ecx, [esp + 0x18]
call fcn.00531ad0
mov eax, dword [esi + 8]
lea ecx, [esp + 0x10]
push ecx
push 1
push eax
mov ecx, esi
call fcn.00404e90
inc ebx
inc edi
cmp bx, 8
jl 0x524b5c
mov ecx, dword [esp + 0x14]
cmp cx, 0x22
jle 0x524d7c
mov al, byte [esp + 0x51]
test al, al
je 0x524d7c
xor ebx, ebx
mov dword [esp + 0x14], 0x582060
mov dword [esp + 0x1c], ebx
mov dl, byte [esp + 0x51]
mov cl, bl
shr dl, cl
test dl, 1
je 0x524d64
mov eax, dword [esp + 0x14]
mov al, byte [eax]
test al, al
mov byte [esp + 0x18], al
je 0x524d64
mov ebp, 4
push 1
push ebp
lea ecx, [esp + 0x18]
call fcn.00531ad0
mov ecx, dword [esp + 0x18]
push ecx
push 5
lea ecx, [esp + 0x18]
call fcn.00531ad0
push 1
push 1
lea ecx, [esp + 0x18]
call fcn.00531ad0
mov eax, dword [esi + 8]
mov edx, dword [esi + 0xc]
sub edx, eax
mov edi, eax
sar edx, 2
cmp edx, 1
jae 0x524ce8
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x524c59
sub eax, ecx
sar eax, 2
cmp eax, 1
mov ebx, eax
ja 0x524c5e
mov ebx, 1
mov ecx, esi
call fcn.0040a310
add eax, ebx
mov dword [esp + 0x24], eax
jns 0x524c6f
xor eax, eax
shl eax, 2
push eax
call fcn.00556a96
mov ecx, dword [esi + 4]
add esp, 4
mov ebp, eax
push ebp
push edi
push ecx
mov ecx, esi
call fcn.004052e0
lea edx, [esp + 0x10]
mov ebx, eax
push edx
push 1
push ebx
mov ecx, esi
call fcn.00405320
mov eax, dword [esi + 8]
add ebx, 4
push ebx
push eax
push edi
mov ecx, esi
call fcn.004052e0
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
push ecx
push edx
mov ecx, esi
call fcn.00404c00
mov eax, dword [esi + 4]
push eax
call fcn.00556360
mov eax, dword [esp + 0x28]
add esp, 4
lea ecx, [ebp + eax*4]
mov dword [esi + 0xc], ecx
mov ecx, esi
call fcn.0040a310
mov ebx, dword [esp + 0x1c]
lea edx, [ebp + eax*4 + 4]
mov dword [esi + 8], edx
mov dword [esi + 4], ebp
jmp 0x524d64
mov ecx, eax
sub ecx, edi
sar ecx, 2
cmp ecx, 1
jae 0x524d34
lea edx, [edi + 4]
mov ecx, esi
push edx
push eax
push edi
call fcn.004052e0
mov eax, dword [esi + 8]
lea ecx, [esp + 0x10]
mov edx, eax
push ecx
sub edx, edi
mov ecx, 1
sar edx, 2
sub ecx, edx
push ecx
push eax
mov ecx, esi
call fcn.00405320
mov eax, dword [esi + 8]
lea edx, [esp + 0x10]
push edx
push eax
push edi
call fcn.00405390
add esp, 0xc
jmp 0x524d61
push eax
push eax
add eax, 0xfffffffc
mov ecx, esi
push eax
call fcn.004052e0
mov eax, dword [esi + 8]
push eax
add eax, 0xfffffffc
push eax
push edi
call fcn.004053d0
lea ecx, [esp + 0x1c]
lea edx, [edi + 4]
push ecx
push edx
push edi
call fcn.00405390
add esp, 0x18
add dword [esi + 8], ebp
mov ecx, dword [esp + 0x14]
inc ebx
inc ecx
cmp bx, 8
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], ecx
jl 0x524bdf
test esi, esi
je 0x524d99
mov eax, dword [esi + 4]
test eax, eax
jne 0x524d8d
mov dword [esp + 0x20], eax
jmp 0x524d99
mov esi, dword [esi + 8]
sub esi, eax
sar esi, 2
mov dword [esp + 0x20], esi
lea ecx, [esp + 0x10]
mov dword [esp + 0x138], 0xffffffff
call fcn.00531940
mov ax, word [esp + 0x20]
mov ecx, dword [esp + 0x130]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x12c
ret 8