Function at 0x405110
Capabilities:
Check for peb ntglobalflag flag

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x80
mov esi, esp
mov dword [esi + 0x68], ebp
mov dword [esi + 0x5c], ecx
mov edi, dword [ebp + 0x14]
mov dword [esi + 0x6c], esp
mov dword [esi + 0x78], 0xffffffff
lea eax, [esi + 0x70]
mov dword [esi + 0x74], 0x40d2d0
mov ecx, dword fs:[0]
mov dword [esi + 0x70], ecx
mov dword fs:[0], eax
xorpd xmm0, xmm0
movapd xmmword [esi + 0x30], xmm0
mov dword [esi + 0x40], 0
mov dword [esi + 0x44], 0xf
mov eax, 0x3000
and eax, dword [edi + 0x14]
cmp eax, 0x3000
jne 0x405182
mov dword [esi + 0x2c], 0xffffffff
mov ebx, 0xd
jmp 0x4051a7
mov ebx, dword [edi + 0x18]
mov ecx, dword [edi + 0x1c]
cmp ebx, 1
mov edx, ecx
sbb edx, 0
mov dword [esi + 0x2c], ebx
jge 0x4051a7
mov edx, ebx
mov ebx, 6
or ecx, edx
jne 0x4051a7
xor ebx, ebx
test eax, eax
sete bl
movsd xmm1, qword [ebp + 0x1c]
cmp eax, 0x2000
jne 0x405200
movapd xmm0, xmmword [0x42e280]
andpd xmm0, xmm1
ucomisd xmm0, qword [0x42e290]
jbe 0x405200
lea eax, [esi + 0x50]
mov dword [esp + 8], eax
movsd qword [esp], xmm1
call fcn.00415f83
fstp st(0)
movsd xmm1, qword [ebp + 0x1c]
mov eax, dword [esi + 0x50]
mov ecx, eax
neg ecx
cmovs ecx, eax
imul eax, ecx, 0x7597
shr eax, 5
mov ecx, 0xa7c5ac5
mul ecx
shr edx, 7
add ebx, edx
add ebx, 0x32
je 0x405235
cmp ebx, 0xf
jbe 0x40525a
mov dword [esi + 0x78], 1
movzx eax, byte [esi + 0x50]
mov byte [esp + 4], al
mov dword [esp + 8], ebx
mov dword [esp], ebx
mov dword [esp + 0xc], 0
lea ecx, [esi + 0x30]
call fcn.00407f30
sub esp, 0x10
jmp 0x405279
mov dword [esi + 0x40], ebx
mov byte [esi + ebx + 0x30], 0
mov ebx, dword [esi + 0x2c]
mov ecx, dword [edi + 0x14]
mov byte [esi + 0x54], 0x25
test cl, 0x20
je 0x405290
lea eax, [esi + 0x56]
mov byte [esi + 0x55], 0x2b
test cl, 0x10
jne 0x405298
jmp 0x40529c
mov dword [esi + 0x40], ebx
mov dword [esp + 8], ebx
lea eax, [esi + 0x30]
mov dword [esp], eax
mov dword [esp + 4], 0
call fcn.00412a60
mov byte [esi + ebx + 0x30], 0
mov edi, dword [ebp + 0x14]
mov ebx, dword [esi + 0x2c]
movsd xmm1, qword [ebp + 0x1c]
mov ecx, dword [edi + 0x14]
mov byte [esi + 0x54], 0x25
test cl, 0x20
jne 0x40524c
lea eax, [esi + 0x55]
test cl, 0x10
je 0x40529c
mov byte [eax], 0x23
inc eax
mov word [eax], 0x2a2e
mov edx, ecx
and edx, 0x3000
test cl, 4
jne 0x4052d1
cmp edx, 0x1000
je 0x4052f8
cmp edx, 0x2000
je 0x4052f4
cmp edx, 0x3000
jne 0x40530e
mov dword [esi + 0x78], 1
mov cl, 0x61
jmp 0x405322
cmp edx, 0x1000
je 0x405303
cmp edx, 0x2000
je 0x4052f4
cmp edx, 0x3000
jne 0x405319
mov dword [esi + 0x78], 1
mov cl, 0x41
jmp 0x405322
mov cl, 0x66
jmp 0x405322
mov dword [esi + 0x78], 1
mov cl, 0x65
jmp 0x405322
mov dword [esi + 0x78], 1
mov cl, 0x45
jmp 0x405322
mov dword [esi + 0x78], 1
mov cl, 0x67
jmp 0x405322
mov dword [esi + 0x78], 1
mov cl, 0x47
mov byte [eax + 2], cl
mov byte [eax + 3], 0
mov eax, dword [esi + 0x40]
cmp dword [esi + 0x44], 0x10
jb 0x405337
mov ecx, dword [esi + 0x30]
jmp 0x40533a
lea ecx, [esi + 0x30]
mov dword [esi + 0x78], 1
movsd qword [esp + 0x10], xmm1
mov dword [esp + 0xc], ebx
lea edx, [esi + 0x54]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.004066d0
mov ebx, dword [ebp + 8]
movzx ecx, word [ebp + 0x18]
lea edi, [ebp + 0xc]
cmp dword [esi + 0x44], 0x10
jb 0x405373
mov edx, dword [esi + 0x30]
jmp 0x405376
lea edx, [esi + 0x30]
movsd xmm0, qword [edi]
movsd qword [esi + 0x60], xmm0
movsd xmm0, qword [esi + 0x60]
movsd qword [esp + 8], xmm0
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], edx
movzx eax, cx
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x5c]
mov dword [esp], eax
mov dword [esp + 4], ebx
call fcn.004074d0
mov eax, dword [esi + 0x44]
cmp eax, 0x10
mov ebx, dword [ebp + 8]
jb 0x4053e8
mov ecx, dword [esi + 0x30]
lea edx, [eax + 1]
cmp edx, 0x1000
jb 0x4053dc
mov edi, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, edi
cmp ecx, 0x20
jae 0x4053fd
add eax, 0x24
mov edx, eax
mov ecx, edi
mov dword [esp + 4], edx
mov dword [esp], ecx
call fcn.0040d960
mov eax, dword [esi + 0x70]
mov dword fs:[0], eax
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 0x1c
mov dword [esi + 0x78], 0
call fcn.00415f17
nop dword [eax]
push ebp
sub esp, 0x20
lea esi, [ebp - 0x7c]
mov ebp, dword [esi + 0x68]
call fcn.00412444
nop
push ebp
sub esp, 0x20
lea esi, [ebp - 0x7c]
mov ebp, dword [esi + 0x68]
lea ecx, [esi + 0x30]
call fcn.004025a0
add esp, 0x20
pop ebp
ret