Function at 0x41d1cd
Capabilities:
Check for peb ntglobalflag flag

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x49d4e8
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x4c3360]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push esi
push edi
mov eax, dword [0x4c3360]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x18]
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0x20]
mov dword [esp + 0x38], eax
lea eax, [esp + 0x3c]
push eax
mov dword [esp + 0x28], ecx
call fcn.00418ab7
and dword [esp + 0x88], 0
push eax
call fcn.0041e481
or dword [esp + 0x8c], 0xffffffff
pop ecx
mov ebx, eax
lea ecx, [esp + 0x3c]
mov dword [esp + 0x30], ebx
call fcn.00418187
lea eax, [esp + 0x5c]
push eax
mov ecx, ebx
call fcn.0041dce3
mov dword [esp + 0x88], 1
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 8]
movzx eax, ax
xor ebx, ebx
push ebx
lea ecx, [esp + 0x44]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x5c], 0xf
call fcn.0040527a
lea eax, [edi + 8]
push eax
push ebx
push 0x30
mov byte [esp + 0x94], 2
call fcn.004181f3
movzx eax, ax
mov dword [esp + 0x2c], eax
mov al, byte [esi]
add esp, 0xc
cmp al, 0x2b
je 0x41d2b0
mov dword [esp + 0x2c], ebx
cmp al, 0x2d
jne 0x41d2b8
mov dword [esp + 0x2c], 1
call fcn.0045186d
mov eax, dword [eax]
push dword [ebp + 0x30]
mov al, byte [eax]
push 0x65
push esi
mov byte [esp + 0x20], al
mov byte [esp + 0x21], 0x65
mov byte [esp + 0x22], 0
call fcn.004517c0
push dword [ebp + 0x30]
mov dword [esp + 0x20], eax
movsx eax, byte [esp + 0x24]
push eax
push esi
call fcn.004517c0
add esp, 0x18
mov dword [esp + 0x18], eax
cmp eax, ebx
jne 0x41d2fb
mov dword [ebp + 0x2c], ebx
cmp dword [esp + 0x74], 0x10
mov eax, dword [esp + 0x60]
jae 0x41d30a
lea eax, [esp + 0x60]
cmp byte [eax], 0x7f
je 0x41d435
cmp dword [esp + 0x74], 0x10
mov eax, dword [esp + 0x60]
jae 0x41d322
lea eax, [esp + 0x60]
cmp byte [eax], 0
jle 0x41d435
push dword [ebp + 0x30]
lea ecx, [esp + 0x44]
push esi
call fcn.00415d87
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x41d350
push 0x30
push dword [ebp + 0x2c]
lea ecx, [esp + 0x48]
call fcn.0041c2b5
jmp 0x41d37c
cmp dword [esp + 0x18], ebx
jne 0x41d36b
push 0x30
push dword [ebp + 0x24]
lea ecx, [esp + 0x48]
call fcn.0041c2b5
mov eax, dword [esp + 0x10]
mov dword [ebp + 0x24], ebx
push 0x30
push dword [ebp + 0x2c]
sub eax, esi
push eax
lea ecx, [esp + 0x4c]
call fcn.0041dab0
mov eax, dword [esp + 0x18]
push 0x30
lea ecx, [esp + 0x44]
cmp eax, ebx
jne 0x41d394
push dword [ebp + 0x24]
call fcn.0041c2b5
jmp 0x41d3b9
push dword [ebp + 0x28]
sub eax, esi
mov dword [esp + 0x20], eax
inc eax
push eax
call fcn.0041dab0
push 0x30
push dword [ebp + 0x24]
lea ecx, [esp + 0x48]
push dword [esp + 0x20]
call fcn.0041dab0
mov dword [ebp + 0x28], ebx
cmp dword [esp + 0x74], 0x10
mov esi, dword [esp + 0x60]
mov dword [ebp + 0x24], ebx
jae 0x41d3cb
lea esi, [esp + 0x60]
lea eax, [esp + 0x14]
push eax
push ebx
lea ecx, [esp + 0x48]
call fcn.0041acac
push eax
call fcn.00452d70
pop ecx
pop ecx
mov dword [esp + 0x10], eax
jmp 0x41d419
test al, al
jle 0x41d41f
mov ecx, dword [esp + 0x10]
sub ecx, dword [esp + 0x2c]
movsx eax, al
cmp eax, ecx
jae 0x41d41f
sub dword [esp + 0x10], eax
push ebx
push 1
push dword [esp + 0x18]
lea ecx, [esp + 0x4c]
call fcn.0041dab0
lea eax, [esi + 1]
cmp byte [eax], 0
jle 0x41d419
mov esi, eax
mov al, byte [esi]
cmp al, 0x7f
jne 0x41d3e8
push ebx
lea ecx, [esp + 0x44]
call fcn.0041acac
mov esi, eax
mov eax, dword [esp + 0x54]
mov dword [ebp + 0x2c], ebx
mov dword [ebp + 0x30], eax
mov ecx, dword [ebp + 0x28]
mov eax, dword [ebp + 0x24]
mov edx, dword [esp + 0x24]
add eax, ecx
add eax, dword [ebp + 0x2c]
mov ecx, dword [edx + 0x18]
add eax, dword [ebp + 0x30]
cmp ecx, ebx
jle 0x41d45a
cmp ecx, eax
jbe 0x41d45a
sub ecx, eax
mov dword [esp + 0x10], ecx
jmp 0x41d45e
mov dword [esp + 0x10], ebx
mov eax, dword [edx + 0x10]
and eax, 0x1c0
cmp eax, 0x40
je 0x41d4c8
cmp eax, 0x100
jne 0x41d49e
cmp dword [esp + 0x2c], ebx
jbe 0x41d49e
push 1
push esi
push dword [ebp + 0x14]
lea eax, [esp + 0x24]
push dword [ebp + 0x10]
push eax
push edi
call fcn.0041dbd9
mov ecx, dword [eax]
add esp, 0x18
mov dword [ebp + 0x10], ecx
mov eax, dword [eax + 4]
inc esi
dec dword [ebp + 0x30]
mov dword [ebp + 0x14], eax
push dword [esp + 0x10]
lea eax, [esp + 0x1c]
push dword [ebp + 0x1c]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
push edi
call fcn.0041d9cf
mov ecx, dword [eax]
mov dword [ebp + 0x10], ecx
mov eax, dword [eax + 4]
mov dword [esp + 0x28], ebx
mov dword [ebp + 0x14], eax
add esp, 0x18
movsx eax, byte [esp + 0x14]
push dword [ebp + 0x30]
push eax
push esi
call fcn.004517c0
add esp, 0xc
cmp eax, ebx
je 0x41d588
push dword [esp + 0x28]
sub eax, esi
inc eax
mov ebx, eax
lea eax, [ebx - 1]
push eax
push esi
push dword [ebp + 0x14]
lea eax, [esp + 0x28]
push dword [ebp + 0x10]
push eax
push edi
call fcn.0041dc24
mov ecx, dword [eax]
push dword [ebp + 0x24]
mov dword [ebp + 0x10], ecx
push dword [esp + 0x40]
mov ecx, dword [eax + 4]
mov dword [ebp + 0x14], ecx
push dword [eax + 4]
push dword [eax]
lea eax, [esp + 0x44]
push eax
push edi
call fcn.0041d9cf
mov ecx, dword [eax]
mov dword [ebp + 0x10], ecx
mov eax, dword [eax + 4]
mov ecx, dword [esp + 0x64]
mov dword [ebp + 0x14], eax
mov eax, dword [ecx]
add esp, 0x34
call dword [eax + 4]
movzx eax, ax
push 1
push eax
push dword [ebp + 0x14]
lea eax, [esp + 0x3c]
push dword [ebp + 0x10]
push eax
push edi
call fcn.0041d9cf
mov ecx, dword [eax]
push dword [ebp + 0x28]
mov dword [ebp + 0x10], ecx
push dword [esp + 0x3c]
mov ecx, dword [eax + 4]
mov dword [ebp + 0x14], ecx
push dword [eax + 4]
push dword [eax]
lea eax, [esp + 0x58]
push eax
push edi
call fcn.0041d9cf
mov ecx, dword [eax]
sub dword [ebp + 0x30], ebx
mov dword [ebp + 0x10], ecx
mov eax, dword [eax + 4]
add esp, 0x30
add esi, ebx
mov dword [ebp + 0x14], eax
xor ebx, ebx
push dword [ebp + 0x30]
push 0x65
push esi
call fcn.004517c0
add esp, 0xc
cmp eax, ebx
je 0x41d62d
push dword [esp + 0x28]
sub eax, esi
inc eax
mov ebx, eax
lea eax, [ebx - 1]
push eax
push esi
push dword [ebp + 0x14]
lea eax, [esp + 0x40]
push dword [ebp + 0x10]
push eax
push edi
call fcn.0041dc24
mov ecx, dword [eax]
push dword [ebp + 0x2c]
mov dword [ebp + 0x10], ecx
push dword [esp + 0x40]
mov ecx, dword [eax + 4]
mov dword [ebp + 0x14], ecx
push dword [eax + 4]
push dword [eax]
lea eax, [esp + 0x5c]
push eax
push edi
call fcn.0041d9cf
mov ecx, dword [eax]
and dword [ebp + 0x2c], 0
mov dword [ebp + 0x10], ecx
mov ecx, dword [eax + 4]
mov dword [ebp + 0x14], ecx
mov ecx, dword [esp + 0x58]
add esp, 0x34
test byte [ecx + 0x10], 4
mov ecx, 0x4b0760
jne 0x41d605
mov ecx, 0x4b0764
push 1
push ecx
push dword [eax + 4]
push dword [eax]
lea eax, [esp + 0x40]
push eax
push edi
call fcn.0041dbd9
mov ecx, dword [eax]
sub dword [ebp + 0x30], ebx
mov dword [ebp + 0x10], ecx
mov eax, dword [eax + 4]
add esp, 0x18
add esi, ebx
mov dword [ebp + 0x14], eax
xor ebx, ebx
push dword [esp + 0x28]
lea eax, [esp + 0x34]
push dword [ebp + 0x30]
push esi
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
push edi
call fcn.0041dc24
mov ecx, dword [eax]
push dword [ebp + 0x2c]
mov dword [ebp + 0x10], ecx
push dword [esp + 0x40]
mov ecx, dword [eax + 4]
mov dword [ebp + 0x14], ecx
push dword [eax + 4]
push dword [eax]
lea eax, [esp + 0x44]
push eax
push edi
call fcn.0041d9cf
mov ecx, dword [eax]
push dword [esp + 0x44]
mov edx, dword [esp + 0x5c]
push dword [ebp + 0x1c]
mov dword [ebp + 0x10], ecx
mov eax, dword [eax + 4]
push eax
push ecx
push dword [esp + 0x7c]
mov dword [ebp + 0x14], eax
push edi
mov dword [edx + 0x18], ebx
call fcn.0041d9cf
add esp, 0x4c
push ebx
push 1
lea ecx, [esp + 0x48]
call fcn.004050f1
push ebx
push 1
lea ecx, [esp + 0x64]
call fcn.004050f1
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0044fc8e
mov esp, ebp
pop ebp
ret