Function at 0x421d30
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push esi
mov eax, dword [ebp + 8]
mov ecx, dword [0x661ec0]
mov edx, dword [ecx + eax*4]
mov dword [ebp - 0x24], edx
mov eax, dword [ebp + 8]
mov ecx, dword [0x661ebc]
mov edx, dword [ecx + eax*4]
mov dword [ebp - 0x30], edx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x24]
add edx, 0x18
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x30]
add eax, 0x18
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx + 0x14]
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x14]
mov dword [ebp - 0x28], ecx
xor edx, edx
mov word [ebp - 4], dx
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0x10]
je 0x421ddf
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x1c]
movzx eax, word [edx + ecx*2]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x2c]
movzx ecx, word [edx + ecx*2]
cmp eax, ecx
jne 0x421ddf
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
movzx ecx, word [eax + edx*2]
and ecx, 0xf8ff
movzx edx, cx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x28]
movzx eax, word [ecx + eax*2]
and eax, 0xf8ff
movzx ecx, ax
cmp edx, ecx
jne 0x421ddf
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
jmp 0x421d8b
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0x10]
jne 0x421df9
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx]
and edx, 0xfffffffe
mov eax, dword [ebp - 0x24]
mov dword [eax], edx
jmp 0x42209d
mov dword [ebp - 0x38], 0
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x1c]
movzx eax, word [edx + ecx*2 - 2]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x2c]
movzx ecx, word [edx + ecx*2 - 2]
cmp eax, ecx
jne 0x421e9f
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x18]
movzx ecx, word [eax + edx*2 - 2]
and ecx, 0xf8ff
movzx edx, cx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x28]
movzx eax, word [ecx + eax*2 - 2]
and eax, 0xf8ff
movzx ecx, ax
cmp edx, ecx
jne 0x421e9f
mov edx, dword [ebp - 0x10]
sub edx, 1
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x1c]
movzx edx, word [ecx + eax*2]
cmp edx, 0x20
jne 0x421e93
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x18]
movzx edx, word [ecx + eax*2]
movzx eax, word [ebp - 4]
cmp edx, eax
je 0x421e7c
mov dword [ebp - 0x34], 1
jmp 0x421e83
mov dword [ebp - 0x34], 0
mov ecx, dword [ebp - 0x34]
and ecx, 0xf8ff
movzx edx, cx
test edx, edx
je 0x421e9a
mov dword [ebp - 0x38], 1
jmp 0x421e00
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x38], 0
jne 0x421f04
cmp dword [0x59c42c], 1
jne 0x421f04
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebp - 0xc]
je 0x421ef3
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
movzx ecx, word [eax + edx*2 - 2]
cmp ecx, 0x20
jne 0x421ef3
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
movzx ecx, word [eax + edx*2 - 2]
and ecx, 0xf8ff
movzx edx, cx
movzx eax, word [ebp - 4]
cmp edx, eax
jne 0x421ef3
mov ecx, dword [ebp - 0x14]
sub ecx, 1
mov dword [ebp - 0x14], ecx
jmp 0x421eb4
mov edx, dword [ebp - 0x10]
sub edx, dword [ebp - 0x14]
cmp edx, 3
jg 0x421f04
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0xc]
sub ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.0041de20
add esp, 8
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x14]
jge 0x421ff5
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x18]
movzx ecx, word [eax + edx*2]
and ecx, 0xf8ff
mov word [ebp - 8], cx
mov edx, dword [ebp - 0x20]
cmp edx, dword [ebp - 0x14]
jge 0x421f6b
movzx eax, word [ebp - 8]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x18]
movzx ecx, word [edx + ecx*2]
and ecx, 0xf8ff
movzx edx, cx
cmp eax, edx
jne 0x421f6b
mov eax, dword [ebp - 0x20]
add eax, 1
mov dword [ebp - 0x20], eax
jmp 0x421f3d
movzx ecx, word [ebp - 8]
mov edx, 8
imul eax, edx, 0x34
movzx edx, word [eax + 0x662680]
and edx, 0xe0
xor ecx, edx
push ecx
call dword [0x59ce34]
add esp, 4
jmp 0x421f9b
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp - 0x20]
jge 0x421ff0
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x1c]
movzx ecx, word [eax + edx*2]
push ecx
call dword [0x59ce18]
add esp, 4
mov edx, dword [0x59c444]
add edx, 1
mov dword [0x59c444], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0xc]
mov esi, dword [ebp - 0x1c]
mov dx, word [esi + edx*2]
mov word [ecx + eax*2], dx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0xc]
mov esi, dword [ebp - 0x18]
mov dx, word [esi + edx*2]
mov word [ecx + eax*2], dx
jmp 0x421f92
jmp 0x421f17
push 0
call dword [0x59ce34]
add esp, 4
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x10]
je 0x422090
call dword [0x59ce28]
jmp 0x42201d
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebp - 0x10]
jge 0x422090
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x2c]
movzx edx, word [ecx + eax*2]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x1c]
movzx eax, word [ecx + eax*2]
cmp edx, eax
jne 0x422066
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x28]
movzx eax, word [edx + ecx*2]
and eax, 0xf8ff
movzx ecx, ax
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
movzx edx, word [eax + edx*2]
and edx, 0xf8ff
movzx eax, dx
cmp ecx, eax
je 0x42207a
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0xc]
mov esi, dword [ebp - 0x18]
mov ax, word [esi + eax*2]
mov word [edx + ecx*2], ax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0xc]
mov esi, dword [ebp - 0x1c]
mov ax, word [esi + eax*2]
mov word [edx + ecx*2], ax
jmp 0x422014
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx]
and edx, 0xffffffee
mov eax, dword [ebp - 0x24]
mov dword [eax], edx
pop esi
mov esp, ebp
pop ebp
ret