Function at 0x4121d0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x1c
mov eax, dword [esp + 0x38]
push ebx
mov ebx, dword [esp + 0x34]
shl eax, 9
add eax, dword [esp + 0x38]
push ebp
mov eax, dword [eax*4 + 0x4b82c0]
movzx edx, byte [eax + 1]
mov ebp, dword [esp + 0x28]
push esi
push edi
movzx edi, byte [eax + 2]
lea ecx, [edi + 1]
mov dword [0x5b82e4], ecx
lea ecx, [edx*4]
mov esi, eax
sub esi, ecx
add esi, 4
mov dword [esp + 0x10], edi
mov dword [0x5b82e0], edx
mov dword [0x5b82e8], esi
movzx esi, byte [eax]
mov ecx, 0x5b82ec
test esi, esi
je 0x41228d
lea esp, [esp]
movzx ebp, byte [eax + esi*4 + 3]
lea eax, [eax + esi*4]
mov ebx, ebp
sub ebx, esi
sub ebx, edx
lea edx, [ebx + edi + 2]
mov dword [ecx], edx
mov dword [ecx + 4], ebp
lea edx, [ebp*4]
mov esi, eax
sub esi, edx
mov dword [ecx + 8], esi
movzx edi, byte [eax + 2]
movzx edx, byte [eax + 1]
mov dword [ecx + 0xc], edx
lea esi, [edi + 1]
mov dword [ecx + 0x10], esi
lea esi, [edx*4]
mov ebx, eax
sub ebx, esi
add ebx, 4
mov dword [ecx + 0x14], ebx
mov dword [esp + 0x10], edi
movzx esi, byte [eax]
add ecx, 0x18
test esi, esi
jne 0x412230
mov ebx, dword [esp + 0x40]
mov ebp, dword [esp + 0x30]
mov dword [ecx + 4], 0x40
mov dword [ecx], 0x40
mov eax, dword [ebp]
mov cl, al
mov byte [0x1960ce1], cl
mov edx, dword [ebp + 4]
lea ecx, [edx - 1]
mov esi, 0xf
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], edx
mov byte [0x1960ce2], cl
mov byte [0x1960ce3], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x14], 0x5b82e0
lea edi, [esi - 0xb]
cmp edx, 0x40
je 0x4122e6
lea ecx, [edx - 1]
mov dword [esp + 0x24], ecx
jmp 0x4122ee
mov dword [esp + 0x24], 0xffffffff
mov dword [esp + 0x20], 0x5b82e4
mov dword [esp + 0x18], ebp
lea ebx, [ebx]
mov dword [esp + 0x28], 0
mov ecx, dword [esp + 0x20]
cmp eax, dword [ecx]
jl 0x412326
mov ecx, dword [esp + 0x14]
add ecx, 0xc
mov dword [esp + 0x14], ecx
add ecx, 4
mov dword [esp + 0x20], ecx
cmp eax, dword [ecx]
jge 0x412310
mov ecx, dword [esp + 0x14]
cmp eax, dword [ecx]
jl 0x41233c
mov ecx, dword [ecx + 8]
mov ecx, dword [ecx + eax*4]
mov dword [edi + 0x1960ce0], ecx
jmp 0x412362
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x4c]
push ecx
call dword [0x4b82a0]
mov edx, dword [esp + 0x28]
mov dword [edi + 0x1960ce0], eax
mov eax, dword [esp + 0x1c]
add esp, 0xc
inc eax
add edi, 4
mov dword [esp + 0x10], eax
cmp eax, edx
jge 0x4124cd
mov ecx, dword [esp + 0x34]
cmp eax, dword [ecx]
jl 0x41238e
lea ebx, [ebx]
add ecx, 4
xor esi, 1
cmp eax, dword [ecx]
jge 0x412380
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x38]
cmp eax, dword [ecx]
jl 0x4123a4
add ecx, 4
xor esi, 2
cmp eax, dword [ecx]
jge 0x412396
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x3c]
cmp eax, dword [ecx]
jl 0x4123be
lea esp, [esp]
add ecx, 4
xor esi, 4
cmp eax, dword [ecx]
jge 0x4123b0
mov dword [esp + 0x3c], ecx
cmp eax, dword [ebx]
jl 0x4123cc
add ebx, 4
xor esi, 8
cmp eax, dword [ebx]
jge 0x4123c2
test esi, esi
jne 0x412308
cmp eax, dword [esp + 0x24]
je 0x412308
cmp dword [esp + 0x28], esi
jne 0x4123fa
mov ecx, dword [esp + 0x30]
dec al
mov byte [ecx + 0x1960ce2], al
mov dword [esp + 0x28], 1
jmp 0x412429
mov ebp, dword [esp + 0x30]
mov ecx, edi
sub ecx, dword [esp + 0x30]
mov dword [esp + 0x30], edi
sar ecx, 2
mov byte [ebp + 0x1960ce0], cl
lea ecx, [eax - 1]
mov byte [edi + 0x1960ce1], al
mov byte [edi + 0x1960ce2], cl
mov byte [edi + 0x1960ce3], al
add edi, 4
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
mov eax, dword [eax]
mov ecx, dword [ecx]
cmp eax, ecx
jge 0x41245b
mov ebp, dword [esp + 0x3c]
cmp eax, dword [ebp]
jge 0x41245b
cmp eax, dword [ebx]
jge 0x41245b
cmp eax, edx
jl 0x41244f
lea eax, [edx - 1]
jmp 0x4124ab
add dword [esp + 0x34], 4
mov esi, 1
jmp 0x4124ab
mov eax, dword [esp + 0x3c]
mov eax, dword [eax]
cmp ecx, eax
jge 0x41247e
cmp ecx, dword [ebx]
jge 0x41247e
cmp ecx, edx
jl 0x412472
lea eax, [edx - 1]
jmp 0x4124ab
add dword [esp + 0x38], 4
mov esi, 2
jmp 0x4124a9
mov ecx, dword [ebx]
cmp eax, ecx
jge 0x412498
cmp eax, edx
jl 0x41248d
lea eax, [edx - 1]
jmp 0x4124ab
mov esi, 4
add dword [esp + 0x3c], esi
jmp 0x4124ab
cmp ecx, edx
jl 0x4124a1
lea eax, [edx - 1]
jmp 0x4124ab
add ebx, 4
mov esi, 8
mov eax, ecx
mov dword [esp + 0x10], eax
cmp eax, 0x3f
jne 0x412308
mov eax, dword [esp + 0x30]
mov byte [eax + 0x1960ce0], 0
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
cmp edx, 0x40
jge 0x412520
mov ebp, dword [esp + 0x30]
add dword [esp + 0x18], 8
mov ecx, edi
sub ecx, ebp
sar ecx, 2
mov byte [ebp + 0x1960ce0], cl
mov ebp, dword [esp + 0x18]
mov eax, dword [ebp]
mov cl, al
mov byte [edi + 0x1960ce1], cl
mov byte [edi + 0x1960ce3], dl
mov ecx, dword [ebp + 4]
mov dword [esp + 0x1c], ecx
mov edx, dword [esp + 0x1c]
dec cl
mov dword [esp + 0x30], edi
mov byte [edi + 0x1960ce2], cl
mov dword [esp + 0x10], eax
add edi, 4
jmp 0x412300
mov edx, dword [esp + 0x30]
mov eax, edi
pop edi
pop esi
pop ebp
mov byte [edx + 0x1960ce0], 0
pop ebx
add esp, 0x1c
ret