Function at 0x10032980
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc8
mov eax, dword [0x10129124]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
mov dword [ebp - 0xc8], eax
push esi
push edi
mov dword [ebp - 0xc4], edx
mov eax, dword [ebx]
mov dword [ebp - 0xc0], ebx
mov dword [eax + 8], 0
call fcn.10031c40
mov ecx, dword [ebx]
test eax, eax
jne 0x100329d1
mov edx, dword [ecx + 8]
mov ecx, ebx
push eax
call fcn.100312d0
jmp 0x10032ff4
mov edi, dword [ecx + 8]
mov dword [ebp - 0x90], edi
cmp edi, 3
jne 0x10032a0f
cmp dword [ebx + 0x47ec], edi
je 0x100329f9
cmp dword [ebx + 0x47e8], 0
jne 0x10032a0f
cmp dword [ebx + 0x47e4], 0
jne 0x10032a0f
xorps xmm0, xmm0
mov dword [ebp - 0xa0], 1
movups xmmword [ebp - 0xb8], xmm0
jmp 0x10032a31
mov dword [ebp - 0x90], edi
xorps xmm0, xmm0
mov dword [ebp - 0xa0], 0
movups xmmword [ebp - 0xb8], xmm0
test edi, edi
jle 0x10032b73
lea esi, [ebp - 0x80]
mov dword [ebp - 0x9c], 0
lea edx, [ebx + 0x46a0]
mov dword [ebp - 0x94], esi
mov dword [ebp - 0x98], edx
mov eax, dword [ebx]
mov eax, dword [eax]
add eax, 3
push eax
call fcn.100ba9bb
mov ecx, dword [ebp - 0x98]
add esp, 4
mov dword [ecx + 0x34], eax
test eax, eax
je 0x10032b47
mov eax, dword [ebx + 0x4684]
cdq
idiv dword [ecx]
mov dword [esi], eax
mov dword [ebp - 0xa4], eax
mov eax, dword [ebx + 0x4688]
cdq
idiv dword [ecx + 4]
mov edx, dword [ebp - 0x94]
mov esi, eax
mov eax, dword [ebp - 0xa4]
mov ecx, esi
dec eax
sar ecx, 1
mov dword [edx + 0xc], ecx
mov ecx, dword [ebx]
mov dword [edx + 4], esi
xor edx, edx
mov ecx, dword [ecx]
add eax, ecx
div dword [ebp - 0xa4]
mov ecx, dword [ebp - 0x94]
mov edx, dword [ebp - 0x98]
mov dword [ecx + 8], eax
mov eax, dword [edx + 0x28]
mov dword [ecx - 4], eax
mov dword [ecx - 8], eax
mov eax, dword [ebp - 0xa4]
mov dword [ecx + 0x10], 0
cmp eax, 1
jne 0x10032af4
cmp esi, eax
jne 0x10032ae8
mov eax, fcn.10003a80
jmp 0x10032b17
cmp esi, 2
jne 0x10032b12
mov eax, 0x10032020
jmp 0x10032b17
cmp eax, 2
jne 0x10032b12
cmp esi, 1
jne 0x10032b05
mov eax, 0x10032250
jmp 0x10032b17
cmp esi, 2
jne 0x10032b12
mov eax, dword [ebx + 0x4814]
jmp 0x10032b17
mov eax, 0x10032570
mov dword [ecx - 0xc], eax
add edx, 0x48
mov eax, dword [ebp - 0x9c]
add ecx, 0x20
inc eax
mov dword [ebp - 0x94], ecx
mov dword [ebp - 0x9c], eax
mov esi, ecx
mov dword [ebp - 0x98], edx
cmp eax, edi
jl 0x10032a50
mov ecx, dword [ebx]
jmp 0x10032b7d
mov edx, dword [ebx]
mov ecx, ebx
push 0
mov edx, dword [edx + 8]
call fcn.100312d0
mov ecx, dword [0x1012c888]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x100f9584
jmp 0x10032ff4
mov dword [ebp - 0xa0], 0
mov esi, dword [ecx + 4]
mov ecx, dword [ecx]
test ecx, ecx
js 0x10032fcd
je 0x10032bac
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x10032fcd
lea eax, [ecx*4]
test eax, eax
js 0x10032fcd
test esi, esi
js 0x10032fcd
je 0x10032bcd
mov eax, 0x7fffffff
cdq
idiv esi
lea edx, [ecx*4]
cmp edx, eax
jg 0x10032fcd
imul esi, ecx
shl esi, 2
lea eax, [esi + 1]
push eax
call fcn.100ba9bb
mov ecx, dword [ebx]
mov edx, eax
add esp, 4
mov dword [ebp - 0x94], edx
test edx, edx
je 0x10032fcf
xor esi, esi
mov dword [ebp - 0xa4], esi
cmp dword [ecx + 4], esi
jbe 0x10032f8e
mov dword [ebp - 0x94], edx
nop dword [eax + eax]
mov eax, dword [ecx]
imul eax, esi
mov dword [ebp - 0x9c], 0
lea esi, [edx + eax*4]
mov dword [ebp - 0x98], esi
test edi, edi
jle 0x10032d0c
lea edi, [ebx + 0x46bc]
mov ebx, dword [ebp - 0x90]
lea esi, [ebp - 0x74]
nop
mov eax, dword [ebp - 0x94]
mov edx, ebx
mov ecx, dword [ebp - 0xa0]
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x94], eax
mov eax, dword [esi - 8]
sar eax, 1
mov dword [ebp - 0xa8], ecx
mov dword [ebp - 0xa0], ecx
cmp dword [esi], eax
jl 0x10032c91
mov ebx, dword [ebp - 0x90]
mov eax, dword [esi - 0x10]
mov ecx, dword [esi - 0x14]
mov dword [ebp - 0x94], ebx
mov ebx, dword [ebp - 0xa8]
mov dword [ebp - 0xa0], ebx
mov ebx, edx
jmp 0x10032c97
mov eax, dword [esi - 0x14]
mov ecx, dword [esi - 0x10]
push dword [esi - 0xc]
push dword [esi - 4]
push ecx
push eax
push dword [edi + 0x18]
call dword [esi - 0x18]
mov ecx, dword [ebp - 0x9c]
add esp, 0x14
mov dword [ebp + ecx*4 - 0xb8], eax
mov eax, dword [esi]
inc eax
mov dword [esi], eax
cmp eax, dword [esi - 8]
jl 0x10032cdd
inc dword [esi + 4]
mov eax, dword [esi + 4]
mov edx, dword [esi - 0x10]
mov dword [esi], 0
mov dword [esi - 0x14], edx
cmp eax, dword [edi]
jge 0x10032cdd
mov eax, dword [edi + 4]
add eax, edx
mov dword [esi - 0x10], eax
inc ecx
add esi, 0x20
add edi, 0x48
mov dword [ebp - 0x9c], ecx
cmp ecx, ebx
jl 0x10032c40
mov esi, dword [ebp - 0x98]
mov dword [ebp - 0x90], ebx
mov ebx, dword [ebp - 0xc0]
mov edi, dword [ebp - 0x90]
mov ecx, dword [ebx]
mov eax, dword [ecx + 8]
cmp eax, 3
jne 0x10032da9
cmp dword [ebp - 0xa0], 0
je 0x10032d82
xor esi, esi
cmp dword [ecx], esi
jbe 0x10032f70
mov ecx, dword [ebp - 0x98]
mov edx, dword [ebp - 0xb4]
add ecx, 2
mov edi, dword [ebp - 0xb8]
mov eax, dword [ebp - 0xb0]
sub edi, edx
sub eax, edx
mov dword [ebp - 0xa8], eax
movzx eax, byte [edi + edx]
lea ecx, [ecx + 4]
mov byte [ecx - 6], al
lea edx, [edx + 1]
movzx eax, byte [edx - 1]
inc esi
mov byte [ecx - 5], al
mov eax, dword [ebp - 0xa8]
movzx eax, byte [eax + edx - 1]
mov byte [ecx - 4], al
mov byte [ecx - 3], 0xff
mov eax, dword [ebx]
cmp esi, dword [eax]
jb 0x10032d50
jmp 0x10032f6a
mov eax, dword [ebx + 0x4810]
push 4
push dword [ecx]
push dword [ebp - 0xb0]
push dword [ebp - 0xb4]
push dword [ebp - 0xb8]
push esi
call eax
add esp, 0x18
jmp 0x10032f70
cmp eax, 4
jne 0x10032f41
mov eax, dword [ebx + 0x47e8]
test eax, eax
jne 0x10032e81
mov dword [ebp - 0x9c], eax
cmp dword [ecx], eax
jbe 0x10032f70
mov edx, dword [ebp - 0xac]
add esi, 2
mov ecx, dword [ebp - 0xb4]
mov edi, edx
mov eax, dword [ebp - 0xb8]
sub ecx, edx
mov dword [ebp - 0xa8], ecx
sub eax, edx
mov ecx, dword [ebp - 0xb0]
sub ecx, edx
mov dword [ebp - 0xbc], eax
mov dword [ebp - 0x98], ecx
movzx ecx, byte [eax + edi]
lea esi, [esi + 4]
movzx edx, byte [edi]
lea edi, [edi + 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 6], al
mov eax, dword [ebp - 0xa8]
movzx ecx, byte [eax + edi - 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 5], al
mov eax, dword [ebp - 0x98]
movzx ecx, byte [eax + edi - 1]
imul ecx, edx
mov byte [esi - 3], 0xff
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
mov ecx, dword [ebp - 0x9c]
shr eax, 8
inc ecx
mov byte [esi - 4], al
mov eax, dword [ebx]
mov dword [ebp - 0x9c], ecx
cmp ecx, dword [eax]
mov eax, dword [ebp - 0xbc]
jb 0x10032e03
jmp 0x10032f6a
mov ecx, dword [ecx]
mov edx, dword [ebx + 0x4810]
push 4
push ecx
push dword [ebp - 0xb0]
push dword [ebp - 0xb4]
push dword [ebp - 0xb8]
push esi
cmp eax, 2
jne 0x10032f3a
call edx
mov eax, dword [ebx]
add esp, 0x18
mov dword [ebp - 0xbc], 0
cmp dword [eax], 0
jbe 0x10032f70
mov edi, dword [ebp - 0xbc]
add esi, 2
nop dword [eax + eax]
mov eax, dword [ebp - 0xac]
lea esi, [esi + 4]
movzx edx, byte [edi + eax]
inc edi
movzx eax, byte [esi - 6]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 6], al
movzx eax, byte [esi - 5]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 5], al
movzx eax, byte [esi - 4]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 4], al
mov eax, dword [ebx]
cmp edi, dword [eax]
jb 0x10032ed0
jmp 0x10032f6a
call edx
add esp, 0x18
jmp 0x10032f70
xor edx, edx
cmp dword [ecx], edx
jbe 0x10032f70
mov edi, dword [ebp - 0xb8]
lea ecx, [esi + 1]
mov al, byte [edx + edi]
lea ecx, [ecx + 4]
mov byte [ecx - 3], al
inc edx
mov byte [ecx - 4], al
mov byte [ecx - 5], al
mov byte [ecx - 2], 0xff
mov eax, dword [ebx]
cmp edx, dword [eax]
jb 0x10032f50
mov edi, dword [ebp - 0x90]
mov ecx, dword [ebx]
mov esi, dword [ebp - 0xa4]
mov edx, dword [ebp - 0x94]
inc esi
mov dword [ebp - 0xa4], esi
cmp esi, dword [ecx + 4]
jb 0x10032c10
mov edx, dword [ecx + 8]
mov ecx, ebx
push 0
call fcn.100312d0
mov ecx, dword [ebx]
add esp, 4
mov eax, dword [ebp - 0xc4]
mov ecx, dword [ecx]
mov dword [eax], ecx
mov ecx, dword [ebx]
mov eax, dword [ebp - 0xc8]
mov ecx, dword [ecx + 4]
mov dword [eax], ecx
mov eax, dword [ebp - 0x94]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.100af1bd
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebx]
mov edx, dword [ecx + 8]
mov ecx, ebx
push 0
call fcn.100312d0
mov ecx, dword [0x1012c888]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x100f9578
mov ecx, dword [ebp - 8]
add esp, 4
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.100af1bd
mov esp, ebp
pop ebp
ret