Function at 0x1002d9a0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push esi
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x14], 0
mov eax, dword [ebp + 8]
add eax, dword [ebp + 0x10]
mov dword [ebp - 8], eax
movzx ecx, byte [ebp + 0x14]
cmp ecx, 1
jne 0x1002d9e5
mov dword [ebp - 0x18], 1
jmp 0x1002da43
mov dword [ebp - 0x18], 2
movzx edx, byte [ebp + 0x14]
mov eax, 3
sub eax, edx
mov dword [ebp - 4], eax
jmp 0x1002da05
mov ecx, dword [ebp - 4]
add ecx, 2
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
cmp edx, dword [ebp + 0x10]
jge 0x1002da1c
mov eax, dword [ebp + 8]
add eax, dword [ebp - 4]
movsx ecx, byte [eax]
test ecx, ecx
jne 0x1002da1c
jmp 0x1002d9fc
mov edx, dword [ebp - 4]
xor eax, eax
cmp edx, dword [ebp + 0x10]
setl al
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 4]
xor ecx, 1
add ecx, dword [ebp + 8]
mov dword [ebp - 8], ecx
movzx edx, byte [ebp + 0x14]
and edx, 1
add edx, dword [ebp + 8]
mov dword [ebp + 8], edx
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 8]
jae 0x1002da68
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx]
movzx eax, byte [edx + 0x100a9c68]
and eax, 1
je 0x1002da68
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x18]
mov dword [ebp + 8], ecx
jmp 0x1002da43
mov edx, dword [ebp + 8]
cmp edx, dword [ebp - 8]
jae 0x1002daa1
mov eax, dword [ebp + 8]
movsx ecx, byte [eax]
cmp ecx, 0x2d
jne 0x1002da8d
mov dword [ebp - 0x20], 1
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0x18]
mov dword [ebp + 8], edx
jmp 0x1002daa1
mov eax, dword [ebp + 8]
movsx ecx, byte [eax]
cmp ecx, 0x2b
jne 0x1002daa1
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0x18]
mov dword [ebp + 8], edx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp + 8]
cmp ecx, dword [ebp - 8]
jae 0x1002dac5
mov edx, dword [ebp + 8]
movsx eax, byte [edx]
cmp eax, 0x30
jne 0x1002dac5
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x18]
mov dword [ebp + 8], ecx
jmp 0x1002daa7
mov dword [ebp - 4], 0
jmp 0x1002dad7
mov edx, dword [ebp - 4]
add edx, dword [ebp - 0x18]
mov dword [ebp - 4], edx
mov eax, dword [ebp + 8]
add eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jae 0x1002db25
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 4]
movsx edx, byte [ecx]
mov dword [ebp - 0x24], edx
cmp dword [ebp - 0x24], 0x30
jl 0x1002db25
cmp dword [ebp - 0x24], 0x39
jg 0x1002db25
push 0
push 0xa
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.10098bb0
mov ecx, eax
mov esi, edx
mov eax, dword [ebp - 0x24]
cdq
add ecx, eax
adc esi, edx
sub ecx, 0x30
sbb esi, 0
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], esi
jmp 0x1002dace
cmp dword [ebp - 0xc], 0x7fffffff
jb 0x1002db6a
ja 0x1002db36
cmp dword [ebp - 0x10], 0xffffffff
jbe 0x1002db6a
cmp dword [ebp - 0x20], 0
je 0x1002db4c
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], closesocket
jmp 0x1002db5a
mov dword [ebp - 0x2c], 0xffffffff
mov dword [ebp - 0x28], closesocket
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x2c]
mov dword [edx], eax
mov ecx, dword [ebp - 0x28]
mov dword [edx + 4], ecx
jmp 0x1002db95
cmp dword [ebp - 0x20], 0
je 0x1002db87
mov edx, dword [ebp - 0x10]
neg edx
mov eax, dword [ebp - 0xc]
adc eax, 0
neg eax
mov ecx, dword [ebp + 0xc]
mov dword [ecx], edx
mov dword [ecx + 4], eax
jmp 0x1002db95
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x10]
mov dword [edx], eax
mov ecx, dword [ebp - 0xc]
mov dword [edx + 4], ecx
mov edx, dword [ebp + 8]
add edx, dword [ebp - 4]
cmp edx, dword [ebp - 8]
jb 0x1002dbbf
cmp dword [ebp - 4], 0
jne 0x1002dbae
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp + 8]
je 0x1002dbbf
mov ecx, dword [ebp - 0x18]
imul ecx, ecx, 0x13
cmp dword [ebp - 4], ecx
jg 0x1002dbbf
cmp dword [ebp - 0x14], 0
je 0x1002dbc8
mov eax, 1
jmp 0x1002dc14
mov edx, dword [ebp - 0x18]
imul edx, edx, 0x13
cmp dword [ebp - 4], edx
jge 0x1002dbd9
xor eax, eax
jmp 0x1002dc14
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.1002dc20
add esp, 8
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jge 0x1002dbf8
xor eax, eax
jmp 0x1002dc14
cmp dword [ebp - 0x24], 0
jle 0x1002dc07
mov eax, 1
jmp 0x1002dc14
mov eax, dword [ebp - 0x20]
neg eax
sbb eax, eax
and eax, 0xfffffffe
add eax, 2
pop esi
mov esp, ebp
pop ebp
ret