Function at 0x4fdb27
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, dword [0x577760]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
push ebx
push esi
push edi
push 8
pop ebx
push ebx
lea edx, [ebp - 0xc]
push edx
mov dword [ebp - 0x50], ecx
call dword [eax]
push ebx
xor edi, edi
lea eax, [ebp - 0xc]
push edi
push eax
call fcn.0050effe
add esp, 0xc
test eax, eax
je 0x4fdb71
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004be8b8
leave
ret
push edi
push edi
push edi
push str.1.5.19
call fcn.00511eb0
push eax
mov dword [ebp - 0x10], eax
call fcn.0051097e
push 0x40
push 0x50a8b0
push dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
call fcn.0050d565
push edi
push eax
call fcn.0050a970
add esp, 0x28
test eax, eax
je 0x4fdbbe
xor esi, esi
push edi
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00511ece
add esp, 0xc
mov eax, esi
jmp 0x4fdb62
push 0x4fdafc
push dword [ebp - 0x50]
push dword [ebp - 0x10]
call fcn.00517cb7
push ebx
push dword [ebp - 0x10]
call fcn.0050efd3
mov eax, dword [ebp - 0x10]
add esp, 0x14
cmp byte [eax + 0x13c], bl
jb 0x4fdbf7
cmp byte [eax + 0x13b], 3
je 0x4fdbf7
mov ecx, dword [ebp - 0x14]
test byte [ecx + 8], 0x10
je 0x4fdc01
push eax
call fcn.00513bb5
mov eax, dword [ebp - 0x10]
pop ecx
push 1
push 0xff
push eax
call fcn.00517758
push dword [ebp - 0x10]
call fcn.005176dd
push dword [ebp - 0x10]
call fcn.00513c2f
push dword [ebp - 0x10]
call fcn.00513202
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.00511024
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.005113c8
mov eax, dword [ebp - 0x10]
mov edi, dword [eax + 0xe4]
mov ebx, dword [eax + 0xe8]
shl edi, 2
imul ebx, edi
push 0x18
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x40], ebx
call fcn.004be940
push 0x18
mov esi, eax
push 0
push esi
call fcn.004c5420
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xe4]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xe8]
mov dword [esi + 0xc], eax
imul eax, edi
push eax
call fcn.004be940
push ebx
push 0
push eax
mov dword [ebp - 0x30], eax
call fcn.004c5420
mov eax, dword [esi + 0xc]
shl eax, 2
add esp, 0x48
push eax
call fcn.004be940
pop ecx
xor ecx, ecx
mov dword [ebp - 0x3c], eax
cmp dword [esi + 0xc], ecx
jle 0x4fdcbf
mov edx, dword [ebp - 0x30]
mov dword [eax + ecx*4], edx
inc ecx
add edx, edi
cmp ecx, dword [esi + 0xc]
jl 0x4fdcb4
push 0x10000
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.00511f90
add esp, 0xc
test eax, eax
jne 0x4fdcf0
push dword [ebp - 0x3c]
push dword [ebp - 0x10]
call fcn.005118aa
mov eax, dword [ebp - 0x30]
mov dword [esi + 0x10], 1
jmp 0x4fdfb4
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.00512ece
mov dword [esi + 0x10], eax
imul eax, ebx
push eax
call fcn.004be940
push ebx
mov dword [ebp - 0x48], eax
call fcn.004be940
push ebx
push 0
push eax
mov dword [ebp - 0x2c], eax
call fcn.004c5420
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.00512eea
mov dword [esi + 0x14], eax
mov eax, dword [esi + 0x10]
add eax, eax
push eax
call fcn.004be940
and dword [ebp - 0x18], 0
add esp, 0x28
cmp dword [esi + 0x10], 0
mov dword [esi + 4], eax
jle 0x4fdfa1
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x44], eax
sub eax, ebx
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x14]
push eax
push dword [ebp - 0x10]
call fcn.005112d1
push 0x20000
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.00511f90
add esp, 0x14
test eax, eax
je 0x4fddbd
mov ecx, dword [ebp - 0x14]
movzx eax, word [ecx + 0x104]
movzx ecx, word [ecx + 0x106]
test cx, cx
je 0x4fddb1
cmp ecx, 0x64
je 0x4fddb1
cmp ecx, 0xa
jne 0x4fdd9c
imul eax, eax, 0xa
jmp 0x4fddb1
mov edx, 0x3e8
cmp cx, dx
jne 0x4fddab
push 0xa
pop ecx
jmp 0x4fddae
imul eax, eax, 0x64
cdq
idiv ecx
mov ecx, dword [esi + 4]
mov edx, dword [ebp - 0x18]
mov word [ecx + edx*2], ax
jmp 0x4fddc9
mov eax, dword [esi + 4]
mov edx, dword [ebp - 0x18]
xor ecx, ecx
mov word [eax + edx*2], cx
push dword [ebp - 0x3c]
push dword [ebp - 0x10]
call fcn.005118aa
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 0x100]
imul eax, edi
add eax, dword [ebp - 0x2c]
pop ecx
pop ecx
mov ecx, dword [edx + 0xfc]
lea eax, [eax + ecx*4]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x28], eax
movzx eax, byte [edx + 0x109]
xor ebx, ebx
sub eax, ebx
je 0x4fded1
dec eax
jne 0x4fdf03
mov dword [ebp - 0x1c], ebx
cmp dword [edx + 0xf8], ebx
jbe 0x4fdf03
mov ebx, dword [edx + 0xf4]
and dword [ebp - 0x34], 0
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x28]
test ebx, ebx
je 0x4fdeb7
movzx edi, byte [ecx + 3]
movzx edx, byte [eax]
movzx ebx, byte [ecx]
imul ebx, edi
mov dword [ebp - 0x24], 0xff
sub dword [ebp - 0x24], edi
imul edx, dword [ebp - 0x24]
add edx, ebx
sar edx, 8
mov byte [eax], dl
movzx edx, byte [eax + 1]
imul edx, dword [ebp - 0x24]
movzx ebx, byte [ecx + 1]
imul ebx, edi
add edx, ebx
sar edx, 8
mov byte [eax + 1], dl
movzx edx, byte [eax + 2]
imul edx, dword [ebp - 0x24]
movzx ebx, byte [ecx + 2]
imul ebx, edi
add edx, ebx
sar edx, 8
mov byte [eax + 2], dl
movzx edx, byte [eax + 3]
imul edx, dword [ebp - 0x24]
movzx ebx, byte [ecx + 3]
imul ebx, edi
add edx, ebx
sar edx, 8
mov byte [eax + 3], dl
mov edx, dword [ebp - 0x14]
mov ebx, dword [edx + 0xf4]
add eax, 4
add ecx, 4
inc dword [ebp - 0x34]
cmp dword [ebp - 0x34], ebx
jb 0x4fde36
mov edi, dword [ebp - 0x4c]
add dword [ebp - 0x20], edi
add dword [ebp - 0x28], edi
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
cmp eax, dword [edx + 0xf8]
jb 0x4fde24
jmp 0x4fdf03
cmp dword [edx + 0xf8], ebx
jbe 0x4fdf03
mov eax, dword [edx + 0xf4]
shl eax, 2
push eax
push dword [ebp - 0x28]
push dword [ebp - 0x20]
call fcn.004c4af0
add dword [ebp - 0x20], edi
add dword [ebp - 0x28], edi
mov edx, dword [ebp - 0x14]
add esp, 0xc
inc ebx
cmp ebx, dword [edx + 0xf8]
jb 0x4fded9
push dword [ebp - 0x40]
push dword [ebp - 0x2c]
push dword [ebp - 0x44]
call fcn.004c4af0
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x100]
mov edx, dword [eax + 0xfc]
imul ecx, edi
add ecx, dword [ebp - 0x2c]
add esp, 0xc
lea ebx, [ecx + edx*4]
movzx ecx, byte [eax + 0x108]
dec ecx
je 0x4fdf54
dec ecx
jne 0x4fdf89
cmp dword [ebp - 0x18], ecx
jle 0x4fdf89
push dword [ebp - 0x40]
push dword [ebp - 0x38]
push dword [ebp - 0x2c]
call fcn.004c4af0
mov eax, dword [ebp - 0x14]
add esp, 0xc
jmp 0x4fdf89
and dword [ebp - 0x1c], 0
cmp dword [eax + 0xf8], 0
jbe 0x4fdf89
mov eax, dword [eax + 0xf4]
shl eax, 2
push eax
push 0
push ebx
call fcn.004c5420
mov eax, dword [ebp - 0x14]
add esp, 0xc
add ebx, edi
inc dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [eax + 0xf8]
jb 0x4fdf61
mov ecx, dword [ebp - 0x40]
inc dword [ebp - 0x18]
add dword [ebp - 0x44], ecx
add dword [ebp - 0x38], ecx
mov ecx, dword [ebp - 0x18]
cmp ecx, dword [esi + 0x10]
jl 0x4fdd57
push dword [ebp - 0x2c]
call fcn.004be8c7
push dword [ebp - 0x30]
call fcn.004be8c7
mov eax, dword [ebp - 0x48]
pop ecx
pop ecx
push dword [ebp - 0x3c]
mov dword [esi], eax
call fcn.004be8c7
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call fcn.00511936
add esp, 0xc
xor edi, edi
jmp 0x4fdba9