Function at 0x5031e0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x44
mov eax, dword [0x5c4738]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov eax, dword [ecx]
mov dword [ebp - 0x30], ecx
mov ecx, dword [ecx + 4]
mov edi, edx
sub edi, ecx
mov esi, eax
sub esi, edi
seta bl
cmp esi, 0xd
seta bh
test bl, bh
mov ebx, 0
cmove edx, ebx
je 0x5033d4
mov esi, edx
sub esi, ecx
movzx edi, word [edx + 6]
shl edi, 0x10
bswap edi
shr edi, 1
add esi, 0xe
sub eax, esi
lea ecx, [edi*4 + 1]
mov esi, 0
seta bl
shr eax, 1
cmp eax, ecx
setae al
add edx, 0xe
test bl, al
cmove edx, esi
mov ebx, 0
je 0x5033d4
xor ebx, ebx
test edi, edi
je 0x5033c7
lea eax, [edx + edi*2]
mov dword [ebp - 0x4c], eax
lea eax, [eax + edi*2]
add eax, 2
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x48], eax
lea eax, [eax + edi*2]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x30]
add eax, 0x18
mov dword [ebp - 0x34], eax
mov al, 1
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x4c]
movzx esi, word [eax + ebx*2 + 2]
shl esi, 0x10
bswap esi
movzx edx, word [edx + ebx*2]
shl edx, 0x10
bswap edx
cmp dx, si
jb 0x5033ce
mov eax, dword [ebp - 0x48]
movzx eax, word [eax + ebx*2]
shl eax, 0x10
bswap eax
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x44]
movzx ecx, word [eax + ebx*2]
shl ecx, 0x10
bswap ecx
test cx, cx
mov dword [ebp - 0x50], ebx
je 0x503362
mov dword [ebp - 0x28], edx
lea eax, [eax + ebx*2]
mov edx, dword [ebp - 0x30]
mov edi, dword [edx + 4]
sub eax, edi
add eax, ecx
mov edx, dword [edx]
sub edx, eax
jbe 0x5033ce
mov ecx, dword [ebp - 0x28]
sub ecx, esi
inc ecx
shr edx, 1
cmp edx, ecx
jb 0x5033ce
test ecx, ecx
mov edx, dword [ebp - 0x28]
je 0x5033af
add edi, eax
inc edx
mov dword [ebp - 0x28], edx
movzx ebx, word [edi]
rol bx, 8
test bx, bx
jne 0x503326
inc esi
add edi, 2
cmp edx, esi
jne 0x50330d
jmp 0x5033af
mov eax, esi
mov ecx, 0xffff
and eax, ecx
mov dword [ebp - 0x24], eax
add ebx, dword [ebp - 0x38]
and ebx, ecx
lea eax, [ebp - 0x24]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x34]
lea edx, [ebp - 0x1c]
push edx
lea edx, [ebp - 0x20]
push edx
push 0x57a604
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.005033f0
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x14], ebx
jmp 0x503319
mov eax, edx
sub eax, esi
cmp eax, 0xffffffff
je 0x5033af
inc edx
mov eax, esi
mov ecx, 0xffff
and eax, ecx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x38]
lea edi, [eax + esi]
and edi, ecx
lea eax, [ebp - 0x24]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x34]
mov ebx, edx
lea edx, [ebp - 0x1c]
push edx
lea edx, [ebp - 0x20]
push edx
push 0x57a604
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.005033f0
mov edx, ebx
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x14], edi
inc esi
cmp ebx, esi
jne 0x50336c
mov ebx, dword [ebp - 0x50]
inc ebx
cmp ebx, dword [ebp - 0x3c]
setb al
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x40]
jne 0x50328c
jmp 0x5033ce
mov dword [ebp - 0x2c], 0
mov ebx, dword [ebp - 0x2c]
xor bl, 1
and bl, 1
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004d25a3
mov eax, ebx
add esp, 0x44
pop esi
pop edi
pop ebx
pop ebp
ret