Function at 0x4d29c0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x1c
mov eax, dword [0x57f7c4]
xor eax, esp
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x30]
mov ecx, dword [eax + 0xa0]
cmp ecx, 1
push ebx
push ebp
push edi
jl 0x4d29e8
cmp ecx, 0xf
jle 0x4d2ae3
cmp ecx, 0x16
je 0x4d2ae3
cmp ecx, 0x17
je 0x4d2ae3
cmp ecx, 0x19
je 0x4d2ae3
movzx ecx, byte [eax + 0x4a]
lea eax, [ecx - 1]
cmp eax, 8
ja case.default.0x4d2a13
jmp dword [eax*4 + 0x4d2c94]
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov byte [esp + 0x14], al
call fcn.0051bd66
cdq
mov ecx, 9
idiv ecx
mov byte [esp + edx + 0xc], 0xff
jmp 0x4d2bc5
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov byte [esp + 0x14], al
lea ecx, [ecx]
mov byte [esp + eax + 0x18], al
inc eax
cmp eax, 9
jl 0x4d2a50
xor ebx, ebx
test ecx, ecx
jle 0x4d2bc5
lea edi, [esp + 0x20]
mov ebp, 9
mov edx, edi
sub ebp, edx
call fcn.0051bd66
cdq
lea ecx, [edi + ebp]
idiv ecx
mov cl, byte [edi]
inc ebx
dec edi
lea eax, [esp + edx + 0x18]
movzx edx, byte [eax]
mov byte [esp + edx + 0xc], 0xff
mov edx, dword [esi + 0x30]
mov byte [eax], cl
movzx eax, byte [edx + 0x4a]
cmp ebx, eax
jl 0x4d2a71
jmp 0x4d2bc5
or eax, 0xffffffff
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov byte [esp + 0x14], al
call fcn.0051bd66
cdq
mov ecx, 9
idiv ecx
mov byte [esp + edx + 0xc], 0
jmp 0x4d2bc5
or eax, 0xffffffff
mov dword [esp + 0x10], eax
mov byte [esp + 0x14], al
jmp 0x4d2bc1
xor eax, eax
mov dword [esp + 0x10], eax
mov byte [esp + 0x14], al
jmp 0x4d2bc1
movzx ecx, byte [eax + 0x4a]
lea eax, [ecx - 1]
cmp eax, 5
ja case.0x4d2af3.6
jmp dword [eax*4 + 0x4d2cb8]
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov byte [esp + 0x14], al
call fcn.0051bd66
cdq
mov ecx, 6
idiv ecx
mov byte [esp + edx + 0xc], 0xff
jmp 0x4d2bc5
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov byte [esp + 0x14], al
lea ecx, [ecx]
mov byte [esp + eax + 0x18], al
inc eax
cmp eax, 6
jl 0x4d2b30
xor ebx, ebx
test ecx, ecx
jle 0x4d2bc5
lea edi, [esp + 0x1d]
mov ebp, 6
mov edx, edi
sub ebp, edx
call fcn.0051bd66
cdq
lea ecx, [edi + ebp]
idiv ecx
mov cl, byte [edi]
inc ebx
dec edi
lea eax, [esp + edx + 0x18]
movzx edx, byte [eax]
mov byte [esp + edx + 0xc], 0xff
mov edx, dword [esi + 0x30]
mov byte [eax], cl
movzx eax, byte [edx + 0x4a]
cmp ebx, eax
jl 0x4d2b51
jmp 0x4d2bc5
or eax, 0xffffffff
mov dword [esp + 0xc], eax
mov word [esp + 0x10], ax
mov byte [esp + 0x12], 0
mov byte [esp + 0x13], 0
mov byte [esp + 0x14], 0
call fcn.0051bd66
cdq
mov ecx, 6
idiv ecx
mov byte [esp + edx + 0xc], 0
jmp 0x4d2bc5
or eax, 0xffffffff
mov byte [esp + 0x14], 0
mov byte [esp + 0x13], 0
mov byte [esp + 0x12], 0
mov word [esp + 0x10], ax
mov dword [esp + 0xc], eax
xor edi, edi
lea ebp, [esi + 0x84]
lea ecx, [ecx]
cmp byte [esp + edi + 0xc], 0xff
jne 0x4d2c4e
call fcn.0051bd66
mov edx, dword [esi + 0x30]
movzx ecx, word [edx + 0x3e]
cdq
inc ecx
idiv ecx
mov bl, dl
call fcn.0051bd66
mov edx, dword [esi + 0x30]
movzx ecx, word [edx + 0x3e]
inc ecx
cdq
idiv ecx
cmp bl, dl
jb 0x4d2bff
mov bl, dl
cmp dword [esp + 0x2c], 0
jne 0x4d2c1c
call fcn.0051bd66
mov edx, dword [esi + 0x30]
movzx ecx, word [edx + 0x3e]
inc ecx
cdq
idiv ecx
cmp bl, dl
jb 0x4d2c1c
mov bl, dl
movzx dx, bl
mov word [ebp], dx
movzx eax, bl
cdq
mov ecx, 0xa
idiv ecx
movzx ecx, word [edi*2 + 0x581c74]
add al, 0x30
mov byte [ecx + esi + 0x4c], al
movzx eax, word [edi*2 + 0x581c74]
add dl, 0x30
mov byte [eax + esi + 0x4d], dl
jmp 0x4d2c6e
xor ecx, ecx
mov word [ebp], cx
movzx edx, word [edi*2 + 0x581c74]
mov byte [edx + esi + 0x4c], 0x30
movzx eax, word [edi*2 + 0x581c74]
mov byte [eax + esi + 0x4d], 0x30
inc edi
add ebp, 2
cmp edi, 9
jl 0x4d2bd0
mov ecx, dword [esp + 0x24]
pop edi
pop ebp
pop ebx
xor ecx, esp
mov byte [esi + 0x60], 0
call fcn.0051a8be
add esp, 0x1c
ret 4