Function at 0x407e60
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 0x30
add esp, 0xfffff004
push eax
dec eax
jne 0x407e69
mov eax, dword [ebp - 4]
add esp, 0xfffff9c4
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov ebx, eax
mov eax, dword [ebp - 8]
add eax, dword [ebp + 0x14]
add eax, dword [ebp + 0x10]
add eax, dword [ebp + 0xc]
add eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x407ea6
mov dword [ebp - 0xc], 1
xor esi, esi
lea edi, [ebp - 0x30040]
xor edx, edx
mov dl, byte [ebx + 0x454]
mov eax, dword [ebx + 0x5c]
and eax, esi
call fcn.004060c0
mov byte [edi], al
mov cl, byte [ebx + 0x45b]
mov eax, dword [ebx + 0x58]
and eax, esi
shr eax, cl
xor edx, edx
mov dl, byte [ebx + 0x455]
call fcn.004060c0
mov byte [edi + 1], al
mov cl, byte [ebx + 0x45c]
mov eax, dword [ebx + 0x54]
and eax, esi
shr eax, cl
xor edx, edx
mov dl, byte [ebx + 0x456]
call fcn.004060c0
mov byte [edi + 2], al
inc esi
add edi, 3
cmp esi, 0x10000
jne 0x407eae
xor esi, esi
lea edi, [ebp - 0x30640]
lea eax, [ebp - 0x30440]
lea edx, [ebp - 0x30240]
mov dword [ebp - 0x40], edx
mov cl, byte [ebx + 0x457]
mov edx, esi
shr edx, cl
mov word [edi], dx
mov cl, byte [ebx + 0x458]
mov edx, esi
shr edx, cl
mov cl, byte [ebx + 0x45b]
shl dx, cl
mov word [eax], dx
mov cl, byte [ebx + 0x459]
mov edx, esi
shr edx, cl
mov cl, byte [ebx + 0x45c]
shl dx, cl
mov ecx, dword [ebp - 0x40]
mov word [ecx], dx
inc esi
add dword [ebp - 0x40], 2
add eax, 2
add edi, 2
cmp esi, 0x100
jne 0x407f1f
mov eax, dword [ebx + 0x24]
mov dword [ebp - 0x34], eax
mov eax, dword [ebx + 0x1c]
dec eax
test eax, eax
jl 0x4081e1
inc eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 4]
mov edx, dword [ebx + 0x1c]
dec edx
cmp eax, edx
jle 0x407f9d
mov eax, dword [ebx + 0x1c]
dec eax
mov edx, dword [ebp - 0x18]
sub edx, dword [ebp - 4]
test edx, edx
jge 0x407fa9
xor edx, edx
mov ecx, dword [ebx + 0x460]
mov edx, dword [ecx + edx*4]
mov dword [ebp - 0x1c], edx
mov edx, dword [ebx + 0x460]
mov eax, dword [edx + eax*4]
mov dword [ebp - 0x20], eax
mov eax, dword [ebx + 0x30]
dec eax
test eax, eax
jl 0x4081cc
inc eax
mov dword [ebp - 0x3c], eax
xor esi, esi
mov eax, dword [ebp - 4]
add eax, esi
mov edx, dword [ebx + 0x30]
dec edx
cmp eax, edx
jle 0x407fe2
mov eax, edx
mov edx, esi
sub edx, dword [ebp - 4]
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x10], 0
jge 0x407ff5
xor edx, edx
mov dword [ebp - 0x10], edx
mov edx, dword [ebp - 0x34]
movzx edx, word [edx]
lea edx, [edx + edx*2]
mov cx, word [ebp + edx - 0x30040]
mov word [ebp - 0x23], cx
mov cl, byte [ebp + edx - 0x3003e]
mov byte [ebp - 0x21], cl
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
movzx edx, word [edx + ecx*2]
lea edx, [edx + edx*2]
mov cx, word [ebp + edx - 0x30040]
mov word [ebp - 0x26], cx
mov cl, byte [ebp + edx - 0x3003e]
mov byte [ebp - 0x24], cl
mov edx, dword [ebp - 0x1c]
movzx edx, word [edx + eax*2]
lea edx, [edx + edx*2]
mov cx, word [ebp + edx - 0x30040]
mov word [ebp - 0x29], cx
mov cl, byte [ebp + edx - 0x3003e]
mov byte [ebp - 0x27], cl
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x10]
movzx edx, word [edx + ecx*2]
lea edx, [edx + edx*2]
mov cx, word [ebp + edx - 0x30040]
mov word [ebp - 0x2c], cx
mov cl, byte [ebp + edx - 0x3003e]
mov byte [ebp - 0x2a], cl
mov edx, dword [ebp - 0x20]
movzx eax, word [edx + eax*2]
lea eax, [eax + eax*2]
mov dx, word [ebp + eax - 0x30040]
mov word [ebp - 0x2f], dx
mov dl, byte [ebp + eax - 0x3003e]
mov byte [ebp - 0x2d], dl
xor eax, eax
mov al, byte [ebp - 0x23]
imul dword [ebp + 8]
xor edx, edx
mov dl, byte [ebp - 0x26]
imul edx, dword [ebp - 8]
add eax, edx
xor edx, edx
mov dl, byte [ebp - 0x29]
imul edx, dword [ebp + 0x14]
add eax, edx
xor edx, edx
mov dl, byte [ebp - 0x2c]
imul edx, dword [ebp + 0x10]
add eax, edx
xor edx, edx
mov dl, byte [ebp - 0x2f]
imul edx, dword [ebp + 0xc]
add eax, edx
cdq
idiv dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xff
jle 0x4080e6
mov eax, dword [ebx + 0x5c]
mov dword [ebp - 0x14], eax
jmp 0x408101
cmp dword [ebp - 0x14], 0
jge 0x4080f3
xor eax, eax
mov dword [ebp - 0x14], eax
jmp 0x408101
mov eax, dword [ebp - 0x14]
movzx eax, word [ebp + eax*2 - 0x30640]
mov dword [ebp - 0x14], eax
xor eax, eax
mov al, byte [ebp - 0x22]
imul dword [ebp + 8]
xor edx, edx
mov dl, byte [ebp - 0x25]
imul edx, dword [ebp - 8]
add eax, edx
xor edx, edx
mov dl, byte [ebp - 0x28]
imul edx, dword [ebp + 0x14]
add eax, edx
xor edx, edx
mov dl, byte [ebp - 0x2b]
imul edx, dword [ebp + 0x10]
add eax, edx
xor edx, edx
mov dl, byte [ebp - 0x2e]
imul edx, dword [ebp + 0xc]
add eax, edx
cdq
idiv dword [ebp - 0xc]
mov ecx, eax
cmp ecx, 0xff
jle 0x408148
mov ecx, dword [ebx + 0x58]
jmp 0x40815a
test ecx, ecx
jge 0x408150
xor ecx, ecx
jmp 0x40815a
movzx eax, word [ebp + ecx*2 - 0x30440]
mov ecx, eax
xor eax, eax
mov al, byte [ebp - 0x21]
imul dword [ebp + 8]
xor edx, edx
mov dl, byte [ebp - 0x24]
imul edx, dword [ebp - 8]
add eax, edx
xor edx, edx
mov dl, byte [ebp - 0x27]
imul edx, dword [ebp + 0x14]
add eax, edx
xor edx, edx
mov dl, byte [ebp - 0x2a]
imul edx, dword [ebp + 0x10]
add eax, edx
xor edx, edx
mov dl, byte [ebp - 0x2d]
imul edx, dword [ebp + 0xc]
add eax, edx
cdq
idiv dword [ebp - 0xc]
cmp eax, 0xff
jle 0x40819e
mov eax, dword [ebx + 0x54]
jmp 0x4081ae
test eax, eax
jge 0x4081a6
xor eax, eax
jmp 0x4081ae
movzx eax, word [ebp + eax*2 - 0x30240]
mov dx, word [ebp - 0x14]
or dx, cx
or dx, ax
mov eax, dword [ebp - 0x34]
mov word [eax], dx
add dword [ebp - 0x34], 2
inc esi
dec dword [ebp - 0x3c]
jne 0x407fd3
mov eax, dword [ebp - 0x34]
add eax, dword [ebx + 0x20]
mov dword [ebp - 0x34], eax
inc dword [ebp - 0x18]
dec dword [ebp - 0x38]
jne 0x407f8b
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10