Function at 0x401712
Capabilities:
Encode data using xor

Disassembly:
jmp 0x40d12b
sub esp, 0xa8
mov eax, dword [0x427db0]
xor eax, esp
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0xac]
mov edx, dword [esp + 0xc4]
push ebx
push ebp
mov dword [esp + 0x14], eax
xor ebp, ebp
mov eax, dword [esp + 0xb8]
push esi
mov esi, dword [esp + 0xcc]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0xc8]
push edi
mov edi, dword [esp + 0xc4]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x30], ebp
mov dword [esp + 0x40], ebp
mov ebx, ecx
mov dword [esp + 0x14], edi
mov ecx, dword [edi]
mov dword [esp + 0x10], ebx
test ecx, ecx
je 0x40d641
movzx eax, byte [ecx]
inc ecx
mov dword [edi], ecx
test eax, eax
je 0x40d641
cmp eax, 1
jb 0x40d1bb
cmp eax, 0x73
jbe 0x40d2e0
cmp eax, 0x74
je 0x40d5fa
cmp eax, 0x75
jb 0x40d306
cmp eax, 0x8d
jae 0x40d311
add eax, 0xffffff8b
mov dword [esp + 0x18], eax
and dword [esp + 0x18], 3
mov dword [esp + 0x10], eax
sar dword [esp + 0x10], 3
test al, 4
jne 0x40d1f6
push 3
pop eax
jmp 0x40d206
movzx eax, byte [ecx]
mov dword [esp + 0x14], eax
lea eax, [ecx + 1]
mov dword [edi], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
inc eax
shl ecx, 2
mov dword [esp + 0x14], eax
mov eax, esi
shl dword [esp + 0x14], cl
mov ecx, esi
sub eax, dword [esp + 0x14]
test esi, esi
cmovns ecx, eax
mov dword [esp + 0x18], ecx
je 0x40d2f9
test ecx, ecx
jg 0x40d239
cmp ecx, esi
jne 0x40d2f9
test byte [esp + 0xc8], 1
jne 0x40d2ec
mov ecx, dword [esp + 0xc8]
mov eax, 0x4283b4
mov esi, dword [esp + 0x10]
or ecx, 1
push edx
push dword [esp + 0x18]
cmp esi, 1
push dword [esp + 0x34]
cmovne eax, edi
push ecx
mov ecx, dword [esp + 0x34]
push eax
push dword [esp + 0x3c]
push dword [esp + 0x34]
call fcn.00401712
push dword [ebx + 0x3c]
call fcn.004011a9
pop ecx
test al, al
jne 0x40d6ef
mov ecx, dword [ebx + 0x3c]
push ebp
push 1
push 0x40
call fcn.00401005
mov ecx, eax
mov dword [esp + 0x24], ecx
test ecx, ecx
je 0x40d6ef
mov eax, dword [ebx + 0x3c]
mov dword [ecx + 0x3c], eax
jmp 0x40d2b2
mov ebx, eax
mov eax, dword [ebx + 0x2c]
test eax, eax
jne 0x40d2b0
cmp esi, 2
mov dword [ebx + 0x2c], ecx
mov esi, dword [esp + 0x18]
mov dword [esp + 0xd0], esi
jne 0x40d2da
mov edi, 0x4283b4
mov edx, dword [esp + 0x20]
jmp 0x40d18b
mov dword [esp + 0x24], ecx
jmp 0x40d2d1
push eax
call fcn.00401483
pop ecx
jmp 0x40d645
push dword [ebx + 0x3c]
push str.illegal_nested_run_encoding
jmp 0x40d635
push dword [ebx + 0x3c]
push str.illegal_run_encoding
jmp 0x40d635
cmp eax, 0x8d
jb 0x40d5f0
cmp eax, 0xbd
jae 0x40d5f0
add eax, 0xffffff73
mov dword [esp + 0x18], eax
sar eax, 2
push 2
pop edx
mov ecx, eax
mov dword [esp + 0x10], eax
shl edx, cl
push 0xb
pop ecx
sub ecx, eax
push 4
pop eax
shl eax, cl
mov ecx, 0x100
sub ecx, eax
cmp dword [esp + 0x10], 6
mov eax, 0x100
cmovle ecx, edx
sub eax, ecx
mov dword [esp + 0x30], eax
test esi, esi
jg 0x40d36c
mov eax, dword [esp + 0x24]
push dword [eax + 0x3c]
push str.illegal_pop_encoding
jmp 0x40d635
test byte [esp + 0xc8], 2
je 0x40d387
mov eax, dword [esp + 0x24]
push dword [eax + 0x3c]
push str.illegal_nested_pop_encoding
jmp 0x40d635
push 0x40
lea eax, [esp + 0x4c]
mov dword [esp + 0x40], ebp
push ebp
push eax
mov dword [esp + 0x40], ebp
mov dword [esp + 0x44], ebp
call sub.VCRUNTIME140.dll_memset
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x40]
add esp, 0xc
test byte [esp + 0x18], 1
mov eax, dword [eax + 0x3c]
push ecx
push 0xfffffffffffffffe
push dword [esp + 0x34]
mov dword [esp + 0x90], eax
lea ecx, [esp + 0x54]
push 2
mov eax, 0x4283b4
cmove eax, edi
push eax
push dword [esp + 0x3c]
push dword [esp + 0x34]
call fcn.00401712
push dword [esp + 0x38]
mov ecx, dword [ebx + 0x3c]
lea eax, [esp + 0x44]
push dword [esp + 0x38]
push eax
call fcn.0040154b
mov eax, dword [esp + 0x40]
mov dword [ebx + 0x30], eax
mov eax, dword [esp + 0x38]
shr eax, 2
mov dword [ebx + 0x34], eax
cmp dword [esp + 0x3c], ebp
je 0x40d412
lea ecx, [esp + 0x34]
call fcn.004015eb
push dword [ebx + 0x3c]
mov dword [esp + 0x40], ebp
call fcn.004011a9
pop ecx
test al, al
jne 0x40d6ef
push ebp
cmp dword [esp + 0x14], ebp
jle 0x40d4bc
push ebp
push 0x100
push 1
call fcn.004012d5
add esp, 0x10
mov dword [esp + 0x10], 2
mov edi, eax
mov eax, dword [ebx + 0x34]
cmp eax, dword [edi + 0x10]
jle 0x40d49a
mov ecx, edi
call fcn.00401898
push ebp
push ebp
push dword [esp + 0x38]
push dword [esp + 0x1c]
call fcn.004012d5
mov edi, eax
add esp, 0x10
test edi, edi
je 0x40d6ef
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp eax, 5
jle 0x40d44c
mov eax, dword [ebx + 0x34]
cmp eax, dword [edi + 0x10]
jle 0x40d49a
push dword [ebx + 0x3c]
push str.pop.L_value_too_small
jmp 0x40d635
push ebp
push esi
push edi
push 2
push 0x4283b4
push dword [esp + 0x3c]
mov ecx, ebx
push dword [esp + 0x34]
call fcn.00401712
mov ecx, edi
call fcn.00401898
jmp 0x40d4d3
push esi
push dword [esp + 0x34]
mov ecx, ebx
push 2
push edi
push dword [esp + 0x3c]
push dword [esp + 0x34]
call fcn.00401712
push dword [ebx + 0x3c]
call fcn.004011a9
pop ecx
test al, al
jne 0x40d6ef
push 0xb
pop ecx
mov esi, ebx
mov dword [esp + 0x10], ebp
lea edi, [esp + 0x88]
mov dword [esp + 0x20], ebp
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0xd0]
test edi, edi
jle 0x40d591
lea ecx, [esp + 0x88]
call fcn.00401609
mov esi, dword [esp + 0x10]
test eax, eax
jne 0x40d522
inc esi
mov dword [esp + 0x10], esi
cmp eax, dword [ebx + 0x34]
ja 0x40d584
mov eax, dword [esp + 0x20]
inc eax
mov dword [esp + 0x20], eax
cmp eax, edi
jl 0x40d509
test esi, esi
je 0x40d591
mov ecx, dword [ebx + 0x3c]
push ebp
push 1
push 0x40
call fcn.00401005
mov dword [ebx + 0x38], eax
test eax, eax
je 0x40d6ef
mov ecx, dword [ebx + 0x3c]
test byte [esp + 0x18], 2
push ebp
push esi
push dword [esp + 0x34]
mov dword [eax + 0x3c], ecx
mov eax, 0x4283b4
cmove eax, dword [esp + 0x20]
push 2
push eax
mov eax, dword [esp + 0x38]
push dword [esp + 0x3c]
push dword [esp + 0x34]
mov ecx, dword [eax + 0x38]
call fcn.00401712
jmp 0x40d5b7
push dword [ebx + 0x3c]
push str.pop_token_out_of_range
jmp 0x40d635
test byte [esp + 0x18], 2
jne 0x40d5b7
mov edx, dword [esp + 0x14]
mov eax, dword [edx]
mov cl, byte [eax]
inc eax
mov dword [edx], eax
cmp cl, 0x73
jbe 0x40d5b7
push dword [ebx + 0x3c]
push str.bad_meta_coding_for_empty_pop_U
call fcn.00401663
pop ecx
pop ecx
mov ecx, ebx
mov eax, dword [ecx + 0x18]
dec eax
push 0xe
pop edx
sub eax, 1
je 0x40d5ce
sub eax, 5
jne 0x40d5d1
push 0x10
jmp 0x40d5d0
push 0xf
pop edx
mov dword [ecx + 0x18], edx
cmp ecx, ebx
je 0x40d5e4
mov eax, dword [ebx + 0x30]
mov dword [ecx + 0x30], eax
mov eax, dword [ebx + 0x34]
mov dword [ecx + 0x34], eax
mov ecx, dword [ecx + 0x2c]
test ecx, ecx
jne 0x40d5b9
jmp 0x40d6ef
push dword [ebx + 0x3c]
push str.bad_meta_coding
jmp 0x40d635
movzx edx, byte [ecx]
lea eax, [ecx + 1]
mov dword [edi], eax
movzx ecx, byte [eax]
inc ecx
inc eax
mov dword [edi], eax
mov eax, edx
and eax, 1
push eax
mov eax, edx
shr edx, 3
shr eax, 1
and eax, 3
inc edx
push eax
push ecx
push edx
call fcn.004012d5
add esp, 0x10
mov dword [esp + 0x40], eax
test eax, eax
jne 0x40d645
push dword [ebx + 0x3c]
push str.illegal_arb._coding
call fcn.00401663
pop ecx
pop ecx
jmp 0x40d6ef
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x1c]
mov ecx, ebx
mov ebp, dword [esp + 0x28]
push eax
push ebp
push dword [edi]
call fcn.004018c5
mov eax, dword [esp + 0x40]
test eax, eax
je 0x40d667
mov ecx, eax
call fcn.00401898
mov eax, dword [esp + 0x20]
mov ecx, dword [ebx]
test eax, eax
jne 0x40d690
mov eax, ecx
sar ecx, 0x14
sar eax, 8
and ecx, 0xf
and eax, 0xfff
push eax
push ecx
push ebp
push esi
push edi
call fcn.004013a2
add esp, 0x14
jmp 0x40d6da
test esi, esi
js 0x40d70a
push 0xb
pop ecx
mov esi, ebx
lea edi, [esp + 0x88]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0xd0]
test edi, edi
jle 0x40d6cd
mov ebp, eax
lea ecx, [esp + 0x88]
call fcn.00401609
push 4
mov ecx, ebp
mov esi, eax
call fcn.004014b5
mov dword [eax], esi
sub edi, 1
jne 0x40d6af
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0xa4]
mov dword [edi], eax
push dword [ebx + 0x3c]
call fcn.004011a9
pop ecx
test al, al
jne 0x40d6ef
mov eax, dword [edi]
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x28], ebx
mov ecx, dword [esp + 0xb4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004014fb
add esp, 0xa8
ret 0x1c
mov edi, dword [eax + 4]
mov ebp, 0x80000000
shr edi, 2
test edi, edi
je 0x40d74e
mov ebx, dword [eax]
mov esi, dword [ebx]
mov ecx, ebp
mov edx, esi
sar ecx, 0x1f
sar edx, 0x1f
lea ebx, [ebx + 4]
mov dword [esp + 0x30], esi
lea eax, [esi + esi]
xor edx, eax
lea eax, [ebp*2]
xor ecx, eax
mov eax, esi
cmp ecx, edx
cmovb eax, ebp
mov ebp, eax
sub edi, 1
jne 0x40d71b
mov ebx, dword [esp + 0x10]
push 0xb
pop ecx
mov esi, ebx
lea edi, [esp + 0x88]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x30]
lea ecx, [esp + 0x88]
call fcn.00401609
mov esi, eax
mov eax, dword [esp + 0x20]
test dword [eax + 4], 0xfffffffc
jbe 0x40d78b
cmp esi, edi
je 0x40d6cd
cmp esi, ebp
je 0x40d6cd
push 4
mov ecx, eax
call fcn.004014b5
mov dword [eax], esi
push dword [ebx + 0x3c]
call fcn.004011a9
pop ecx
test al, al
jne 0x40d6ef
mov edx, esi
lea eax, [esi + esi]
sar edx, 0x1f
mov ecx, ebp
xor edx, eax
sar ecx, 0x1f
lea eax, [ebp*2]
mov edi, esi
xor ecx, eax
cmp ecx, edx
cmovb esi, ebp
mov ebp, esi
jmp 0x40d760