Function at 0x405870
Capabilities:
Check for peb ntglobalflag flag

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x541e70
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x583f80]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push esi
push edi
mov eax, dword [0x583f80]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov ecx, dword [ebp + 0x30]
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 0x18]
mov edi, dword [ebp + 0x20]
mov dword [esp + 0x38], eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x30], ecx
test ecx, ecx
je 0x4058d7
mov al, byte [edi]
cmp al, 0x2b
je 0x4058d0
cmp al, 0x2d
jne 0x4058d7
mov ebx, 1
jmp 0x4058d9
xor ebx, ebx
mov eax, dword [esi + 0x14]
and eax, 0x3000
cmp eax, 0x3000
je 0x4058ef
mov edx, 0x567180
jmp 0x405911
lea eax, [ebx + 2]
mov edx, 0x567184
cmp eax, ecx
ja 0x405911
cmp byte [edi + ebx], 0x30
jne 0x405911
mov cl, byte [edi + ebx + 1]
cmp cl, 0x78
je 0x40590f
cmp cl, 0x58
jne 0x405911
mov ebx, eax
push edx
push edi
call fcn.00502840
mov dword [esp + 0x34], eax
mov eax, 0x2e
mov word [esp + 0x44], ax
call fcn.00501860
mov eax, dword [eax]
mov al, byte [eax]
mov byte [esp + 0x44], al
lea eax, [esp + 0x44]
push eax
push edi
call fcn.00502840
add esp, 0x10
mov dword [esp + 0x34], eax
lea eax, [esp + 0x24]
push eax
mov ecx, esi
call fcn.00403430
push eax
mov dword [esp + 0x8c], 0
call fcn.004064d0
mov dword [esp + 0x8c], 0xffffffff
mov ecx, dword [esp + 0x28]
add esp, 4
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x405998
mov eax, dword [ecx]
call dword [eax + 8]
mov esi, eax
test esi, esi
je 0x405998
mov eax, dword [esi]
push 0
mov ecx, esi
call dword [eax]
push esi
call fcn.004fd170
add esp, 4
mov ecx, dword [esp + 0x18]
push 0x30
mov eax, dword [ecx]
mov eax, dword [eax + 0x20]
call eax
mov esi, dword [esp + 0x30]
push 0
push esi
lea ecx, [esp + 0x48]
mov byte [esp + 0x18], al
call fcn.004052e0
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x88], 1
cmp dword [esp + 0x58], 0x10
mov edx, dword [ecx]
lea eax, [esp + 0x44]
cmovae eax, dword [esp + 0x44]
push eax
lea eax, [esi + edi]
push eax
push edi
call dword [edx + 0x1c]
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x24]
push eax
call fcn.00403430
push eax
mov byte [esp + 0x8c], 2
call fcn.00406770
mov byte [esp + 0x8c], 1
mov ecx, dword [esp + 0x28]
add esp, 4
mov edi, eax
mov dword [esp + 0x18], edi
test ecx, ecx
je 0x405a32
mov eax, dword [ecx]
call dword [eax + 8]
mov esi, eax
test esi, esi
je 0x405a32
mov eax, dword [esi]
push 0
mov ecx, esi
call dword [eax]
push esi
call fcn.004fd170
add esp, 4
lea eax, [esp + 0x5c]
push eax
mov ecx, edi
call fcn.00406350
mov byte [esp + 0x88], 3
mov eax, dword [edi]
mov ecx, edi
mov eax, dword [eax + 0x10]
call eax
mov esi, dword [esp + 0x34]
mov ecx, dword [esp + 0x2c]
push dword [esp + 0x10]
mov byte [esp + 0x20], al
cmp esi, dword [esp + 0x34]
jne 0x405a6f
mov eax, dword [ebp + 0x24]
push eax
lea edi, [ecx + eax]
push ecx
jmp 0x405ade
push dword [ebp + 0x2c]
mov edi, dword [ebp + 0x24]
push ecx
lea ecx, [esp + 0x4c]
add edi, esi
call fcn.004053b0
push dword [esp + 0x10]
lea eax, [esi + 1]
push dword [ebp + 0x28]
lea ecx, [esp + 0x48]
push eax
call fcn.004053b0
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
mov byte [esp + 0x17], al
cmp dword [esp + 0x54], esi
jae 0x405ac1
push 0x67e
push str.D:Program_Files__x86_Microsoft_Visual_Studio_11.0VCincludexstring
push str.string_subscript_out_of_range
call fcn.0053d770
add esp, 0xc
cmp dword [esp + 0x58], 0x10
push dword [esp + 0x10]
mov cl, byte [esp + 0x1b]
push dword [ebp + 0x24]
lea eax, [esp + 0x4c]
cmovae eax, dword [esp + 0x4c]
push esi
mov byte [eax + esi], cl
lea ecx, [esp + 0x4c]
call fcn.004053b0
cmp dword [esp + 0x74], 0x10
lea esi, [esp + 0x60]
cmovae esi, dword [esp + 0x60]
mov al, byte [esi]
cmp al, 0x7f
je 0x405b31
jmp 0x405b00
test al, al
jle 0x405b31
movsx ecx, al
mov eax, edi
sub eax, ebx
cmp ecx, eax
jae 0x405b31
push dword [esp + 0x1c]
sub edi, ecx
push 1
push edi
lea ecx, [esp + 0x4c]
call fcn.004053b0
cmp byte [esi + 1], 0
lea eax, [esi + 1]
cmovg esi, eax
mov al, byte [esi]
cmp al, 0x7f
jne 0x405b00
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x54]
mov eax, dword [edi + 0x24]
mov esi, dword [edi + 0x20]
mov dword [esp + 0x10], ecx
test eax, eax
jl 0x405b5d
jg 0x405b4d
test esi, esi
je 0x405b5d
mov dword [esp + 0x20], eax
cmp esi, ecx
jbe 0x405b5d
mov dword [esp + 0x20], eax
sub esi, ecx
jmp 0x405b5f
xor esi, esi
mov eax, dword [edi + 0x14]
and eax, 0x1c0
cmp eax, 0x40
je 0x405c11
cmp eax, 0x100
je 0x405bc4
push esi
push dword [ebp + 0x1c]
lea eax, [esp + 0x24]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
push dword [ebp + 8]
call fcn.004062d0
mov ecx, eax
xor esi, esi
mov eax, dword [ecx]
cmp dword [esp + 0x70], 0x10
mov dword [ebp + 0x10], eax
mov eax, dword [ecx + 4]
mov dword [ebp + 0x14], eax
push ebx
lea eax, [esp + 0x60]
cmovae eax, dword [esp + 0x60]
push eax
push dword [ecx + 4]
lea eax, [esp + 0x40]
push dword [ecx]
push eax
push dword [ebp + 8]
call fcn.00406250
add esp, 0x30
jmp 0x405c37
cmp dword [esp + 0x58], 0x10
push ebx
lea eax, [esp + 0x48]
cmovae eax, dword [esp + 0x48]
push eax
push dword [ebp + 0x14]
lea eax, [esp + 0x28]
push dword [ebp + 0x10]
push eax
push dword [ebp + 8]
call fcn.00406250
mov ecx, eax
push esi
mov eax, dword [ecx]
push dword [ebp + 0x1c]
mov dword [ebp + 0x10], eax
mov eax, dword [ecx + 4]
mov dword [ebp + 0x14], eax
push dword [ecx + 4]
lea eax, [esp + 0x40]
push dword [ecx]
push eax
push dword [ebp + 8]
call fcn.004062d0
add esp, 0x30
xor esi, esi
jmp 0x405c37
cmp dword [esp + 0x58], 0x10
push ebx
lea eax, [esp + 0x48]
cmovae eax, dword [esp + 0x48]
push eax
push dword [ebp + 0x14]
lea eax, [esp + 0x28]
push dword [ebp + 0x10]
push eax
push dword [ebp + 8]
call fcn.00406250
add esp, 0x18
mov ecx, dword [eax]
mov dword [ebp + 0x10], ecx
mov edx, dword [eax + 4]
mov dword [ebp + 0x14], edx
cmp dword [esp + 0x54], ebx
jae 0x405c65
push 0x67e
push str.D:Program_Files__x86_Microsoft_Visual_Studio_11.0VCincludexstring
push str.string_subscript_out_of_range
call fcn.0053d770
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
add esp, 0xc
cmp dword [esp + 0x58], 0x10
lea eax, [esp + 0x44]
cmovae eax, dword [esp + 0x44]
sub dword [esp + 0x10], ebx
push dword [esp + 0x10]
add eax, ebx
mov ebx, dword [ebp + 8]
push eax
push edx
push ecx
lea eax, [esp + 0x2c]
push eax
push ebx
call fcn.00406250
mov ecx, dword [eax]
push esi
push dword [ebp + 0x1c]
mov esi, dword [esp + 0x58]
mov dword [ebp + 0x10], ecx
mov eax, dword [eax + 4]
push eax
push ecx
push esi
push ebx
mov dword [ebp + 0x14], eax
mov dword [edi + 0x20], 0
mov dword [edi + 0x24], 0
call fcn.004062d0
add esp, 0x30
mov byte [esp + 0x88], 1
cmp dword [esp + 0x74], 0x10
jb 0x405cd6
push dword [esp + 0x60]
call fcn.004fea80
add esp, 4
lea ecx, [esp + 0x5c]
mov dword [esp + 0x74], 0xf
mov dword [esp + 0x70], 0
mov byte [esp + 0x60], 0
call fcn.004019a0
push dword [esp + 0x5c]
call fcn.004fea80
add esp, 4
lea ecx, [esp + 0x5c]
mov dword [esp + 0x5c], 0
call fcn.004019a0
mov dword [esp + 0x88], 0xffffffff
cmp dword [esp + 0x58], 0x10
jb 0x405d2f
push dword [esp + 0x44]
call fcn.004fea80
add esp, 4
lea ecx, [esp + 0x40]
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], 0
mov byte [esp + 0x44], 0
call fcn.004019a0
push dword [esp + 0x40]
call fcn.004fea80
add esp, 4
lea ecx, [esp + 0x40]
mov dword [esp + 0x40], 0
call fcn.004019a0
mov eax, esi
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.004fcf30
mov esp, ebp
pop ebp
ret