Function at 0x412e20
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x57ae0f
push eax
mov eax, dword [esp + 0x10]
mov dword fs:[0], esp
sub esp, 0x120
add eax, 8
push ebx
push ebp
push esi
mov ebx, ecx
push edi
push 0x100
lea ecx, [esp + 0x34]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_strncpy]
lea edx, [esp + 0x3c]
push edx
call dword [sym.imp.MSVCRT.dll__strupr]
lea eax, [esp + 0x40]
push 0x5ba48c
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
lea ecx, [esp + 0x48]
add esp, 0x18
cmp eax, ecx
jne 0x4130ff
lea edx, [esp + 0x30]
lea ecx, [esp + 0x10]
push edx
call fcn.00401d60
mov eax, dword [ebx + 0x7c]
mov ebp, dword [ebx + 0x8c]
inc eax
mov dword [esp + 0x138], 0
cmp eax, ebp
mov dword [esp + 0x28], ebp
jbe 0x413014
push eax
call fcn.00414770
mov esi, eax
add esp, 4
cmp esi, ebp
mov dword [esp + 0x2c], esi
jbe 0x413014
lea eax, [esi*4]
mov dword [esp + 0x1c], esi
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [esp + 0x14], eax
test esi, esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], esi
je 0x412f08
mov ecx, dword [esp + 0x18]
mov eax, ecx
add ecx, 4
test eax, eax
mov dword [esp + 0x18], ecx
je 0x412f05
mov dword [eax], 0
dec esi
jne 0x412eee
xor eax, eax
mov byte [esp + 0x138], 1
test ebp, ebp
mov dword [esp + 0x24], eax
jbe 0x412fa5
mov ecx, dword [ebx + 0x80]
mov edi, dword [ecx + eax*4]
test edi, edi
je 0x412f98
lea ecx, [edi + 8]
call fcn.00402370
mov ebp, eax
xor esi, esi
mov al, byte [ebp]
test al, al
je 0x412f60
and eax, 0xff
push eax
call dword [sym.imp.MSVCRT.dll_tolower]
mov edx, esi
add esp, 4
shl edx, 5
sub edx, esi
add eax, edx
inc ebp
mov esi, eax
mov al, byte [ebp]
test al, al
jne 0x412f3e
mov eax, esi
xor edx, edx
div dword [esp + 0x2c]
mov ecx, dword [ebx + 0x80]
mov eax, dword [esp + 0x24]
mov esi, dword [edi]
mov dword [ecx + eax*4], esi
mov ecx, dword [esp + 0x14]
mov ecx, dword [ecx + edx*4]
mov dword [edi], ecx
mov ecx, dword [esp + 0x14]
mov dword [ecx + edx*4], edi
mov edx, dword [ebx + 0x80]
mov edi, dword [edx + eax*4]
test edi, edi
jne 0x412f2b
mov ebp, dword [esp + 0x28]
inc eax
cmp eax, ebp
mov dword [esp + 0x24], eax
jb 0x412f1e
mov eax, dword [ebx + 0x80]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [ebx + 0x80], ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 0x84]
mov dword [ebx + 0x84], edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
mov eax, dword [ebx + 0x8c]
mov dword [ebx + 0x8c], ecx
mov dword [esp + 0x20], eax
mov eax, dword [ebx + 0x88]
lea ecx, [esp + 0x14]
mov dword [ebx + 0x88], edx
mov dword [esp + 0x1c], eax
mov byte [esp + 0x138], 0
call fcn.00414470
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
lea ecx, [esp + 0x10]
call fcn.00402370
mov edi, eax
xor esi, esi
mov al, byte [edi]
test al, al
je 0x413048
and eax, 0xff
push eax
call dword [sym.imp.MSVCRT.dll_tolower]
mov ecx, esi
add esp, 4
shl ecx, 5
sub ecx, esi
add eax, ecx
inc edi
mov esi, eax
mov al, byte [edi]
test al, al
jne 0x413027
mov ecx, dword [ebx + 0x8c]
mov eax, esi
xor edx, edx
div ecx
mov ebp, edx
mov edx, dword [ebx + 0x80]
mov edi, dword [edx + ebp*4]
test edi, edi
mov esi, edi
je 0x4130a8
push ecx
lea eax, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
call fcn.00401dc0
push ecx
lea edx, [esi + 8]
mov ecx, esp
mov dword [esp + 0x34], esp
push edx
mov byte [esp + 0x144], 2
call fcn.00401dc0
mov byte [esp + 0x140], 0
call fcn.00402660
add esp, 8
test al, al
jne 0x4130eb
mov esi, dword [esi]
test esi, esi
jne 0x413065
push 0xc
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x28], eax
test eax, eax
mov byte [esp + 0x138], 3
je 0x4130d9
lea ecx, [esp + 0x140]
push edi
lea edx, [esp + 0x14]
push ecx
push edx
mov ecx, eax
call fcn.004144f0
jmp 0x4130db
xor eax, eax
mov ecx, dword [ebx + 0x80]
mov dword [ecx + ebp*4], eax
mov eax, dword [ebx + 0x7c]
inc eax
mov dword [ebx + 0x7c], eax
lea ecx, [esp + 0x10]
mov dword [esp + 0x138], 0xffffffff
call fcn.00401e10
mov ecx, dword [esp + 0x140]
call fcn.004aded0
test eax, eax
je 0x413127
push eax
mov ecx, ebx
call fcn.00412e20
mov ecx, dword [esp + 0x140]
call fcn.004adef0
test eax, eax
jne 0x41310f
mov ecx, dword [esp + 0x130]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x12c
ret 4