Function at 0x401000
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
mov ebx, dword [ebp + 0x10]
xor edx, edx
push esi
mov esi, dword [0x4148d8]
push edi
mov eax, dword [esi + 0x3c]
mov edi, dword [eax + esi + 0x88]
mov eax, dword [eax + esi + 0x8c]
mov dword [ebp - 8], eax
movzx eax, word [edi + esi + 0xe]
lea ecx, [edi + esi]
test eax, eax
je 0x401069
movzx eax, word [ebx]
add ecx, 0x14
mov dword [ebp - 8], eax
mov eax, dword [ecx]
mov ebx, dword [ebp - 8]
and eax, 0x7fffffff
add eax, esi
cmp word [eax + edi + 0x10], bx
mov ebx, dword [ebp + 0x10]
je 0x401096
movzx eax, word [edi + esi + 0xe]
lea ebx, [edi + esi]
mov ebx, dword [ebp + 0x10]
inc edx
add ecx, 8
cmp edx, eax
jb 0x401040
xor edi, edi
test ebx, ebx
je 0x40124a
push dword [ebx + 8]
mov eax, dword [ebp + 8]
push 0
push dword [ebp + 0xc]
mov eax, dword [eax + 0xc]
call eax
mov dword [ebp - 4], eax
test eax, eax
jne 0x4010ae
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [eax + edi + 0x14]
and eax, 0x7fffffff
add eax, esi
mov eax, dword [eax + edi + 0x14]
add eax, esi
mov edi, dword [eax + edi]
add edi, esi
jmp 0x401073
mov eax, dword [ebx + 4]
xor esi, esi
mov dword [ebp - 8], eax
test eax, eax
je 0x40112e
nop word [eax + eax]
mov dl, byte [esi + edi + 0x28]
xor al, al
lea ecx, [edx - 0x30]
cmp cl, 9
ja 0x4010d2
mov al, dl
jmp 0x4010ea
lea ecx, [edx - 0x41]
cmp cl, 5
ja 0x4010df
lea eax, [edx - 0x37]
jmp 0x4010ea
lea ecx, [edx - 0x61]
cmp cl, 5
ja 0x4010ea
lea eax, [edx - 0x57]
mov bl, byte [esi + edi + 0x29]
xor dl, dl
lea ecx, [ebx - 0x30]
cmp cl, 9
ja 0x4010fc
mov dl, cl
jmp 0x401114
lea ecx, [ebx - 0x41]
cmp cl, 5
ja 0x401109
lea edx, [ebx - 0x37]
jmp 0x401114
lea ecx, [ebx - 0x61]
cmp cl, 5
ja 0x401114
lea edx, [ebx - 0x57]
shl al, 4
mov ecx, esi
or al, dl
shr ecx, 1
mov edx, dword [ebp - 4]
add esi, 2
mov byte [ecx + edx], al
cmp esi, dword [ebp - 8]
jb 0x4010c0
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebx + 8]
mov dword [ebp - 8], eax
xor eax, eax
nop word [eax + eax]
mov byte [ebp + eax - 0x10c], al
inc eax
cmp eax, 0x100
jl 0x401140
xor esi, esi
xor edi, edi
mov dl, byte [ebp + esi - 0x10c]
mov eax, esi
and eax, 0x1f
movzx ecx, dl
movzx eax, byte [eax + ebx + 0x10]
add edi, eax
add edi, ecx
and edi, 0x800000ff
jns 0x40117b
dec edi
or edi, 0xffffff00
inc edi
mov al, byte [ebp + edi - 0x10c]
mov byte [ebp + esi - 0x10c], al
inc esi
mov byte [ebp + edi - 0x10c], dl
cmp esi, 0x100
jl 0x401153
xor esi, esi
xor edi, edi
cmp dword [ebp - 8], esi
jbe 0x40120b
xor ebx, ebx
inc esi
and esi, 0x800000ff
jns 0x4011b5
dec esi
or esi, 0xffffff00
inc esi
mov cl, byte [ebp + esi - 0x10c]
movzx edx, cl
add edi, edx
and edi, 0x800000ff
jns 0x4011d1
dec edi
or edi, 0xffffff00
inc edi
movzx eax, byte [ebp + edi - 0x10c]
mov byte [ebp + esi - 0x10c], al
mov byte [ebp + edi - 0x10c], cl
movzx eax, byte [ebp + esi - 0x10c]
mov ecx, dword [ebp - 4]
add eax, edx
movzx eax, al
movzx eax, byte [ebp + eax - 0x10c]
xor byte [ebx + ecx], al
inc ebx
cmp ebx, dword [ebp - 8]
jb 0x4011a4
mov ebx, dword [ebp + 0x10]
push dword [ebx + 0xc]
mov eax, dword [ebp + 8]
push 0
push dword [ebp + 0xc]
mov eax, dword [eax + 0xc]
call eax
push dword [ebx + 0xc]
mov dword [ebx + 0x30], eax
push eax
push dword [ebx + 8]
push dword [ebp - 4]
call fcn.00401490
add esp, 0x10
cmp eax, 0xffffffff
jne 0x401241
pop edi
pop esi
mov eax, 4
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret