Function at 0x4974f0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 0x30
add esp, 0xfffff004
push eax
dec eax
jne 0x4974f9
mov eax, dword [ebp - 4]
add esp, 0xfffff9c4
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov ebx, eax
mov eax, dword [ebp - 8]
add eax, dword [ebp + 0x14]
add eax, dword [ebp + 0x10]
add eax, dword [ebp + 0xc]
add eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x497536
mov dword [ebp - 0xc], 1
xor esi, esi
lea edi, [ebp - 0x30040]
movzx edx, byte [ebx + 0x454]
mov eax, dword [ebx + 0x5c]
and eax, esi
call fcn.00493fe4
mov byte [edi], al
movzx ecx, byte [ebx + 0x45b]
mov eax, dword [ebx + 0x58]
and eax, esi
shr eax, cl
movzx edx, byte [ebx + 0x455]
call fcn.00493fe4
mov byte [edi + 1], al
movzx ecx, byte [ebx + 0x45c]
mov eax, dword [ebx + 0x54]
and eax, esi
shr eax, cl
movzx edx, byte [ebx + 0x456]
call fcn.00493fe4
mov byte [edi + 2], al
inc esi
add edi, 3
cmp esi, 0x10000
jne 0x49753e
xor esi, esi
lea edi, [ebp - 0x30640]
lea eax, [ebp - 0x30440]
lea edx, [ebp - 0x30240]
mov dword [ebp - 0x40], edx
movzx ecx, byte [ebx + 0x457]
mov edx, esi
shr edx, cl
mov word [edi], dx
movzx ecx, byte [ebx + 0x458]
mov edx, esi
shr edx, cl
movzx ecx, byte [ebx + 0x45b]
shl dx, cl
mov word [eax], dx
movzx ecx, byte [ebx + 0x459]
mov edx, esi
shr edx, cl
movzx ecx, byte [ebx + 0x45c]
shl dx, cl
mov ecx, dword [ebp - 0x40]
mov word [ecx], dx
inc esi
add dword [ebp - 0x40], 2
add eax, 2
add edi, 2
cmp esi, 0x100
jne 0x4975ae
mov eax, dword [ebx + 0x24]
mov dword [ebp - 0x34], eax
mov eax, dword [ebx + 0x1c]
dec eax
test eax, eax
jl 0x497866
inc eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 4]
mov edx, dword [ebx + 0x1c]
dec edx
cmp eax, edx
jle 0x497631
mov eax, dword [ebx + 0x1c]
dec eax
mov edx, dword [ebp - 0x18]
sub edx, dword [ebp - 4]
test edx, edx
jge 0x49763d
xor edx, edx
mov ecx, dword [ebx + 0x460]
mov edx, dword [ecx + edx*4]
mov dword [ebp - 0x1c], edx
mov edx, dword [ebx + 0x460]
mov eax, dword [edx + eax*4]
mov dword [ebp - 0x20], eax
mov eax, dword [ebx + 0x30]
dec eax
test eax, eax
jl 0x497851
inc eax
mov dword [ebp - 0x3c], eax
xor esi, esi
mov eax, dword [ebp - 4]
add eax, esi
mov edx, dword [ebx + 0x30]
dec edx
cmp eax, edx
jle 0x497676
mov eax, edx
mov edx, esi
sub edx, dword [ebp - 4]
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x10], 0
jge 0x497689
xor edx, edx
mov dword [ebp - 0x10], edx
mov edx, dword [ebp - 0x34]
movzx edx, word [edx]
lea edx, [edx + edx*2]
mov cx, word [ebp + edx - 0x30040]
mov word [ebp - 0x23], cx
mov cl, byte [ebp + edx - 0x3003e]
mov byte [ebp - 0x21], cl
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
movzx edx, word [edx + ecx*2]
lea edx, [edx + edx*2]
mov cx, word [ebp + edx - 0x30040]
mov word [ebp - 0x26], cx
mov cl, byte [ebp + edx - 0x3003e]
mov byte [ebp - 0x24], cl
mov edx, dword [ebp - 0x1c]
movzx edx, word [edx + eax*2]
lea edx, [edx + edx*2]
mov cx, word [ebp + edx - 0x30040]
mov word [ebp - 0x29], cx
mov cl, byte [ebp + edx - 0x3003e]
mov byte [ebp - 0x27], cl
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x10]
movzx edx, word [edx + ecx*2]
lea edx, [edx + edx*2]
mov cx, word [ebp + edx - 0x30040]
mov word [ebp - 0x2c], cx
mov cl, byte [ebp + edx - 0x3003e]
mov byte [ebp - 0x2a], cl
mov edx, dword [ebp - 0x20]
movzx eax, word [edx + eax*2]
lea eax, [eax + eax*2]
mov dx, word [ebp + eax - 0x30040]
mov word [ebp - 0x2f], dx
mov dl, byte [ebp + eax - 0x3003e]
mov byte [ebp - 0x2d], dl
movzx eax, byte [ebp - 0x23]
imul dword [ebp + 8]
movzx edx, byte [ebp - 0x26]
imul edx, dword [ebp - 8]
add eax, edx
movzx edx, byte [ebp - 0x29]
imul edx, dword [ebp + 0x14]
add eax, edx
movzx edx, byte [ebp - 0x2c]
imul edx, dword [ebp + 0x10]
add eax, edx
movzx edx, byte [ebp - 0x2f]
imul edx, dword [ebp + 0xc]
add eax, edx
cdq
idiv dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xff
jle 0x497775
mov eax, dword [ebx + 0x5c]
mov dword [ebp - 0x14], eax
jmp 0x497790
cmp dword [ebp - 0x14], 0
jge 0x497782
xor eax, eax
mov dword [ebp - 0x14], eax
jmp 0x497790
mov eax, dword [ebp - 0x14]
movzx eax, word [ebp + eax*2 - 0x30640]
mov dword [ebp - 0x14], eax
movzx eax, byte [ebp - 0x22]
imul dword [ebp + 8]
movzx edx, byte [ebp - 0x25]
imul edx, dword [ebp - 8]
add eax, edx
movzx edx, byte [ebp - 0x28]
imul edx, dword [ebp + 0x14]
add eax, edx
movzx edx, byte [ebp - 0x2b]
imul edx, dword [ebp + 0x10]
add eax, edx
movzx edx, byte [ebp - 0x2e]
imul edx, dword [ebp + 0xc]
add eax, edx
cdq
idiv dword [ebp - 0xc]
mov ecx, eax
cmp ecx, 0xff
jle 0x4977d2
mov ecx, dword [ebx + 0x58]
jmp 0x4977e4
test ecx, ecx
jge 0x4977da
xor ecx, ecx
jmp 0x4977e4
movzx eax, word [ebp + ecx*2 - 0x30440]
mov ecx, eax
movzx eax, byte [ebp - 0x21]
imul dword [ebp + 8]
movzx edx, byte [ebp - 0x24]
imul edx, dword [ebp - 8]
add eax, edx
movzx edx, byte [ebp - 0x27]
imul edx, dword [ebp + 0x14]
add eax, edx
movzx edx, byte [ebp - 0x2a]
imul edx, dword [ebp + 0x10]
add eax, edx
movzx edx, byte [ebp - 0x2d]
imul edx, dword [ebp + 0xc]
add eax, edx
cdq
idiv dword [ebp - 0xc]
cmp eax, 0xff
jle 0x497823
mov eax, dword [ebx + 0x54]
jmp 0x497833
test eax, eax
jge 0x49782b
xor eax, eax
jmp 0x497833
movzx eax, word [ebp + eax*2 - 0x30240]
movzx edx, word [ebp - 0x14]
or dx, cx
or dx, ax
mov eax, dword [ebp - 0x34]
mov word [eax], dx
add dword [ebp - 0x34], 2
inc esi
dec dword [ebp - 0x3c]
jne 0x497667
mov eax, dword [ebp - 0x34]
add eax, dword [ebx + 0x20]
mov dword [ebp - 0x34], eax
inc dword [ebp - 0x18]
dec dword [ebp - 0x38]
jne 0x49761f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10