Function at 0x4ca59c
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x20], 0
je 0x4cab58
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 8]
mov edx, dword [ebp - 0x20]
imul dword [edx + 0xc]
test eax, eax
je 0x4cab58
cmp dword [ebp - 0x24], 0
je 0x4cab58
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 8]
mov edx, dword [ebp - 0x24]
imul dword [edx + 0xc]
test eax, eax
je 0x4cab58
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x40]
mov edx, 0x4cab6c
call fcn.00404c1c
jne 0x4ca633
mov eax, dword [0x5646b0]
mov eax, dword [eax + 8]
call fcn.0040319c
mov edx, eax
mov eax, dword [0x5646b0]
call fcn.004198f4
mov edx, dword [eax + 0xc]
mov eax, dword [0x5646b0]
call fcn.004cafac
mov dword [ebp - 0x10], eax
jmp 0x4ca646
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x40]
mov eax, dword [0x5646b0]
call fcn.004cafac
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x40]
mov edx, 0x4cab94
call fcn.00404c1c
je 0x4ca66f
cmp dword [ebp - 0x10], 0
je 0x4cab58
mov eax, dword [ebp - 0x10]
cmp dword [eax + 8], 0
je 0x4cab58
mov dword [ebp - 0x18], 0x3c23d70a
mov dl, 1
mov eax, dword [0x4c59b4]
call fcn.004c6110
mov dword [ebp - 0x1c], eax
xor edi, edi
push ebp
push 0x4cab4e
push dword fs:[edi]
mov dword fs:[edi], esp
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0xc]
mov eax, dword [ebp - 0x20]
mov edx, dword [eax + 8]
mov eax, dword [ebp - 0x1c]
call fcn.004c651c
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 8]
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0x38]
cdq
idiv ecx
mov edx, dword [ebp + 8]
mov ebx, dword [edx + 0x3c]
cdq
idiv ebx
inc eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
cdq
idiv ecx
cdq
idiv ebx
inc eax
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x40]
mov edx, 0x4cab94
call fcn.00404c1c
je 0x4ca755
mov eax, dword [ebp - 0x10]
mov al, byte [eax + 4]
sub al, 1
jb 0x4ca6f6
je 0x4ca731
jmp 0x4ca8a8
mov eax, dword [ebp - 0x28]
imul dword [ebp - 0x2c]
mov dword [0x57c72c], eax
mov eax, dword [0x57c72c]
call fcn.00402838
mov dword [0x57c730], eax
mov eax, dword [ebp + 8]
cmp byte [eax + 0x44], 0
je 0x4ca8a8
mov eax, dword [0x57c72c]
call fcn.00402838
mov dword [0x57c734], eax
jmp 0x4ca8a8
mov eax, dword [ebp - 0x28]
imul dword [ebp - 0x2c]
add eax, eax
lea eax, [eax + eax*2]
mov dword [0x57c72c], eax
mov eax, dword [0x57c72c]
call fcn.00402838
mov dword [0x57c738], eax
jmp 0x4ca8a8
mov eax, dword [ebp - 0x28]
imul dword [ebp - 0x2c]
mov dword [0x57c72c], eax
mov eax, dword [0x57c72c]
call fcn.00402838
mov dword [0x57c730], eax
mov eax, dword [0x57c72c]
call fcn.00402838
mov dword [0x57c734], eax
mov dl, 1
mov eax, dword [0x4265d4]
call fcn.0042cad8
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 8]
mov al, byte [eax + 0x44]
sub al, 1
je 0x4ca79b
sub al, 2
jne 0x4ca7df
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x40]
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x34]
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x48]
push eax
mov ecx, dword [ebp - 0x2c]
xor edx, edx
xor eax, eax
call fcn.00418214
lea eax, [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x30]
call fcn.0042d0a0
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0x48]
pop edx
call fcn.004283a8
jmp 0x4ca821
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x40]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x34]
mov eax, dword [ebp - 0x2c]
push eax
lea eax, [ebp - 0x48]
push eax
mov ecx, dword [ebp - 0x28]
xor edx, edx
xor eax, eax
call fcn.00418214
lea eax, [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x30]
call fcn.0042d0a0
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0x48]
pop edx
call fcn.004283a8
mov dl, 1
mov eax, dword [0x4c59b4]
call fcn.004c6110
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x28]
dec eax
test eax, eax
jl 0x4ca898
inc eax
mov dword [ebp - 0x38], eax
xor edx, edx
mov ecx, dword [ebp - 0x2c]
dec ecx
test ecx, ecx
jl 0x4ca892
inc ecx
xor eax, eax
mov esi, eax
imul esi, dword [ebp - 0x28]
add esi, edx
mov ebx, dword [ebp - 0x34]
mov ebx, dword [ebx + 4]
mov bl, byte [ebx + esi*4]
and bl, 0xff
push ebx
mov ebx, dword [0x57c730]
lea edi, [ebx + esi]
pop ebx
mov byte [edi], bl
mov ebx, dword [ebp - 0x34]
mov ebx, dword [ebx + 4]
mov bl, byte [ebx + esi*4]
and bl, 0xff
push ebx
mov ebx, dword [0x57c734]
lea esi, [ebx + esi]
pop ebx
mov byte [esi], bl
inc eax
dec ecx
jne 0x4ca854
inc edx
dec dword [ebp - 0x38]
jne 0x4ca849
mov eax, dword [ebp - 0x34]
call fcn.00403950
mov eax, dword [ebp - 0x30]
call fcn.00403950
mov dl, 1
mov eax, dword [0x4c9c24]
call fcn.004cf080
mov dword [ebp - 0x14], eax
xor eax, eax
push ebp
push 0x4caa0b
push dword fs:[eax]
mov dword fs:[eax], esp
jmp 0x4ca9e3
lea eax, [ebp - 0x14]
call fcn.004cf164
xor eax, eax
push ebp
push 0x4ca9b5
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
fild dword [eax + 0x34]
fdivr dword [ebp - 0x18]
fmul dword [0x4cabb4]
call fcn.00402c70
mov ebx, eax
cmp ebx, 0x64
jle 0x4ca900
mov ebx, 0x64
push 0
xor ecx, ecx
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
call fcn.004c6e04
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x40]
mov edx, 0x4cab94
call fcn.00404c1c
je 0x4ca98b
mov eax, dword [ebp - 0x10]
mov al, byte [eax + 4]
sub al, 1
jb 0x4ca933
je 0x4ca953
dec al
je 0x4ca973
jmp 0x4ca9a2
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp + 8]
push eax
push ebx
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x1c]
call fcn.004c9c7c
jmp 0x4ca9a2
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp + 8]
push eax
push ebx
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x1c]
call fcn.004c9ef4
jmp 0x4ca9a2
mov eax, dword [ebp + 8]
push eax
push ebx
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x1c]
call fcn.004ca55c
jmp 0x4ca9a2
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp + 8]
push eax
push ebx
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x1c]
call fcn.004ca358
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4ca9bc
call fcn.004c58c4
ret
mov eax, dword [ebp + 8]
fild dword [eax + 0x34]
fcomp dword [ebp - 0x18]
fnstsw ax
sahf
ja 0x4ca8ca
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4caa12
mov eax, dword [ebp - 0x14]
call fcn.00403950
ret
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc