Function at 0x4224e0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
test esi, esi
je 0x4227b0
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x4227b0
cmp byte [esi + 0x118044], 0
jne 0x42278f
mov ecx, dword [ebp + 0x10]
mov eax, dword [esi + 0x11800c]
add ecx, eax
mov dword [ebp - 0x10], ecx
cmp ecx, 0xffffff
jbe 0x42252c
mov edi, 0xffffff
sub edi, eax
mov dword [ebp + 0x10], edi
xor edi, edi
cmp dword [ebp + 0x10], edi
jbe 0x4226e1
nop word [eax + eax]
mov ecx, dword [esi + 0x118040]
lea eax, [edi + 1]
mov dword [ebp - 4], eax
mov al, byte [eax + ebx - 1]
mov edx, dword [ebp - 4]
mov byte [ecx + esi + 0x118020], al
mov eax, dword [esi + 0x118040]
mov ecx, dword [esi + 0x118008]
inc eax
and eax, 0x1f
add ecx, ecx
mov dword [esi + 0x118040], eax
movzx eax, byte [edx + ebx - 1]
mov eax, dword [eax*4 + 0x531170]
xor eax, ecx
mov dword [esi + 0x118008], eax
test eax, 0xffc00000
jne 0x4226ab
cmp dword [esi + 0x118000], 0x9fff
jae 0x4226da
mov eax, dword [esi + 0x11800c]
lea ecx, [esi + 0x118138]
add eax, edi
mov dword [ebp - 8], eax
mov eax, dword [esi + 0x118014]
lea edx, [eax + ebx]
mov ebx, edi
sub ebx, eax
mov dword [ebp - 0xc], edx
inc ebx
push ebx
call fcn.00421c80
add esp, 4
test eax, eax
jne 0x4226ce
lea edx, [esi + 0x11862c]
test edx, edx
je 0x4225fc
xor ecx, ecx
test ebx, ebx
je 0x4225f6
mov esi, dword [ebp - 0xc]
movzx eax, byte [ecx + esi]
inc ecx
inc dword [edx + eax*4]
cmp ecx, ebx
jb 0x4225e7
mov esi, dword [ebp + 8]
add dword [edx + 0x400], ebx
mov eax, dword [esi + 0x118000]
mov ecx, esi
mov ebx, dword [ebp - 8]
push ebx
lea eax, [eax + eax*4]
lea edx, [esi + eax*4]
call fcn.00422200
add esp, 4
test eax, eax
jne 0x4226c4
mov eax, dword [ebp - 4]
inc dword [esi + 0x118000]
mov dword [esi + 0x118014], eax
mov eax, ebx
sub eax, dword [esi + 0x118018]
mov dword [esi + 0x118010], ebx
mov ebx, dword [ebp + 0xc]
cmp eax, 0x1000
jb 0x4226a8
mov eax, dword [esi + 0x11801c]
lea edx, [esi + 0x118a30]
sub edi, eax
add ebx, eax
inc edi
test edx, edx
je 0x422672
xor ecx, ecx
test edi, edi
je 0x42266c
movzx eax, byte [ecx + ebx]
inc ecx
inc dword [edx + eax*4]
cmp ecx, edi
jb 0x422660
add dword [edx + 0x400], edi
mov eax, dword [esi + 0x118004]
mov ecx, esi
add eax, 0x19000
lea edx, [esi + eax*8]
call fcn.00422480
test eax, eax
jne 0x4226b8
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
inc dword [esi + 0x118004]
mov ebx, dword [ebp + 0xc]
mov dword [esi + 0x118018], eax
mov dword [esi + 0x11801c], edx
jmp 0x4226ab
mov edx, dword [ebp - 4]
mov edi, edx
cmp edi, dword [ebp + 0x10]
jb 0x422540
jmp 0x4226e1
mov eax, 0xfffffffb
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
imul eax, eax, 0x64
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x118044], 1
mov eax, dword [esi + 0x118014]
lea ecx, [esi + 0x118138]
mov edi, dword [ebp + 0x10]
add ebx, eax
sub edi, eax
mov edx, ebx
push edi
call fcn.00421c80
add esp, 4
test eax, eax
jne 0x4227a4
lea edx, [esi + 0x11862c]
test edx, edx
je 0x422729
xor ecx, ecx
test edi, edi
je 0x422723
movzx eax, byte [ecx + ebx]
inc ecx
inc dword [edx + eax*4]
cmp ecx, edi
jb 0x422717
add dword [edx + 0x400], edi
mov eax, dword [esi + 0x11801c]
lea edi, [esi + 0x118a30]
mov ebx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
add ebx, eax
sub edx, eax
test edi, edi
je 0x422762
xor ecx, ecx
test edx, edx
je 0x42275c
nop dword [eax]
movzx eax, byte [ecx + ebx]
inc ecx
inc dword [edi + eax*4]
cmp ecx, edx
jb 0x422750
add dword [edi + 0x400], edx
mov eax, dword [ebp + 0x10]
add dword [esi + 0x11800c], eax
cmp dword [ebp - 0x10], 0xffffff
mov dword [esi + 0x118014], 0
mov dword [esi + 0x11801c], 0
jbe 0x42279b
mov byte [esi + 0x118044], 1
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xfffffffa
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret