Function at 0x407474
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
xor edx, edx
mov dword [ebp - 0x120], edx
mov dword [ebp - 0x11c], edx
mov dword [ebp - 4], edx
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x10], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x4077b8
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x4126e0]
sub eax, 1
jb 0x4074be
je 0x40762d
jmp 0x40778d
lea eax, [ebp - 4]
mov edx, ebx
call fcn.004034e8
mov eax, dword [ebp - 4]
call fcn.0040353c
mov dword [ebp - 0x14], eax
xor ebx, ebx
mov edx, dword [ebp - 0x14]
test edx, edx
jle 0x407500
mov eax, 1
mov ecx, dword [ebp - 4]
mov cl, byte [ecx + eax - 1]
and ecx, 0xff
mov dword [ebp - 0x18], ecx
lea ecx, [eax + 0x7a]
imul ecx, dword [ebp - 0x18]
add ebx, ecx
add ebx, eax
inc eax
dec edx
jne 0x4074e1
mov eax, ebx
mov ecx, 0x2710
cdq
idiv ecx
mov ebx, edx
lea edx, [ebp - 0x118]
mov eax, ebx
call fcn.00402a58
lea edx, [ebp - 0x118]
lea eax, [ebp - 8]
call fcn.00403518
mov eax, dword [ebp - 8]
call fcn.0040353c
dec eax
je 0x40753a
dec eax
je 0x40754c
dec eax
je 0x40755e
jmp 0x40756e
lea eax, [ebp - 8]
mov ecx, dword [ebp - 8]
mov edx, 0x4077d0
call fcn.00403588
jmp 0x40756e
lea eax, [ebp - 8]
mov ecx, dword [ebp - 8]
mov edx, 0x4077dc
call fcn.00403588
jmp 0x40756e
lea eax, [ebp - 8]
mov ecx, dword [ebp - 8]
mov edx, 0x4077e8
call fcn.00403588
lea eax, [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
call fcn.00403588
mov eax, dword [ebp - 0xc]
call fcn.0040353c
mov dword [ebp - 0x14], eax
mov ebx, 0x4de
mov edx, dword [ebp - 0x14]
test edx, edx
jle 0x4075cc
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov cl, byte [ecx + eax - 1]
and ecx, 0xff
mov dword [ebp - 0x18], ecx
mov ecx, eax
dec ecx
imul ecx, dword [ebp - 0x14]
add ebx, ecx
mov ecx, dword [ebp - 0x14]
add ecx, eax
dec ecx
imul ecx, dword [ebp - 0x18]
add ebx, ecx
mov ecx, eax
dec ecx
mov esi, eax
dec esi
imul ecx, esi
add ebx, ecx
inc eax
dec edx
jne 0x407598
mov eax, ebx
mov ecx, 0x2710
cdq
idiv ecx
mov ebx, edx
cmp ebx, 0x3e8
jge 0x4075e6
add ebx, 0x1770
lea edx, [ebp - 0x118]
mov eax, ebx
call fcn.00402a58
lea edx, [ebp - 0x118]
lea eax, [ebp - 0x10]
call fcn.00403518
lea eax, [ebp - 0x11c]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x10]
call fcn.00403588
mov eax, dword [ebp - 0x11c]
call fcn.0040360c
push eax
push 0x41269c
call sub.KERNEL32.dll_lstrcpy
jmp 0x40778d
lea eax, [ebp - 4]
mov edx, ebx
call fcn.004034e8
mov eax, dword [ebp - 4]
call fcn.0040353c
mov dword [ebp - 0x14], eax
xor ebx, ebx
mov edx, dword [ebp - 0x14]
test edx, edx
jle 0x407670
mov eax, 1
mov ecx, dword [ebp - 4]
mov cl, byte [ecx + eax - 1]
and ecx, 0xff
mov dword [ebp - 0x18], ecx
lea ecx, [eax + 0xff]
imul ecx, dword [ebp - 0x18]
add ebx, ecx
inc eax
dec edx
jne 0x407650
mov eax, ebx
mov ecx, 0x2710
cdq
idiv ecx
mov ebx, edx
lea edx, [ebp - 0x118]
mov eax, ebx
call fcn.00402a58
lea edx, [ebp - 0x118]
lea eax, [ebp - 8]
call fcn.00403518
mov eax, dword [ebp - 8]
call fcn.0040353c
dec eax
je 0x4076aa
dec eax
je 0x4076bc
dec eax
je 0x4076ce
jmp 0x4076de
lea eax, [ebp - 8]
mov ecx, dword [ebp - 8]
mov edx, 0x4077d0
call fcn.00403588
jmp 0x4076de
lea eax, [ebp - 8]
mov ecx, dword [ebp - 8]
mov edx, 0x4077dc
call fcn.00403588
jmp 0x4076de
lea eax, [ebp - 8]
mov ecx, dword [ebp - 8]
mov edx, 0x4077e8
call fcn.00403588
lea eax, [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
call fcn.00403588
mov eax, dword [ebp - 0xc]
call fcn.0040353c
mov dword [ebp - 0x14], eax
mov ebx, 0xc8a
mov edx, dword [ebp - 0x14]
test edx, edx
jle 0x407731
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov cl, byte [ecx + eax - 1]
and ecx, 0xff
mov dword [ebp - 0x18], ecx
mov ecx, eax
dec ecx
imul ecx, dword [ebp - 0x14]
add ebx, ecx
mov ecx, dword [ebp - 0x14]
add ecx, eax
dec ecx
imul ecx, dword [ebp - 0x18]
add ebx, ecx
inc eax
dec edx
jne 0x407708
mov eax, ebx
mov ecx, 0x186a0
cdq
idiv ecx
mov ebx, edx
cmp ebx, 0x2710
jge 0x40774b
add ebx, 0x13880
lea edx, [ebp - 0x118]
mov eax, ebx
call fcn.00402a58
lea edx, [ebp - 0x118]
lea eax, [ebp - 0x10]
call fcn.00403518
lea eax, [ebp - 0x120]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x10]
call fcn.00403588
mov eax, dword [ebp - 0x120]
call fcn.0040360c
push eax
push 0x41269c
call sub.KERNEL32.dll_lstrcpy
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4077bf
lea eax, [ebp - 0x120]
mov edx, 2
call fcn.00403418
lea eax, [ebp - 0x10]
mov edx, 4
call fcn.00403418
ret