Function at 0x412b74
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffb4
mov byte [esp], dl
mov ebx, eax
cmp dword [0x41c2d0], 0
jne 0x4128d4
xor edi, edi
xor edx, edx
xor eax, eax
xor ecx, ecx
mov dword [esp + 4], ecx
xor esi, esi
jmp 0x4128bb
mov dword [eax*4 + 0x41c2cc], edi
mov byte [eax + 0x41c3bc], dl
inc esi
inc eax
mov ecx, edx
mov ebp, 1
shl ebp, cl
add edi, ebp
mov ecx, dword [esp + 4]
cmp esi, dword [ecx*4 + 0x4157d4]
jl 0x4128a1
inc dword [esp + 4]
inc edx
cmp dword [esp + 4], 0x13
jl 0x41289d
mov byte [ebx + 0x5774], 1
cmp byte [ebx + 0x5768], 0
jne 0x41291d
xor edx, edx
mov eax, ebx
mov dl, byte [esp]
call fcn.0041416c
mov eax, ebx
call fcn.00413918
test al, al
je 0x412fbc
cmp byte [esp], 0
je 0x41290e
cmp byte [ebx + 0x4c5c], 0
jne 0x41291d
mov eax, ebx
call fcn.00413ea8
test al, al
je 0x412fbc
and dword [ebx + 0x55b0], 0x3fffff
mov edx, dword [ebx]
cmp edx, dword [ebx + 0x55bc]
jle 0x412940
mov eax, ebx
call fcn.00413918
test al, al
je 0x412fb5
mov eax, dword [ebx + 0x55b4]
mov ecx, eax
mov edx, dword [ebx + 0x55b0]
sub ecx, edx
and ecx, 0x3fffff
cmp ecx, 0x104
jae 0x4129a5
cmp edx, eax
je 0x4129a5
mov eax, ebx
call fcn.00413998
mov eax, dword [ebx + 0x576c]
mov edx, dword [ebx + 0x5770]
cmp edx, dword [ebx + 0x5764]
jne 0x41298a
cmp eax, dword [ebx + 0x5760]
jbe 0x412990
jmp 0x412fbc
jg 0x412fbc
cmp byte [ebx + 0x5768], 0
je 0x4129a5
mov byte [ebx + 0x5774], 0
jmp 0x412fbc
cmp dword [ebx + 0x5754], 1
jne 0x412b21
lea eax, [ebx + 0x10]
call fcn.00411824
mov esi, eax
cmp esi, 0xffffffff
jne 0x4129d6
lea eax, [ebx + 0x10]
call fcn.004116f8
xor edx, edx
mov dword [ebx + 0x5754], edx
jmp 0x412fb5
cmp esi, dword [ebx + 0x4bfc]
jne 0x412b05
lea eax, [ebx + 0x10]
call fcn.00411824
mov dword [esp + 8], eax
cmp dword [esp + 8], 0
jne 0x412a09
mov eax, ebx
call fcn.00413ea8
test al, al
je 0x412fb5
jmp 0x41291d
cmp dword [esp + 8], 2
je 0x412fb5
cmp dword [esp + 8], 0xffffffff
je 0x412fb5
cmp dword [esp + 8], 3
jne 0x412a3a
mov eax, ebx
call fcn.00413248
test al, al
je 0x412fb5
jmp 0x41291d
cmp dword [esp + 8], 4
jne 0x412acf
xor edx, edx
mov dword [esp + 0xc], edx
mov byte [esp + 0x14], 0
xor ecx, ecx
mov dword [esp + 0x18], ecx
jmp 0x412a9c
lea eax, [ebx + 0x10]
call fcn.00411824
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x1c], 0xffffffff
jne 0x412a72
mov byte [esp + 0x14], 1
jmp 0x412a98
cmp dword [esp + 0x18], 3
jne 0x412a85
xor edx, edx
mov dl, byte [esp + 0x1c]
mov dword [esp + 0x10], edx
jmp 0x412a98
mov eax, dword [esp + 0xc]
xor ecx, ecx
shl eax, 8
mov cl, byte [esp + 0x1c]
add ecx, eax
mov dword [esp + 0xc], ecx
inc dword [esp + 0x18]
cmp dword [esp + 0x18], 4
jge 0x412aaa
cmp byte [esp + 0x14], 0
je 0x412a58
cmp byte [esp + 0x14], 0
jne 0x412fb5
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
add ecx, 2
add edx, 0x20
mov eax, ebx
call fcn.004126ac
jmp 0x41291d
cmp dword [esp + 8], 5
jne 0x412b05
lea eax, [ebx + 0x10]
call fcn.00411824
mov dword [esp + 0x20], eax
cmp dword [esp + 0x20], 0xffffffff
je 0x412fb5
mov edx, dword [esp + 0x20]
add edx, 4
mov ecx, 1
mov eax, ebx
call fcn.004126ac
jmp 0x41291d
mov edx, dword [ebx + 0x55b0]
inc dword [ebx + 0x55b0]
mov ecx, dword [ebx + 0x5758]
mov eax, esi
mov byte [ecx + edx], al
jmp 0x41291d
lea edx, [ebx + 0x4c60]
mov eax, ebx
call fcn.00412754
cmp eax, 0x100
jge 0x412b53
mov edx, dword [ebx + 0x55b0]
inc dword [ebx + 0x55b0]
mov ecx, dword [ebx + 0x5758]
lea edx, [ecx + edx]
push edx
pop ecx
mov byte [ecx], al
jmp 0x41291d
cmp eax, 0x10f
jl 0x412d55
sub eax, 0x10f
xor edx, edx
movzx edi, byte [eax + 0x41579c]
add edi, 3
mov dl, byte [eax + 0x4157b8]
test edx, edx
jbe 0x412bce
mov eax, dword [ebx + 8]
mov ecx, dword [ebx]
mov esi, dword [ebx]
movzx eax, byte [eax + ecx]
mov ecx, dword [ebx + 8]
shl eax, 0x10
movzx ecx, byte [ecx + esi + 1]
shl ecx, 8
mov esi, dword [ebx]
or eax, ecx
mov ecx, dword [ebx + 8]
movzx ecx, byte [ecx + esi + 2]
or eax, ecx
mov ecx, 8
sub ecx, dword [ebx + 4]
shr eax, cl
mov ecx, 0x10
and eax, 0xffff
sub ecx, edx
shr eax, cl
add eax, edi
mov edi, eax
mov eax, edx
add eax, dword [ebx + 4]
mov edx, eax
sar edx, 3
add dword [ebx], edx
and eax, 7
mov dword [ebx + 4], eax
lea edx, [ebx + 0x5190]
mov eax, ebx
call fcn.00412754
mov esi, dword [eax*4 + 0x41c2cc]
xor edx, edx
mov dl, byte [eax + 0x41c3bc]
inc esi
test edx, edx
jbe 0x412cf5
cmp eax, 9
jle 0x412ca2
cmp edx, 4
jbe 0x412c5a
mov eax, dword [ebx + 8]
mov ecx, dword [ebx]
mov ebp, dword [ebx]
movzx eax, byte [eax + ecx]
mov ecx, dword [ebx + 8]
shl eax, 0x10
movzx ecx, byte [ecx + ebp + 1]
shl ecx, 8
mov ebp, dword [ebx]
or eax, ecx
mov ecx, dword [ebx + 8]
movzx ecx, byte [ecx + ebp + 2]
or eax, ecx
mov ecx, 8
sub ecx, dword [ebx + 4]
shr eax, cl
mov ecx, 0x14
and eax, 0xffff
sub ecx, edx
shr eax, cl
shl eax, 4
add esi, eax
mov eax, edx
sub eax, 4
add eax, dword [ebx + 4]
mov edx, eax
sar edx, 3
add dword [ebx], edx
and eax, 7
mov dword [ebx + 4], eax
cmp dword [ebx + 0x577c], 0
jle 0x412c74
dec dword [ebx + 0x577c]
add esi, dword [ebx + 0x5778]
jmp 0x412cf5
lea edx, [ebx + 0x5304]
mov eax, ebx
call fcn.00412754
cmp eax, 0x10
jne 0x412c98
mov dword [ebx + 0x577c], 0xf
add esi, dword [ebx + 0x5778]
jmp 0x412cf5
add esi, eax
mov dword [ebx + 0x5778], eax
jmp 0x412cf5
mov ecx, dword [ebx + 8]
mov eax, dword [ebx]
mov ebp, dword [ebx]
movzx eax, byte [ecx + eax]
mov ecx, dword [ebx + 8]
shl eax, 0x10
movzx ecx, byte [ecx + ebp + 1]
shl ecx, 8
mov ebp, dword [ebx]
or eax, ecx
mov ecx, dword [ebx + 8]
movzx ecx, byte [ecx + ebp + 2]
or eax, ecx
mov ecx, 8
sub ecx, dword [ebx + 4]
shr eax, cl
mov ecx, 0x10
and eax, 0xffff
sub ecx, edx
shr eax, cl
add esi, eax
mov eax, edx
add eax, dword [ebx + 4]
mov edx, eax
sar edx, 3
add dword [ebx], edx
and eax, 7
mov dword [ebx + 4], eax
cmp esi, 0x2000
jb 0x412d07
inc edi
cmp esi, 0x40000
jb 0x412d07
inc edi
mov edx, dword [ebx + 0x559c]
mov eax, esi
mov dword [ebx + 0x55a0], edx
mov ebp, edi
mov ecx, dword [ebx + 0x5598]
mov dword [ebx + 0x559c], ecx
mov ecx, esi
mov edx, dword [ebx + 0x5594]
mov dword [ebx + 0x5598], edx
mov dword [ebx + 0x5594], eax
mov edx, esi
mov eax, ebp
mov dword [ebx + 0x55a8], edx
mov dword [ebx + 0x55ac], eax
mov eax, ebx
mov edx, ebp
call fcn.004126ac
jmp 0x41291d
cmp eax, 0x100
jne 0x412d70
mov eax, ebx
call fcn.00412fc4
test al, al
je 0x412fb5
jmp 0x41291d
cmp eax, 0x101
jne 0x412d8b
mov eax, ebx
call fcn.00413078
test al, al
je 0x412fb5
jmp 0x41291d
cmp eax, 0x102
jne 0x412db7
cmp dword [ebx + 0x55ac], 0
je 0x41291d
mov ecx, dword [ebx + 0x55a8]
mov edx, dword [ebx + 0x55ac]
mov eax, ebx
call fcn.004126ac
jmp 0x41291d
cmp eax, 0x107
jge 0x412ec2
add eax, 0xfffffefd
mov dword [esp + 0x24], eax
mov edx, dword [esp + 0x24]
mov esi, dword [ebx + edx*4 + 0x5594]
mov eax, dword [esp + 0x24]
test eax, eax
jle 0x412df1
mov edx, dword [ebx + eax*4 + 0x5590]
mov dword [ebx + eax*4 + 0x5594], edx
dec eax
test eax, eax
jg 0x412dde
mov dword [ebx + 0x5594], esi
lea edx, [ebx + 0x53cc]
mov eax, ebx
call fcn.00412754
mov dword [esp + 0x28], eax
xor eax, eax
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x28]
movzx edx, byte [edx + 0x4157b8]
mov al, byte [ecx + 0x41579c]
add eax, 2
test edx, edx
jbe 0x412e96
mov ecx, dword [ebx + 8]
mov edi, dword [ebx]
movzx ecx, byte [ecx + edi]
shl ecx, 0x10
mov dword [esp + 0x2c], ecx
mov ecx, dword [ebx + 8]
mov edi, dword [ebx]
movzx ecx, byte [ecx + edi + 1]
shl ecx, 8
or dword [esp + 0x2c], ecx
mov ecx, dword [ebx + 8]
mov edi, dword [ebx]
movzx ecx, byte [ecx + edi + 2]
or dword [esp + 0x2c], ecx
mov ecx, 8
sub ecx, dword [ebx + 4]
shr dword [esp + 0x2c], cl
mov edi, dword [esp + 0x2c]
mov ecx, 0x10
sub ecx, edx
mov dword [esp + 0x30], edx
mov edx, dword [ebx + 4]
and edi, 0xffff
add dword [esp + 0x30], edx
shr edi, cl
mov edx, dword [esp + 0x30]
add edi, eax
sar edx, 3
mov eax, edi
add dword [ebx], edx
mov ecx, dword [esp + 0x30]
and ecx, 7
mov dword [ebx + 4], ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], esi
mov edx, dword [esp + 0x38]
mov dword [ebx + 0x55a8], edx
mov edx, eax
mov ecx, dword [esp + 0x34]
mov eax, ebx
mov dword [ebx + 0x55ac], ecx
mov ecx, esi
call fcn.004126ac
jmp 0x41291d
cmp eax, 0x110
jge 0x41291d
sub eax, 0x107
xor edx, edx
movzx esi, byte [eax + 0x415820]
inc esi
mov dl, byte [eax + 0x415828]
test edx, edx
jbe 0x412f53
mov eax, dword [ebx + 8]
mov ecx, dword [ebx]
movzx eax, byte [eax + ecx]
shl eax, 0x10
mov dword [esp + 0x3c], eax
mov eax, dword [ebx]
mov ecx, dword [ebx + 8]
movzx ecx, byte [ecx + eax + 1]
shl ecx, 8
or dword [esp + 0x3c], ecx
mov ecx, dword [ebx]
mov eax, dword [ebx + 8]
movzx eax, byte [eax + ecx + 2]
or dword [esp + 0x3c], eax
mov ecx, 8
sub ecx, dword [ebx + 4]
shr dword [esp + 0x3c], cl
mov eax, dword [esp + 0x3c]
mov ecx, 0x10
sub ecx, edx
and eax, 0xffff
shr eax, cl
mov dword [esp + 0x40], edx
add esi, eax
mov edx, dword [ebx + 4]
add dword [esp + 0x40], edx
mov eax, dword [esp + 0x40]
sar eax, 3
add dword [ebx], eax
mov edx, dword [esp + 0x40]
and edx, 7
mov dword [ebx + 4], edx
mov dword [esp + 0x44], esi
mov ecx, dword [ebx + 0x559c]
mov dword [ebx + 0x55a0], ecx
mov eax, dword [ebx + 0x5598]
mov dword [ebx + 0x559c], eax
mov edx, dword [ebx + 0x5594]
mov dword [ebx + 0x5598], edx
mov edx, 2
mov ecx, dword [esp + 0x44]
mov dword [ebx + 0x5594], ecx
mov dword [esp + 0x48], esi
mov eax, dword [esp + 0x48]
mov ecx, esi
mov dword [ebx + 0x55a8], eax
mov eax, ebx
mov dword [ebx + 0x55ac], 2
call fcn.004126ac
jmp 0x41291d
mov eax, ebx
call fcn.00413998
add esp, 0x4c
pop ebp
pop edi
pop esi
pop ebx
ret