Function at 0x10055340
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x18]
xor eax, eax
push esi
push edi
lea ecx, [ebp - 1]
mov dword [esp + 0x10], eax
cmp ecx, 0xc
ja case.0x1005535b.5
jmp dword [ecx*4 + 0x100555f0]
mov ecx, dword [esp + 0x1c]
mov edx, ecx
dec ecx
test edx, edx
je 0x100555de
lea edi, [ecx + 1]
mov ecx, dword [esp + 0x18]
mov bl, byte [ecx]
inc ecx
test bl, bl
mov byte [esp + 0x1c], bl
mov dword [esp + 0x18], ecx
je 0x100553d6
cmp ebp, 0xb
jne 0x100553d6
cmp dword [0x1007443c], 1
jle 0x100553b3
mov esi, dword [esp + 0x1c]
push 2
mov eax, esi
and eax, 0xff
push eax
call fcn.10045968
mov ecx, eax
mov eax, dword [esp + 0x18]
add esp, 8
jmp 0x100553cb
mov esi, dword [esp + 0x1c]
mov edx, dword [0x10074230]
mov ecx, esi
and ecx, 0xff
mov cl, byte [edx + ecx*2]
and ecx, 2
test ecx, ecx
je 0x100553da
add bl, 0xe0
mov byte [esp + 0x1c], bl
mov esi, dword [esp + 0x1c]
shl eax, 4
and esi, 0xff
add eax, esi
mov ecx, eax
and ecx, 0xf0000000
je 0x100553f6
mov edx, ecx
shr edx, 0x18
xor eax, edx
not ecx
and eax, ecx
dec edi
mov dword [esp + 0x10], eax
jne 0x10055374
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x100555de
mov edi, dword [esp + 0x18]
lea eax, [esp + 0x18]
push eax
call fcn.10057610
mov esi, eax
add esp, 4
test si, si
je 0x100555da
sub edi, dword [esp + 0x18]
add ebx, edi
cmp ebp, 0xc
jne 0x10055458
push 2
push esi
call fcn.10044795
add esp, 8
test eax, eax
je 0x10055458
push esi
call fcn.10058e00
add esp, 4
mov esi, eax
mov eax, dword [esp + 0x10]
and esi, 0xffff
shl eax, 4
add eax, esi
mov ecx, eax
and ecx, 0xf0000000
je 0x10055478
mov edx, ecx
shr edx, 0x18
xor eax, edx
not ecx
and eax, ecx
test ebx, ebx
mov dword [esp + 0x10], eax
jne 0x10055417
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov ecx, dword [esp + 0x1c]
mov edx, ecx
dec ecx
test edx, edx
je 0x100555de
lea esi, [ecx + 1]
mov ecx, dword [esp + 0x18]
xor edx, edx
mov dl, byte [ecx]
add eax, edx
inc ecx
dec esi
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], ecx
jne 0x100554a0
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov ecx, dword [esp + 0x1c]
mov edx, ecx
dec ecx
test edx, edx
je 0x100555de
lea esi, [ecx + 1]
mov ecx, dword [esp + 0x18]
xor edx, edx
mov dl, byte [ecx]
inc ecx
dec esi
mov dword [esp + 0x18], ecx
lea eax, [eax + edx - 0x20]
mov dword [esp + 0x10], eax
jne 0x100554ce
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov ecx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
mov eax, dword [ecx]
pop ebx
not eax
pop ecx
ret
mov edx, dword [esp + 0x1c]
cmp edx, 4
jb 0x100555de
mov ecx, dword [esp + 0x18]
mov ebp, dword [ecx]
sub edx, 4
xor eax, ebp
add ecx, 4
cmp edx, 4
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], ecx
jae 0x10055511
xor esi, esi
mov edi, edx
dec edx
test edi, edi
je 0x10055545
lea edi, [edx + 1]
xor edx, edx
mov dl, byte [ecx]
shl esi, 4
or esi, edx
inc ecx
dec edi
mov dword [esp + 0x18], ecx
jne 0x10055534
xor eax, esi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
cmp edx, 4
jbe 0x10055579
lea esi, [edx - 1]
shr esi, 2
mov edi, dword [ecx]
sub edx, 4
or edi, eax
add ecx, 4
shl edi, 8
mov eax, edi
dec esi
mov dword [esp + 0x10], eax
jne 0x10055560
cmp edx, 4
jne 0x100555de
mov edx, dword [ecx]
pop edi
pop esi
pop ebp
or eax, edx
pop ebx
pop ecx
ret
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
cmp edx, 2
jbe 0x100555b3
lea esi, [edx - 1]
shr esi, 1
xor edi, edi
sub edx, 2
mov di, word [ecx]
add ecx, 2
or edi, eax
shl edi, 8
mov eax, edi
dec esi
mov dword [esp + 0x10], eax
jne 0x10055597
cmp edx, 2
jne 0x100555de
xor edx, edx
pop edi
mov dx, word [ecx]
pop esi
pop ebp
or eax, edx
pop ebx
pop ecx
ret
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x10]
push edx
mov ecx, dword [eax]
add eax, 4
push ecx
push eax
call fcn.10055630
add esp, 0xc
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
mov eax, dword [eax]
pop ebx
pop ecx
ret