Function at 0x1036d870
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov dword [ebp - 0x14], eax
mov esi, ecx
mov ecx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x1c]
add eax, ecx
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 8]
push edi
xor edi, edi
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], edi
mov dword [ebp - 8], ebx
test ebx, ebx
jle 0x1036da7c
add eax, 0x52
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
shl eax, 4
lea eax, [eax + 0x10b31360]
add eax, ebx
mov dword [ebp + 0x14], eax
nop dword [eax]
movsx edx, byte [eax]
add edx, dword [ebp - 0x10]
mov edi, dword [esi + 0xc]
mov ecx, dword [esi + 0x14]
shr edi, cl
mov al, byte [esi + edx*2 + 0xf8]
mov byte [ebp + 0xf], al
movzx eax, al
mov dword [ebp + 0x1c], eax
mov eax, edi
mov ecx, dword [ebp + 0x1c]
and eax, 0xc0
movzx eax, byte [eax + ecx + 0x10b3ceb0]
mov ecx, dword [esi + 0x14]
sub edi, eax
mov dword [ebp + 0x18], edi
shl dword [ebp + 0x18], cl
mov ecx, dword [esi + 0x10]
mov dword [ebp + 0x10], ecx
mov ecx, dword [ebp + 0x18]
cmp dword [ebp + 0x10], ecx
jb 0x1036d952
mov edi, dword [ebp + 0x10]
sub edi, ecx
mov ecx, dword [esi + 0x14]
mov dword [esi + 0x10], edi
mov edi, eax
shl eax, cl
mov dword [esi + 0xc], eax
movzx ecx, byte [esi + edx*2 + 0xf9]
mov eax, dword [ebp + 0x1c]
xor ecx, 1
mov dword [ebp + 0x18], ecx
test eax, eax
je 0x1036d93f
mov al, byte [eax + 0x10b3ce30]
mov byte [esi + edx*2 + 0xf8], al
jmp 0x1036d97c
mov al, byte [ebp + 0xf]
mov byte [esi + edx*2 + 0xf9], cl
mov byte [esi + edx*2 + 0xf8], al
jmp 0x1036d97c
mov dword [esi + 0xc], ecx
movzx eax, byte [esi + edx*2 + 0xf9]
mov dword [ebp + 0x18], eax
mov eax, dword [ebp + 0x1c]
mov al, byte [eax + 0x10b3ce70]
mov byte [esi + edx*2 + 0xf8], al
cmp edi, 0xff
jg 0x1036da4f
mov eax, dword [esi + 0x14]
bsr ecx, edi
add eax, 0xfffffff8
add eax, ecx
mov dword [esi + 0x14], eax
jns 0x1036da4f
mov edx, dword [esi + 4]
add eax, 0x10
mov ebx, dword [esi + 8]
shl dword [esi + 0xc], 0x10
mov edi, dword [esi + 0x10]
mov dword [esi + 0x14], eax
lea ecx, [edx + 2]
mov eax, dword [esi]
shl ebx, 8
mov dword [ebp + 0xc], ebx
cmp ecx, eax
ja 0x1036da19
movzx ebx, byte [edx]
mov eax, dword [ebp + 0xc]
movzx edx, byte [edx + 1]
add eax, ebx
shl eax, 8
mov dword [esi + 4], ecx
cmp eax, 0x300
jne 0x1036d9ee
mov ebx, edx
cmp ecx, dword [esi]
jae 0x1036d9e3
movzx edx, byte [ecx]
lea eax, [ecx + 1]
mov dword [esi + 4], eax
mov eax, ebx
shl eax, 8
add eax, edx
jmp 0x1036da39
mov eax, ebx
xor edx, edx
shl eax, 8
add eax, edx
jmp 0x1036da39
and eax, 0xffffff
add eax, edx
cmp eax, 3
jne 0x1036da39
cmp ecx, dword [esi]
jae 0x1036da0f
movzx edx, byte [ecx]
lea eax, [ecx + 1]
mov dword [esi + 4], eax
lea eax, [edx + 0x300]
jmp 0x1036da39
xor edx, edx
lea eax, [edx + 0x300]
jmp 0x1036da39
cmp edx, eax
jae 0x1036da22
movzx ecx, byte [edx]
jmp 0x1036da24
xor ecx, ecx
mov dword [ebp + 0xc], ecx
xor edx, edx
add ecx, ebx
mov dword [esi + 4], eax
xor ebx, ebx
xor eax, eax
cmp ecx, 3
cmovne ebx, dword [ebp + 0xc]
shl edi, 8
add edi, ebx
movzx eax, ax
mov ebx, dword [ebp - 8]
shl edi, 8
add edi, edx
mov dword [esi + 8], eax
mov dword [esi + 0x10], edi
cmp dword [ebp + 0x18], 0
mov edi, dword [ebp - 4]
mov ecx, dword [ebp + 8]
je 0x1036da62
mov byte [edi + ecx], bl
inc edi
mov dword [ebp - 4], edi
mov eax, dword [ebp + 0x14]
dec ebx
dec eax
mov dword [ebp - 8], ebx
mov dword [ebp + 0x14], eax
test ebx, ebx
jg 0x1036d8c0
mov eax, dword [ebp - 0xc]
test edi, edi
jne 0x1036da93
cmp dword [ebp + 0x20], 0
je 0x1036da93
pop edi
pop esi
mov byte [ecx], 0
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
cmp dword [ebp - 0x14], 0
mov byte [edi + ecx], 0
mov ecx, esi
cmove eax, dword [ebp - 0x18]
add eax, 0x52
push eax
call fcn.1036bf30
add eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c