Function at 0x414fe0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x28
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov al, byte [ebp + 0x4422]
mov cx, word [ebp + 0x441c]
mov dl, byte [ebp + 0x4423]
mov bx, word [ebp + 0x441e]
mov di, word [ebp + 0x4420]
mov byte [esp + 0x20], al
mov al, byte [ebp + 0x4424]
mov word [esp + 0x24], cx
mov byte [esp + 0x18], al
mov al, byte [esp + 0x4c]
test al, 2
mov byte [esp + 0x1c], dl
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], edi
je 0x4150d5
lea ecx, [esp + 0x30]
push 4
push ecx
mov ecx, ebp
call fcn.0040b880
mov cl, byte [esp + 0x18]
mov eax, dword [esp + 0x24]
mov esi, edi
mov edi, dword [esp + 0x30]
mov edx, edi
and esi, 0xffff
shr edx, cl
and eax, 0xffff
mov cl, byte [esp + 0x1c]
mov dword [esp + 0x14], eax
and ebx, 0xffff
and edx, esi
mov eax, edx
shl eax, 8
sub eax, edx
xor edx, edx
div esi
mov edx, edi
shr edx, cl
mov cl, byte [esp + 0x20]
shr edi, cl
mov ecx, dword [esp + 0x14]
and edx, ebx
and edi, ecx
mov esi, eax
mov eax, edx
shl eax, 8
sub eax, edx
xor edx, edx
div ebx
and esi, 0xff
xor edx, edx
or esi, 0x200
mov ebx, dword [esp + 0x28]
shl esi, 8
and eax, 0xff
or esi, eax
mov eax, edi
shl eax, 8
sub eax, edi
mov edi, dword [esp + 0x2c]
div ecx
shl esi, 8
and eax, 0xff
or esi, eax
mov dword [0x44a1e0], esi
jmp 0x4150db
mov esi, dword [0x44a1e0]
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
push esi
push edx
mov edx, dword [esp + 0x44]
push eax
push ecx
push edx
mov ecx, ebp
call fcn.0040c900
test byte [esp + 0x4c], 4
je 0x41519a
lea eax, [esp + 0x34]
push 4
push eax
mov ecx, ebp
call fcn.0040b880
mov esi, dword [esp + 0x34]
mov cl, byte [esp + 0x18]
mov eax, dword [esp + 0x24]
mov edx, esi
shr edx, cl
and edi, 0xffff
and eax, 0xffff
mov dword [esp + 0x14], eax
mov cl, byte [esp + 0x1c]
and ebx, 0xffff
and edx, edi
mov eax, edx
shl eax, 8
sub eax, edx
xor edx, edx
div edi
mov edx, esi
shr edx, cl
mov cl, byte [esp + 0x20]
shr esi, cl
mov ecx, dword [esp + 0x14]
and edx, ebx
and esi, ecx
mov edi, eax
mov eax, edx
shl eax, 8
sub eax, edx
xor edx, edx
div ebx
and edi, 0xff
xor edx, edx
or edi, 0x200
mov ebx, dword [esp + 0x28]
shl edi, 8
and eax, 0xff
or edi, eax
mov eax, esi
shl eax, 8
sub eax, esi
div ecx
shl edi, 8
and eax, 0xff
or edi, eax
mov dword [0x44a1e4], edi
test byte [esp + 0x4c], 8
je 0x41537c
lea ecx, [esp + 0x10]
push 1
push ecx
mov ecx, ebp
call fcn.0040b880
mov al, byte [esp + 0x4c]
mov edi, dword [ebp + 0x1c4]
test al, 0x10
mov eax, dword [esp + 0x10]
je 0x415310
and eax, 0xff
mov ecx, ebp
lea edx, [eax + eax*2]
shl edx, 1
push edx
push edi
call fcn.0040b880
mov al, byte [esp + 0x10]
mov dword [esp + 0x4c], 0
test al, al
jbe 0x41537c
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x18]
and eax, 0xff
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x20]
and eax, 0xff
and ecx, 0xff
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x24]
and esi, 0xffff
and ebx, 0xffff
and eax, 0xffff
mov dword [esp + 0x48], ecx
mov dword [esp + 0x44], esi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x14], eax
jmp 0x415247
mov ecx, dword [esp + 0x48]
mov esi, dword [esp + 0x44]
mov ebx, dword [edi]
add edi, 4
mov edx, ebx
shr edx, cl
mov ecx, dword [esp + 0x2c]
and edx, esi
mov eax, edx
shl eax, 8
sub eax, edx
xor edx, edx
div esi
mov edx, ebx
shr edx, cl
mov ecx, dword [esp + 0x28]
and edx, ecx
mov esi, eax
mov eax, edx
shl eax, 8
sub eax, edx
xor edx, edx
div ecx
mov ecx, dword [esp + 0x20]
and esi, 0xff
shr ebx, cl
mov ecx, dword [esp + 0x14]
or esi, 0x200
shl esi, 8
xor edx, edx
and ebx, ecx
and eax, 0xff
or esi, eax
mov eax, ebx
shl eax, 8
sub eax, ebx
div ecx
shl esi, 8
and eax, 0xff
or esi, eax
xor eax, eax
mov dword [0x44a1e4], esi
mov al, byte [edi]
mov edx, eax
and eax, 0xf
shr edx, 4
mov ebx, eax
inc edi
xor eax, eax
push esi
mov al, byte [edi]
mov ecx, eax
and eax, 0xf
shr ecx, 4
inc ecx
inc eax
push eax
mov eax, dword [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x48]
add ebx, eax
add edx, ecx
push ebx
push edx
mov ecx, ebp
inc edi
call fcn.0040c900
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x10]
inc eax
and edx, 0xff
cmp eax, edx
mov dword [esp + 0x4c], eax
jl 0x41523f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 0x14
and eax, 0xff
mov ecx, ebp
shl eax, 1
push eax
push edi
call fcn.0040b880
mov al, byte [esp + 0x10]
xor esi, esi
test al, al
jbe 0x41537c
xor eax, eax
mov al, byte [edi]
mov edx, eax
and eax, 0xf
shr edx, 4
mov ebx, eax
inc edi
xor eax, eax
mov al, byte [edi]
mov ecx, eax
and eax, 0xf
shr ecx, 4
inc ecx
inc eax
mov dword [esp + 0x4c], eax
mov eax, dword [0x44a1e4]
push eax
mov eax, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x44]
push ecx
mov ecx, dword [esp + 0x4c]
add ebx, ecx
add edx, eax
push ebx
push edx
mov ecx, ebp
inc edi
call fcn.0040c900
mov ecx, dword [esp + 0x10]
inc esi
and ecx, 0xff
cmp esi, ecx
jl 0x41532a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 0x14