Function at 0x100bd7f0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov edi, edx
mov dword [esp + 0x18], ecx
mov ecx, dword [edi + 0x114]
mov edx, dword [edi + 0x130]
mov esi, dword [edi + 0x110]
mov eax, dword [edi + 0x128]
mov ebp, dword [edi + 0x12c]
mov dword [esp + 0x1c], ecx
mov ecx, dword [edi + 0x1b4]
mov dword [esp + 0x28], ecx
mov ecx, 0x20
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], esi
sub ecx, dword [edi + 0xc]
jne 0x100bd86a
mov ebx, dword [edi + 0x14]
test ebx, ebx
je 0x100bda4b
mov edx, dword [edi + 0x10]
shr dword [edi + 8], 8
movzx ecx, byte [edx]
shl ecx, 0x18
or dword [edi + 8], ecx
lea ecx, [ebx - 1]
add dword [edi + 0xc], 0xfffffff8
mov dword [edi + 0x14], ecx
lea ecx, [edx + 1]
mov edx, dword [esp + 0x10]
mov dword [edi + 0x10], ecx
cmp eax, dword [esp + 0x18]
jae 0x100bda58
mov dword [esp + 0x24], esi
test edx, edx
je 0x100bda58
cmp dword [edi + 0x14], 2
jb 0x100bda29
mov ebx, dword [edi + 0xc]
cmp ebx, 0x10
jb 0x100bd8bb
mov edx, dword [edi + 0x10]
xor ebx, 0x10
movzx esi, word [edi + 0xa]
mov dword [edi + 8], esi
mov dword [edi + 0xc], ebx
movzx ecx, word [edx]
shl ecx, 0x10
or ecx, esi
add dword [edi + 0x14], 0xfffffffe
mov esi, dword [esp + 0x14]
mov dword [edi + 8], ecx
lea ecx, [edx + 2]
mov dword [edi + 0x10], ecx
mov edx, dword [edi + 8]
mov ecx, ebx
shr edx, cl
and edx, dword [0x1019e794]
movzx ecx, byte [edi + edx*4 + 0x134]
add ecx, ebx
mov dword [edi + 0xc], ecx
movzx ebx, word [edi + edx*4 + 0x136]
mov dword [esp + 0x20], ebx
cmp ebx, 0x10
jae 0x100bd931
xor ebp, ebp
test ebx, ebx
je 0x100bd927
mov ecx, dword [edi + ebx*4 + 0x758]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x1c], ebx
mov word [edx + ecx*2], ax
mov ecx, ebx
mov edx, 0x8000
mov dword [edi + ebx*4 + 0x758], eax
inc word [edi + ebx*2 + 0x7ea]
shr edx, cl
mov ecx, dword [esp + 0x10]
sub ecx, edx
inc eax
mov dword [esp + 0x10], ecx
jmp 0x100bda02
mov ecx, dword [esp + 0x10]
inc eax
jmp 0x100bda02
xor ebx, ebx
cmp dword [esp + 0x20], 0x10
setne bl
add ebx, 2
lea edx, [ecx + ebx]
mov dword [edi + 0xc], edx
mov edx, dword [edi + 8]
shr edx, cl
mov ecx, dword [ebx*4 + 0x1019e780]
and ecx, edx
xor edx, edx
cmp dword [esp + 0x20], 0x10
mov dword [esp + 0x2c], ecx
cmove edx, dword [esp + 0x1c]
xor ebx, ebx
cmp dword [esp + 0x20], 0x10
setne bl
cmp esi, edx
je 0x100bd978
xor ebp, ebp
mov esi, edx
xor edx, edx
jmp 0x100bd98e
mov esi, dword [esp + 0x24]
mov edx, ebp
mov dword [esp + 0x14], esi
test ebp, ebp
je 0x100bd992
add ebp, 0xfffffffe
lea ecx, [ebx + 2]
shl ebp, cl
mov dword [esp + 0x14], esi
mov ecx, dword [esp + 0x2c]
add ecx, 3
add ebp, ecx
mov ecx, ebp
sub ecx, edx
mov dword [esp + 0x2c], ecx
lea edx, [ecx + eax]
cmp edx, dword [esp + 0x18]
ja 0x100bda11
test esi, esi
je 0x100bd9fc
mov ecx, dword [edi + esi*4 + 0x758]
mov esi, dword [esp + 0x28]
add ecx, ecx
nop dword [eax]
mov word [ecx + esi], ax
mov ebx, eax
lea ecx, [eax + eax]
inc eax
cmp eax, edx
jne 0x100bd9c0
mov esi, dword [esp + 0x14]
mov ecx, 0xf
sub ecx, esi
mov dword [edi + esi*4 + 0x758], ebx
mov ebx, dword [esp + 0x2c]
mov edx, ebx
shl edx, cl
mov ecx, dword [esp + 0x10]
sub ecx, edx
add word [edi + esi*2 + 0x7ea], bx
mov dword [esp + 0x10], ecx
jmp 0x100bda02
mov ecx, dword [esp + 0x10]
mov eax, edx
cmp eax, dword [esp + 0x18]
jae 0x100bda5c
mov edx, dword [esp + 0x10]
jmp 0x100bd874
mov ecx, 0xfffff
mov eax, 1
mov dword [edi + 0x130], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
mov dword [edi + 0x128], eax
mov eax, dword [esp + 0x1c]
mov dword [edi + 0x12c], ebp
mov dword [edi + 0x114], eax
mov dword [edi + 0x110], esi
mov dword [edi + 0x130], edx
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x20
ret
mov ecx, dword [esp + 0x10]
mov dword [edi + 0x130], ecx
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret