Function at 0x417cc8
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push edi
mov edi, ecx
mov dword [ebp - 0x24], edx
xor ebx, ebx
mov dword [ebp - 0x20], edi
cmp dword [edi + 0x3bd0c], ebx
je 0x417cee
push dword [edi + 0x18]
call dword [edi]
pop ecx
mov dword [edi + 0x3bd0c], ebx
cmp dword [edi + 0x3bcfc], ebx
je 0x417d01
mov eax, dword [edi + 0x3bd04]
jmp 0x4182ac
mov ecx, edi
call fcn.004178a4
test eax, eax
jne 0x4182ac
mov ebx, dword [edi + 0x3bcf0]
mov eax, ebx
or eax, dword [edi + 0x3bcf4]
push esi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
jne 0x417da0
push dword [edi + 0x18]
call dword [edi + 8]
pop ecx
mov ecx, edi
test eax, eax
je 0x4182a4
lea edx, [ebp - 0x1c]
call fcn.00416285
mov eax, dword [edi + 0x3194c]
lea esi, [edi + 0x3bcb0]
shl eax, 5
lea edx, [edi + 0x325b0]
push 0
add edx, eax
mov ecx, esi
call fcn.00415e2b
mov eax, dword [edi + 0x3194c]
mov eax, dword [eax*4 + 0x4d48b0]
mov dword [edi + 0x3194c], eax
mov eax, dword [edi + 0x31938]
neg eax
push eax
push dword [edi + 0x18]
call dword [edi + 4]
mov edx, dword [edi + 0x325ac]
mov ecx, esi
movzx eax, al
push eax
call fcn.00415e80
add esp, 0x10
dec dword [edi + 0x31938]
inc ebx
mov dword [ebp - 0x14], ebx
push dword [edi + 0x18]
call dword [edi + 8]
pop ecx
test eax, eax
je 0x418290
cmp dword [edi + 0x3bca8], 0
mov ecx, edi
je 0x417dc4
lea edx, [ebp - 0x10]
call fcn.0041750f
jmp 0x417dd0
lea eax, [ebp - 0x10]
mov edx, ebx
push eax
call fcn.004164e3
pop ecx
mov esi, dword [ebp - 0x10]
mov edx, ebx
and edx, dword [edi + 0x325a8]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], edx
cmp eax, 1
jne 0x417ee0
cmp esi, 0xffffffff
jne 0x417ee0
mov eax, dword [edi + 0x3194c]
lea ecx, [edi + 0x3bcb0]
add edx, 0x192d8
shl eax, 4
add eax, edx
mov dword [ebp - 0xc], ecx
push 0
lea edx, [edi + eax*2]
call fcn.00415e2b
push dword [edi + 0x18]
call dword [edi + 0xc]
mov esi, eax
sub esi, dword [edi + 0x31938]
pop ecx
pop ecx
push 8
mov al, byte [esi]
movzx edx, byte [esi - 1]
mov byte [ebp - 1], al
mov eax, dword [edi + 0x325a4]
pop ecx
sub cl, byte [edi + 0x32598]
and eax, ebx
shr edx, cl
mov ecx, dword [edi + 0x32598]
shl eax, cl
add edx, eax
imul edx, edx, 0x600
add edx, dword [edi + 0x325ac]
cmp dword [edi + 0x3194c], 7
mov dword [ebp - 0x1c], edx
jae 0x417e78
movzx eax, byte [ebp - 1]
lea ecx, [edi + 0x3bcb0]
push eax
call fcn.00415e80
pop ecx
jmp 0x417ece
sub esi, dword [edi + 0x3193c]
mov ecx, 0x100
mov ebx, ecx
movzx edi, byte [esi - 1]
movzx esi, byte [ebp - 1]
or esi, ecx
mov eax, esi
add edi, edi
shr eax, 7
mov ecx, ebx
and eax, 1
and ecx, edi
push eax
mov eax, esi
add ecx, ebx
shr eax, 8
add eax, ecx
mov ecx, dword [ebp - 0xc]
lea edx, [edx + eax*2]
call fcn.00415e2b
mov edx, dword [ebp - 0x1c]
add esi, esi
mov eax, esi
xor eax, edi
not eax
and ebx, eax
pop ecx
cmp esi, 0x10000
jb 0x417e8f
mov edi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x14]
mov eax, dword [edi + 0x3194c]
mov eax, dword [eax*4 + 0x4d48b0]
jmp 0x418075
mov eax, dword [edi + 0x3194c]
lea ecx, [edi + 0x3bcb0]
add edx, 0x192d8
shl eax, 4
add edx, eax
push 1
lea edx, [edi + edx*2]
call fcn.00415e2b
pop ecx
lea ecx, [edi + 0x3bcb0]
cmp esi, 4
jae 0x418080
mov edx, dword [edi + 0x3194c]
add edx, 0x19398
push 1
lea edx, [edi + edx*2]
call fcn.00415e2b
mov edx, dword [edi + 0x3194c]
add edx, 0x193a4
pop ecx
lea edx, [edi + edx*2]
test esi, esi
jne 0x417f76
push esi
lea esi, [edi + 0x3bcb0]
mov ecx, esi
call fcn.00415e2b
mov edx, dword [edi + 0x3194c]
xor eax, eax
cmp dword [ebp - 8], 1
mov ecx, esi
setne al
shl edx, 4
add edx, 0x193c8
add edx, dword [ebp - 0xc]
push eax
lea edx, [edi + edx*2]
call fcn.00415e2b
pop ecx
pop ecx
jmp 0x418027
mov eax, dword [edi + esi*4 + 0x3193c]
lea ecx, [edi + 0x3bcb0]
push 1
mov dword [ebp - 0x1c], eax
call fcn.00415e2b
pop ecx
cmp esi, 1
jne 0x417fb4
mov edx, dword [edi + 0x3194c]
lea esi, [edi + 0x3bcb0]
add edx, 0x193b0
mov ecx, esi
push 0
lea edx, [edi + edx*2]
call fcn.00415e2b
pop ecx
jmp 0x418012
mov eax, dword [edi + 0x3194c]
lea ecx, [edi + 0x3bcb0]
add eax, 0x193b0
push 1
lea edx, [edi + eax*2]
call fcn.00415e2b
mov edx, dword [edi + 0x3194c]
lea eax, [esi - 2]
add edx, 0x193bc
lea ecx, [edi + 0x3bcb0]
push eax
lea edx, [edi + edx*2]
call fcn.00415e2b
pop ecx
pop ecx
cmp esi, 3
jne 0x418000
mov eax, dword [edi + 0x31944]
mov dword [edi + 0x31948], eax
mov eax, dword [edi + 0x31940]
lea esi, [edi + 0x3bcb0]
mov dword [edi + 0x31944], eax
mov eax, dword [edi + 0x3193c]
mov dword [edi + 0x31940], eax
mov eax, dword [ebp - 0x1c]
mov dword [edi + 0x3193c], eax
mov ecx, dword [ebp - 8]
cmp ecx, 1
jne 0x41803e
mov eax, dword [edi + 0x3194c]
mov eax, dword [eax*4 + 0x4d4880]
jmp 0x418075
lea eax, [edi + 0x30ea0]
mov edx, esi
push eax
xor eax, eax
cmp dword [edi + 0x3bca8], eax
sete al
push eax
push dword [ebp - 0xc]
lea eax, [ecx - 2]
push eax
lea ecx, [edi + 0x3745c]
call fcn.004161d9
mov eax, dword [edi + 0x3194c]
add esp, 0x10
mov eax, dword [eax*4 + str._b_b_b_b_b_b_b_v_v_v_v_v_a_a_a_a_a_a_a_n_n_n_n_n_t_t_t_t_t_t_t_v_v_v_v_v]
mov dword [edi + 0x3194c], eax
jmp 0x4181e7
mov eax, dword [edi + 0x3194c]
add eax, 0x19398
push 0
lea edx, [edi + eax*2]
call fcn.00415e2b
mov eax, dword [edi + 0x3194c]
lea ecx, [edi + 0x32c14]
lea edx, [edi + 0x3bcb0]
mov eax, dword [eax*4 + 0x4d4850]
mov dword [edi + 0x3194c], eax
lea eax, [edi + 0x30ea0]
push eax
xor eax, eax
cmp dword [edi + 0x3bca8], eax
sete al
push eax
mov eax, dword [ebp - 8]
push dword [ebp - 0xc]
add eax, 0xfffffffe
push eax
call fcn.004161d9
sub esi, 4
add esp, 0x14
mov dword [ebp - 0x10], esi
cmp esi, 0x80
jae 0x4180f1
movzx eax, byte [esi + edi + 0x306a0]
jmp 0x418112
mov ecx, 0x1ffff
mov eax, esi
sub ecx, esi
shr ecx, 0x1f
neg ecx
and ecx, 0xa
add ecx, 6
shr eax, cl
movzx eax, byte [eax + edi + 0x306a0]
lea eax, [eax + ecx*2]
mov edx, dword [ebp - 8]
cmp edx, 5
push eax
push 6
mov dword [ebp - 0x14], eax
lea eax, [edx - 2]
push 3
pop ecx
cmovb ecx, eax
shl ecx, 7
lea edx, [ecx + 0x32910]
add edx, edi
lea ecx, [edi + 0x3bcb0]
call fcn.00415f64
mov edx, dword [ebp - 0x14]
pop ecx
pop ecx
cmp edx, 4
jb 0x4181b7
mov ecx, edx
mov dword [ebp - 0xc], esi
mov eax, edx
shr ecx, 1
and eax, 1
dec ecx
or eax, 2
shl eax, cl
sub dword [ebp - 0xc], eax
cmp edx, 0xe
jae 0x41817f
push dword [ebp - 0xc]
sub eax, edx
push ecx
lea ecx, [edi + 0x3bcb0]
lea edx, [eax + 0x19587]
lea edx, [edi + edx*2]
call fcn.00415fa8
pop ecx
pop ecx
jmp 0x4181b7
mov edx, dword [ebp - 0xc]
lea eax, [ecx - 4]
push eax
shr edx, 4
lea ecx, [edi + 0x3bcb0]
call fcn.00415de1
mov eax, dword [ebp - 0xc]
lea edx, [edi + 0x32bf4]
and eax, 0xf
lea ecx, [edi + 0x3bcb0]
push eax
push 4
call fcn.00415fa8
add esp, 0xc
inc dword [edi + 0x32590]
mov eax, dword [edi + 0x31944]
mov dword [edi + 0x31948], eax
mov eax, dword [edi + 0x31940]
mov dword [edi + 0x31944], eax
mov eax, dword [edi + 0x3193c]
mov dword [edi + 0x31940], eax
mov dword [edi + 0x3193c], esi
inc dword [edi + 0x3bcf8]
mov eax, dword [ebp - 8]
add ebx, eax
sub dword [edi + 0x31938], eax
cmp dword [edi + 0x31938], 0
mov dword [ebp - 0x14], ebx
jne 0x417daf
cmp dword [edi + 0x3bca8], 0
jne 0x41822e
cmp dword [edi + 0x3bcf8], 0x80
jb 0x41821e
mov ecx, edi
call fcn.0041798b
cmp dword [edi + 0x32590], 0x10
jb 0x41822e
mov ecx, edi
call fcn.00417933
push dword [edi + 0x18]
call dword [edi + 8]
pop ecx
test eax, eax
je 0x418290
mov esi, dword [ebp - 0x18]
mov eax, ebx
sub eax, esi
cmp dword [ebp - 0x24], 0
je 0x4182b2
add eax, 0x112c
cmp eax, dword [ebp + 0xc]
jae 0x418290
mov eax, dword [edi + 0x3bcc8]
sub eax, dword [edi + 0x3bcd0]
cdq
add eax, dword [edi + 0x3bcd8]
adc edx, dword [edi + 0x3bcdc]
add eax, dword [edi + 0x3bcc0]
adc edx, dword [edi + 0x3bcc4]
add eax, 0x2000
adc edx, 0
test edx, edx
ja 0x418290
jb 0x417daf
cmp eax, dword [ebp + 8]
jb 0x417daf
mov eax, ebx
mov ecx, edi
sub eax, dword [ebp - 0x18]
add dword [edi + 0x3bcf0], eax
adc dword [edi + 0x3bcf4], 0
mov edx, ebx
call fcn.004178e8
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0x8000
jb 0x417daf
sub ebx, esi
mov ecx, edi
add dword [edi + 0x3bcf0], ebx
adc dword [edi + 0x3bcf4], 0
call fcn.004178a4
jmp 0x4182ab