Function at 0x505390
Capabilities:
Check for peb ntglobalflag flag

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x70
mov esi, esp
mov dword [esi + 0x58], ebp
mov edx, ecx
lea edi, [esi + 0x60]
mov dword [edi - 4], esp
xor ebx, ebx
dec ebx
mov dword [edi + 8], ebx
mov dword [edi + 4], 0x5062d0
mov eax, dword fs:[0]
mov dword [edi], eax
mov dword fs:[0], edi
lea ecx, [esi + 0x38]
mov dword [ecx], ebx
mov dword [ecx + 4], ebx
mov dword [esi + 0x14], edx
push edx
call fcn.004ed9ce
lea ecx, [esi + 0x40]
mov dword [ecx + 0x10], ebx
pcmpeqd xmm0, xmm0
movdqa xmmword [ecx], xmm0
mov dword [edi + 8], 0
call fcn.004ae9bc
mov ecx, dword [ebp + 0xc]
mov dword [esi + 0x68], 1
call fcn.004af144
push eax
push str.param_
push 0x737964
lea eax, [esi + 0x40]
push eax
call fcn.004af4fe
add esp, 0x10
mov ecx, dword [ebp + 8]
lea eax, [ecx + 4]
xor edx, edx
mov dword [ecx + 4], edx
mov dword [ecx + 8], edx
mov dword [ecx], eax
mov ecx, dword [esi + 0x14]
mov eax, dword [ecx + 0x30]
add ecx, 0x34
mov dword [esi + 0x14], ecx
cmp eax, dword [esi + 0x14]
je 0x5055e9
mov dword [esi + 0x24], eax
lea ecx, [eax + 0x10]
mov dword [esi + 0x68], 2
mov dword [esi + 0x18], ecx
push 1
call fcn.004aef38
test al, al
jne 0x5055b3
lea ecx, [esi + 0x40]
call fcn.004af144
mov ecx, dword [esi + 0x18]
push eax
call fcn.004af30a
test al, al
je 0x5055b3
xor eax, eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
lea eax, [esi + 0xc]
mov dword [esi + 8], eax
mov edx, dword [esi + 0x18]
mov dword [esi + 0x1c], edx
mov dword [esi + 0x68], 3
mov ecx, dword [ebp + 8]
lea eax, [esi + 0x20]
push eax
lea eax, [esi + 0x1c]
push eax
push 0x743f60
push edx
lea eax, [esi + 0x28]
push eax
call fcn.00505e90
mov ebx, dword [esi + 0x28]
lea edi, [ebx + 0x24]
lea eax, [ebx + 0x28]
mov dword [esi + 4], eax
mov ecx, edi
push dword [ebx + 0x28]
call fcn.00406bb2
mov eax, dword [esi + 8]
mov dword [ebx + 0x24], eax
mov eax, dword [esi + 0xc]
mov dword [ebx + 0x28], eax
mov ecx, dword [esi + 0x10]
mov dword [ebx + 0x2c], ecx
test ecx, ecx
je 0x5054ea
mov ecx, dword [esi + 4]
mov dword [eax + 8], ecx
lea eax, [esi + 0xc]
mov dword [esi + 8], eax
xor eax, eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
jmp 0x5054ef
mov ecx, dword [esi + 4]
mov dword [edi], ecx
lea ecx, [esi + 8]
push eax
call fcn.00406bb2
mov ecx, dword [esi + 0x24]
mov eax, dword [ecx + 0x24]
add ecx, 0x28
mov dword [esi + 0x30], ecx
cmp eax, dword [esi + 0x30]
je 0x5055b3
mov dword [esi + 4], eax
lea ecx, [eax + 0x10]
mov dword [esi + 0x68], 2
mov dword [esi + 0x34], ecx
push 1
call fcn.004aef38
test al, al
jne 0x50557d
mov edx, dword [esi + 0x18]
mov dword [esi + 0x28], edx
mov ecx, dword [ebp + 8]
lea eax, [esi + 0x1c]
push eax
lea eax, [esi + 0x28]
push eax
push 0x743f60
push edx
lea eax, [esi + 8]
push eax
call fcn.00505e90
mov ecx, dword [esi + 8]
add ecx, 0x24
mov edx, dword [esi + 0x34]
mov dword [esi + 0x28], edx
lea eax, [esi + 0x1c]
push eax
lea eax, [esi + 0x28]
push eax
push 0x743f60
push edx
lea eax, [esi + 8]
push eax
call fcn.00506014
mov eax, dword [esi + 4]
add eax, 0x24
mov ecx, dword [esi + 8]
add ecx, 0x24
push eax
call fcn.004af162
mov edx, dword [esi + 4]
mov ecx, dword [edx + 4]
test ecx, ecx
je 0x505594
mov eax, ecx
mov ecx, dword [ecx]
test ecx, ecx
jne 0x505587
jmp 0x505504
mov eax, dword [edx + 8]
cmp dword [eax], edx
je 0x505504
add edx, 8
mov ecx, dword [edx]
lea edx, [ecx + 8]
mov eax, dword [ecx + 8]
cmp dword [eax], ecx
jne 0x5055a2
jmp 0x505504
mov edx, dword [esi + 0x24]
mov ecx, dword [edx + 4]
test ecx, ecx
je 0x5055ca
mov eax, ecx
mov ecx, dword [ecx]
test ecx, ecx
jne 0x5055bd
jmp 0x505432
mov eax, dword [edx + 8]
cmp dword [eax], edx
je 0x505432
add edx, 8
mov ecx, dword [edx]
lea edx, [ecx + 8]
mov eax, dword [ecx + 8]
cmp dword [eax], ecx
jne 0x5055d8
jmp 0x505432
lea ecx, [esi + 0x40]
call fcn.004aeec0
lea ecx, [esi + 0x38]
call fcn.004ed9ee
mov eax, dword [esi + 0x60]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 8