Function at 0x1008d7c0
Capabilities:
Check for peb ntglobalflag flag
Encode data using xor

Disassembly:
push 0xffffffffffffffff
push 0x1015e87f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x70
mov al, byte [0x1018c9bf]
push ebx
mov ecx, dword [0x1018c998]
push ebp
push esi
add al, 0x3b
push edi
push eax
mov eax, 0x2b2
mov dword [esp + 0x80], 0
cdq
idiv ecx
mov eax, 0x10d
mov esi, edx
cdq
idiv ecx
mov eax, dword [0x1018c994]
mov bl, byte [esi + eax]
mov cl, byte [edx + eax]
sub cl, bl
mov ebx, 0x53
add cl, bl
push ecx
push 0xb
push 6
push 6
call fcn.1008d090
imul byte [0x1018c9be]
mov dl, 0xad
add esp, 0xc
imul dl
push eax
call fcn.1008d090
lea eax, [esp + 0x30]
push eax
call fcn.10090e20
add esp, 0x10
mov eax, 0x4e
mov ebp, 0x4f
mov word [esp + 0x38], ax
mov word [esp + 0x40], ax
mov eax, 0x4b
mov ecx, 0x1d
mov word [esp + 0x42], ax
mov word [esp + 0x46], ax
mov word [esp + 0x52], ax
mov word [esp + 0x68], ax
mov edi, 0x48
mov edx, 0x46
mov esi, 0x47
mov eax, 0x4c
mov dword [esp + 0x88], 1
mov word [esp + 0x34], 0x1a
mov word [esp + 0x36], bp
mov word [esp + 0x3a], cx
mov word [esp + 0x3c], di
mov word [esp + 0x3e], di
mov word [esp + 0x44], bx
mov word [esp + 0x48], dx
mov word [esp + 0x4a], dx
mov word [esp + 0x4c], bp
mov word [esp + 0x4e], bx
mov word [esp + 0x50], 0x4a
mov word [esp + 0x54], 0x1f
mov word [esp + 0x56], di
mov word [esp + 0x58], bx
mov word [esp + 0x5a], si
mov word [esp + 0x5c], di
mov word [esp + 0x5e], 0x49
mov word [esp + 0x60], dx
mov word [esp + 0x62], bx
mov word [esp + 0x64], 0x1c
mov word [esp + 0x66], cx
mov word [esp + 0x6a], 0x1a
mov word [esp + 0x6c], si
mov word [esp + 0x6e], 0x1f
mov word [esp + 0x70], bp
mov word [esp + 0x72], di
mov word [esp + 0x74], ax
mov word [esp + 0x76], cx
mov word [esp + 0x7a], ax
mov al, byte [0x1019722c]
test al, 1
mov word [esp + 0x78], cx
mov ebx, 2
jne 0x1008d9a9
or al, 1
push 0x4a
mov byte [0x1019722c], al
call fcn.1013c2df
add esp, 4
mov dword [0x10197230], eax
xor esi, esi
mov bp, word [esp + esi + 0x34]
push 0x7e
mov ecx, ebp
and ecx, 0xffff
push ecx
mov ecx, 0x10197230
call fcn.100a8ee0
mov edx, dword [0x10197230]
add eax, 0x7e
xor eax, ebp
mov word [esi + edx], ax
add esi, ebx
cmp esi, edi
jb 0x1008d962
mov eax, dword [0x10197230]
push 0x1008dad0
mov word [eax + 0x48], 0
call fcn.1013c36b
add esp, 4
mov esi, dword [0x10197230]
mov cl, byte [esp + 0x90]
xor ebp, ebp
push esi
mov byte [esp + 0x18], cl
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ebp
call fcn.1013c2c2
add esp, 4
mov edi, eax
lea ecx, [esp + 0x14]
push 1
push edi
call fcn.1000c010
test al, al
je 0x1008d9fe
mov edx, dword [esp + 0x18]
push edi
push esi
push edx
call fcn.100017d0
mov eax, dword [esp + 0x24]
mov dword [esp + 0x28], edi
add esp, 0xc
mov word [eax + edi*2], bp
sub esp, 0x10
lea edx, [esp + 0x34]
mov ecx, esp
mov dword [esp + 0x20], esp
push ebx
push ebp
lea eax, [esp + 0x2c]
push edx
push eax
push ecx
mov byte [esp + 0xac], bl
call fcn.1008cce0
add esp, 0x14
mov esi, dword [esp + 0xa0]
mov byte [esp + 0x98], bl
push esi
call fcn.10023280
add esp, 0x14
mov dword [esp + 0x7c], 1
mov ecx, dword [esp + 0x18]
mov byte [esp + 0x88], 1
cmp ecx, ebp
je 0x1008da70
mov al, byte [ecx - 1]
test al, al
je 0x1008da64
cmp al, 0xff
je 0x1008da64
dec al
mov byte [ecx - 1], al
jmp 0x1008da70
lea eax, [ecx - 2]
push eax
call fcn.101307a0
add esp, 4
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
cmp ecx, ebp
mov byte [esp + 0x88], 0
je 0x1008daaa
mov al, byte [ecx - 1]
test al, al
je 0x1008da9e
cmp al, 0xff
je 0x1008da9e
dec al
mov byte [ecx - 1], al
jmp 0x1008daaa
add ecx, 0xfffffffe
push ecx
call fcn.101307a0
add esp, 4
mov ecx, dword [esp + 0x80]
mov eax, esi
pop edi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebp
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x7c
ret