Function at 0x4061e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x50
mov eax, dword [esp + 0xa8]
mov edi, dword [esp + 0x64]
mov ecx, dword [edi + 0x48]
mov dword [esp], ecx
mov ebx, dword [ecx + 4]
mov dword [esp + 0x4c], ebx
test eax, eax
je 0x406218
mov ecx, dword [esp]
cmp dword [ecx + 0x34], 0
jne 0x406218
mov dword [edi + 0x1c], 3
jmp 0x40686f
movzx ecx, word [esp + 0x74]
movzx esi, word [esp + 0x6c]
movzx ecx, cx
movzx ebp, word [esp + 0x7c]
mov dword [esp + 0x40], ecx
mov edx, esi
mov dword [esp + 0x44], esi
add ecx, esi
add ecx, ebp
mov esi, dword [esp + 0xb4]
xor edx, edx
add ecx, esi
setb dl
add ecx, ebx
adc edx, 0
add ecx, 0x2e
adc edx, 0
cmp ecx, 0xffffffff
sbb edx, 0
jb 0x406265
mov dword [edi + 0x1c], 0xf
jmp 0x40686f
mov dword [esp + 0x3c], ebp
mov dword [esp + 8], ebx
mov ebp, dword [esp + 0x8c]
mov ecx, dword [esp + 0x84]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x12], 0
mov dword [esp + 0x16], 0
mov dword [esp + 0x1a], 0
mov dword [esp + 0x1e], 0
mov dword [esp + 0x22], 0
mov dword [esp + 0x26], 0
mov dword [esp + 0x2a], 0
mov dword [esp + 0x2e], 0
mov word [esp + 0x32], 0
mov dword [esp + 0xe], 0x2014b50
movzx edi, word [esp + 0x94]
mov ecx, dword [esp + 0x90]
movzx edx, word [esp + 0x74]
add edx, esi
mov dword [esp + 4], edx
xor ebx, ebx
mov edx, 0
mov esi, edi
test di, di
je 0x4062f8
mov dl, 0x14
mov byte [esp + 0x14], dl
movzx edx, word [esp + 0x98]
mov byte [esp + 0x16], dl
mov byte [esp + 0x17], dh
mov edx, esi
mov byte [esp + 0x18], dl
mov byte [esp + 0x19], dh
movzx edx, word [esp + 0x9c]
mov byte [esp + 0x1a], dl
mov byte [esp + 0x1b], dh
movzx edx, word [esp + 0xa0]
mov byte [esp + 0x1c], dl
mov byte [esp + 0x1d], dh
mov byte [esp + 0x1e], cl
mov byte [esp + 0x1f], ch
mov edx, ecx
shr edx, 0x10
mov byte [esp + 0x20], dl
shr ecx, 0x18
neg ebp
mov edx, 0
sbb edx, edx
mov byte [esp + 0x21], cl
or edx, dword [esp + 0x88]
mov byte [esp + 0x22], dl
mov byte [esp + 0x23], dh
mov ecx, edx
shr ecx, 0x10
mov byte [esp + 0x24], cl
shr edx, 0x18
neg dword [esp + 0x48]
mov ecx, 0
sbb ecx, ecx
mov byte [esp + 0x25], dl
or ecx, dword [esp + 0x80]
mov byte [esp + 0x26], cl
mov byte [esp + 0x27], ch
mov edx, ecx
shr edx, 0x10
mov byte [esp + 0x28], dl
shr ecx, 0x18
mov byte [esp + 0x29], cl
movzx ecx, word [esp + 0x6c]
mov byte [esp + 0x2a], cl
mov byte [esp + 0x2b], ch
mov ecx, dword [esp + 4]
mov byte [esp + 0x2c], cl
mov byte [esp + 0x2d], ch
movzx ecx, word [esp + 0x7c]
mov byte [esp + 0x2e], cl
mov byte [esp + 0x2f], ch
mov edx, dword [esp + 0xac]
mov byte [esp + 0x34], dl
mov byte [esp + 0x35], dh
mov ecx, edx
shr ecx, 0x10
mov byte [esp + 0x36], cl
shr edx, 0x18
neg eax
sbb ebx, ebx
mov byte [esp + 0x37], dl
or ebx, dword [esp + 0xa4]
mov byte [esp + 0x38], bl
mov byte [esp + 0x39], bh
mov eax, ebx
shr eax, 0x10
mov byte [esp + 0x3a], al
shr ebx, 0x18
mov byte [esp + 0x3b], bl
mov esi, dword [esp + 8]
lea edi, [esi + 0x2e]
mov eax, dword [esp]
mov ebx, dword [eax + 8]
cmp ebx, edi
jae 0x40647d
cmp ebx, 1
adc ebx, 0
cmp edi, 2
jb 0x40644c
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, ebx
and eax, 2
mov ecx, ebx
or ebx, 2
imul ebx, eax
xor eax, 2
and ecx, 0xfffffffd
imul ecx, eax
add ebx, ecx
cmp ebx, edi
jb 0x406430
push ebx
mov eax, dword [esp + 4]
push dword [eax + 0xc]
push dword [eax]
mov eax, dword [esp + 0x70]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x406833
mov ecx, dword [esp]
mov dword [esp + 4], eax
mov dword [ecx], eax
mov dword [ecx + 8], ebx
mov esi, dword [esp + 8]
jmp 0x406486
mov eax, dword [esp]
mov eax, dword [eax]
mov dword [esp + 4], eax
mov eax, dword [esp]
mov dword [eax + 4], edi
mov ecx, dword [eax + 0xc]
mov edi, esi
not edi
and edi, ecx
mov edx, ecx
not edx
mov ebx, esi
and ebx, edx
imul ebx, edi
mov ebp, ecx
and ebp, esi
mov edi, ecx
or edi, esi
mov esi, eax
imul edi, ebp
add edi, dword [esp + 4]
add edi, ebx
mov eax, ecx
and eax, 0xffffffd1
and edx, 0x2e
imul edx, eax
mov eax, ecx
and eax, 0x2e
or ecx, 0x2e
imul ecx, eax
add ecx, edx
lea eax, [esp + 0xe]
push ecx
push eax
push edi
call fcn.00409890
add esp, 0xc
mov ebx, dword [esi + 4]
mov ebp, dword [esi + 8]
mov eax, dword [esp + 0x44]
lea edi, [ebx + eax]
cmp ebp, edi
jae 0x406545
cmp ebp, 1
adc ebp, 0
movzx esi, word [esp + 0x74]
cmp edi, 2
jb 0x40651c
nop
nop
nop
nop
nop
mov eax, ebp
and eax, 2
mov ecx, ebp
or ebp, 2
imul ebp, eax
xor eax, 2
and ecx, 0xfffffffd
imul ecx, eax
add ebp, ecx
cmp ebp, edi
jb 0x406500
push ebp
mov eax, dword [esp + 4]
push dword [eax + 0xc]
push dword [eax]
mov eax, dword [esp + 0x70]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x406833
mov ecx, dword [esp]
mov dword [ecx], eax
mov dword [ecx + 8], ebp
jmp 0x40654a
movzx esi, word [esp + 0x74]
mov eax, dword [esp]
mov dword [eax + 4], edi
cmp word [esp + 0x6c], 0
je 0x4065af
mov esi, dword [esp]
mov eax, dword [esi + 0xc]
mov edx, ebx
not edx
and edx, eax
mov edi, ebx
mov ecx, eax
and ecx, ebx
or ebx, eax
imul ebx, ecx
mov ecx, eax
not ecx
and edi, ecx
add ebx, dword [esi]
imul edi, edx
add ebx, edi
mov edi, dword [esp + 0x44]
mov edx, edi
not edx
and edx, eax
and ecx, edi
imul ecx, edx
mov edx, eax
and edx, edi
or eax, edi
imul eax, edx
add eax, ecx
push eax
push dword [esp + 0x6c]
push ebx
call fcn.00409890
add esp, 0xc
mov edi, dword [esi + 4]
mov ebp, dword [esi + 8]
movzx esi, word [esp + 0x74]
mov eax, dword [esp + 0x40]
lea ebx, [edi + eax]
cmp ebp, ebx
mov ecx, dword [esp + 0xb4]
jae 0x40661a
cmp ebp, 1
adc ebp, 0
cmp ebx, 2
jb 0x4065ec
nop
nop
nop
nop
mov eax, ebp
and eax, 2
mov ecx, ebp
or ebp, 2
imul ebp, eax
xor eax, 2
and ecx, 0xfffffffd
imul ecx, eax
add ebp, ecx
cmp ebp, ebx
jb 0x4065d0
push ebp
mov eax, dword [esp + 4]
push dword [eax + 0xc]
push dword [eax]
mov eax, dword [esp + 0x70]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x406833
mov ecx, dword [esp]
mov dword [ecx], eax
mov dword [ecx + 8], ebp
mov ecx, dword [esp + 0xb4]
mov eax, dword [esp]
mov dword [eax + 4], ebx
test si, si
je 0x40667e
mov esi, dword [esp]
mov eax, dword [esi + 0xc]
mov edx, edi
not edx
and edx, eax
mov ebx, edi
mov ecx, eax
and ecx, edi
or edi, eax
imul edi, ecx
mov ecx, eax
not ecx
and ebx, ecx
add edi, dword [esi]
imul ebx, edx
add edi, ebx
mov ebx, dword [esp + 0x40]
mov edx, ebx
not edx
and edx, eax
and ecx, ebx
imul ecx, edx
mov edx, eax
and edx, ebx
or eax, ebx
imul eax, edx
add eax, ecx
push eax
push dword [esp + 0x74]
push edi
call fcn.00409890
mov ecx, dword [esp + 0xc0]
add esp, 0xc
mov ebx, dword [esi + 4]
mov ebp, dword [esi + 8]
lea edi, [ebx + ecx]
cmp ebp, edi
jae 0x4066da
cmp ebp, 1
adc ebp, 0
cmp edi, 2
jb 0x4066ac
mov eax, ebp
and eax, 2
mov ecx, ebp
or ebp, 2
imul ebp, eax
xor eax, 2
and ecx, 0xfffffffd
imul ecx, eax
add ebp, ecx
cmp ebp, edi
jb 0x406690
push ebp
mov eax, dword [esp + 4]
push dword [eax + 0xc]
push dword [eax]
mov eax, dword [esp + 0x70]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x406833
mov ecx, dword [esp]
mov dword [ecx], eax
mov dword [ecx + 8], ebp
mov ecx, dword [esp + 0xb4]
mov eax, dword [esp]
mov dword [eax + 4], edi
test ecx, ecx
je 0x406737
mov esi, dword [esp]
mov eax, dword [esi + 0xc]
mov ebp, ecx
mov edx, ebx
not edx
and edx, eax
mov edi, ebx
mov ecx, eax
and ecx, ebx
or ebx, eax
imul ebx, ecx
mov ecx, eax
not ecx
and edi, ecx
add ebx, dword [esi]
imul edi, edx
add ebx, edi
mov edx, ebp
not edx
and edx, eax
and ecx, ebp
imul ecx, edx
mov edx, eax
and edx, ebp
or eax, ebp
imul eax, edx
add eax, ecx
push eax
push dword [esp + 0xb4]
push ebx
call fcn.00409890
add esp, 0xc
mov edi, dword [esi + 4]
mov ebp, dword [esi + 8]
mov eax, dword [esp + 0x3c]
lea ebx, [edi + eax]
cmp ebp, ebx
jae 0x40675c
mov ecx, dword [esp + 0x64]
mov edx, dword [esp]
push 1
push ebx
call fcn.004096c0
add esp, 8
test eax, eax
je 0x406833
mov eax, dword [esp]
mov dword [eax + 4], ebx
cmp word [esp + 0x7c], 0
je 0x4067b6
mov esi, dword [esp]
mov eax, dword [esi + 0xc]
mov edx, edi
not edx
and edx, eax
mov ebx, edi
mov ecx, eax
and ecx, edi
or edi, eax
imul edi, ecx
mov ecx, eax
not ecx
and ebx, ecx
add edi, dword [esi]
imul ebx, edx
add edi, ebx
mov ebx, dword [esp + 0x3c]
mov edx, ebx
not edx
and edx, eax
and ecx, ebx
imul ecx, edx
mov edx, eax
and edx, ebx
or eax, ebx
imul eax, edx
add eax, ecx
push eax
push dword [esp + 0x7c]
push edi
call fcn.00409890
add esp, 0xc
mov eax, dword [esp]
mov edi, dword [eax + 0x14]
lea ebx, [edi + 1]
cmp dword [eax + 0x18], ebx
jae 0x4067dd
mov eax, dword [esp]
lea edx, [eax + 0x10]
mov ecx, dword [esp + 0x64]
push 1
push ebx
call fcn.004096c0
add esp, 8
test eax, eax
je 0x406833
mov esi, dword [esp]
mov dword [esi + 0x14], ebx
mov eax, dword [esi + 0x1c]
mov edx, edi
not edx
and edx, eax
mov ebx, edi
mov ecx, eax
and ecx, edi
or edi, eax
imul edi, ecx
mov ecx, eax
not ecx
and ebx, ecx
add edi, dword [esi + 0x10]
imul ebx, edx
add edi, ebx
and ecx, 1
neg ecx
and ecx, eax
and ecx, 0xfffffffe
mov edx, eax
or edx, 1
and eax, 1
neg eax
and eax, edx
add eax, ecx
lea ecx, [esp + 0x4c]
push eax
push ecx
push edi
call fcn.00409890
add esp, 0xc
mov eax, 1
jmp 0x406871
mov ebx, dword [esp + 8]
mov eax, dword [esp]
cmp dword [eax + 8], ebx
mov edi, dword [esp + 0x64]
jae 0x406862
push ebx
mov eax, dword [esp + 4]
push dword [eax + 0xc]
push dword [eax]
push dword [edi + 0x34]
call dword [edi + 0x30]
add esp, 0x10
test eax, eax
je 0x406868
mov ecx, dword [esp]
mov dword [ecx], eax
mov dword [ecx + 8], ebx
mov eax, dword [esp]
mov dword [eax + 4], ebx
mov dword [edi + 0x1c], 0x10
xor eax, eax
add esp, 0x50
pop esi
pop edi
pop ebx
pop ebp
ret