Function at 0x458f60
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [esp + 0x60]
mov ebx, dword [esp + 0x64]
mov edx, dword [eax + 0x194]
mov dword [esp + 0x2c], eax
test edx, edx
je 0x459273
mov esi, dword [esp + 0x2c]
mov dword [esp + 4], str.gamma_table_being_rebuilt
mov dword [esp], esi
call fcn.00459730
mov dword [esp], esi
call fcn.00458df0
cmp ebx, 8
jg 0x458ff2
mov ecx, dword [esp + 0x2c]
mov eax, 0x186a0
mov edx, dword [ecx + 0x190]
test edx, edx
jle 0x458fc7
mov dword [esp + 4], edx
mov eax, dword [ecx + 0x2e0]
mov dword [esp], eax
call fcn.00458cf0
mov esi, dword [esp + 0x2c]
mov ecx, eax
lea edx, [esi + 0x194]
mov eax, esi
call fcn.00455830
test dword [esi + 0x80], 0x600080
jne 0x459222
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x2c]
test byte [eax + 0x15b], 2
jne 0x459040
mov eax, dword [esp + 0x2c]
movzx edx, byte [eax + 0x1af]
lea eax, [edx - 1]
cmp al, 0xe
jbe 0x459068
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 0x80]
mov edx, eax
and edx, 0x4000400
mov dword [esp + 0x10], eax
je 0x4593b5
mov dword [esp + 0x30], 5
mov dword [esp + 0x34], 5
jmp 0x4590a3
mov ecx, eax
movzx eax, byte [eax + 0x1ac]
movzx edx, byte [ecx + 0x1ad]
cmp dl, al
cmovb edx, eax
movzx eax, byte [ecx + 0x1ae]
cmp dl, al
cmovb edx, eax
lea eax, [edx - 1]
cmp al, 0xe
ja 0x459011
mov ecx, dword [esp + 0x2c]
mov eax, 0x10
sub eax, edx
mov ecx, dword [ecx + 0x80]
mov edx, ecx
and edx, 0x4000400
mov dword [esp + 0x10], ecx
jne 0x459286
cmp al, 8
mov dword [esp + 0x30], 8
mov dword [esp + 0x34], 8
jbe 0x4593b7
mov eax, dword [esp + 0x2c]
test edx, edx
mov ecx, dword [esp + 0x34]
mov dword [eax + 0x18c], ecx
je 0x4592aa
mov ecx, eax
mov eax, dword [eax + 0x190]
mov dword [esp + 0x20], 0x186a0
test eax, eax
jle 0x45911f
fild dword [ecx + 0x2e0]
fmul qword [0x53e808]
mov dword [esp + 0x3c], eax
fild dword [esp + 0x3c]
fmulp st(1)
fadd dword [0x53e814]
fstp qword [esp]
call fcn.004aa140
fld qword [0x53e838]
fucompi st(1)
jb 0x45938d
fld dword [0x53e840]
fxch st(1)
fucomi st(1)
fstp st(1)
jb 0x459391
fstp qword [esp + 0x10]
cvttsd2si eax, qword [esp + 0x10]
mov dword [esp + 0x20], eax
mov edi, dword [esp + 0x30]
mov eax, 1
mov dword [esp + 0x28], 8
mov esi, eax
mov ebx, dword [esp + 0x2c]
sub dword [esp + 0x28], edi
movzx ecx, byte [esp + 0x28]
mov dword [esp], ebx
shl esi, cl
mov ecx, 0x10
sub ecx, edi
shl eax, cl
sub eax, 1
mov dword [esp + 0x24], eax
lea eax, [esi*4]
mov dword [esp + 4], eax
mov dword [esp + 0x38], esi
call fcn.0046b980
mov edi, eax
mov eax, ebx
mov dword [ebx + 0x198], edi
mov ebp, eax
xor ebx, ebx
mov dword [esp + 4], 0x200
mov dword [esp], ebp
call fcn.0046b940
mov dword [edi + ebx*4], eax
add ebx, 1
cmp esi, ebx
ja 0x459176
movzx ecx, byte [esp + 0x34]
mov ebp, 0xff
xor ebx, ebx
mov dword [esp + 0x1c], pe_nt_image_headers32
shr ebp, cl
mov dword [esp + 0x10], ebp
lea esi, [esi]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ecx, eax
lea esi, [ecx - 0x80]
call fcn.004558b0
movzx eax, ax
imul eax, dword [esp + 0x24]
lea edx, [eax + 0x8000]
mov eax, 0x80008001
mul edx
shr edx, 0xf
add edx, 1
cmp edx, ebx
jbe 0x4592a3
mov ecx, dword [esp + 0x28]
lea esi, [esi]
mov eax, dword [esp + 0x10]
mov ebp, ebx
shr ebp, cl
and eax, ebx
add ebx, 1
mov eax, dword [edi + eax*4]
cmp edx, ebx
mov word [eax + ebp*2], si
jne 0x4591f0
add dword [esp + 0x1c], 0x101
cmp dword [esp + 0x1c], 0x1007f
je 0x459351
mov ebx, edx
jmp 0x4591b0
mov esi, dword [esp + 0x2c]
mov eax, dword [esi + 0x2e0]
mov dword [esp], eax
call fcn.00458450
lea edx, [esi + 0x1a0]
mov ecx, eax
mov eax, esi
call fcn.00455830
mov eax, dword [esi + 0x190]
test eax, eax
jle 0x4593a6
mov dword [esp], eax
call fcn.00458450
mov esi, dword [esp + 0x2c]
add esp, 0x4c
mov ecx, eax
pop ebx
lea edx, [esi + 0x19c]
mov eax, esi
pop esi
pop edi
pop ebp
jmp fcn.00455830
mov eax, dword [eax + 0x198]
test eax, eax
jne 0x458f81
jmp 0x458f9d
cmp al, 4
ja 0x45908b
mov dword [esp + 0x30], 5
mov dword [esp + 0x34], 5
jmp 0x4590a3
mov edx, ebx
jmp 0x459208
mov ecx, dword [esp + 0x2c]
mov eax, 0x186a0
mov edx, dword [ecx + 0x190]
test edx, edx
jle 0x4592cf
mov dword [esp + 4], edx
mov eax, dword [ecx + 0x2e0]
mov dword [esp], eax
call fcn.00458cf0
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov dword [esp], eax
lea edx, [esi + 0x198]
mov eax, esi
call fcn.00455340
mov eax, dword [esp + 0x2c]
test dword [eax + 0x80], 0x600080
je 0x458fea
mov esi, eax
mov eax, dword [eax + 0x2e0]
mov dword [esp], eax
call fcn.00458450
mov ecx, dword [esp + 0x30]
lea edx, [esi + 0x1a8]
mov dword [esp], eax
mov eax, esi
call fcn.00455340
mov eax, dword [esi + 0x190]
test eax, eax
jle 0x45939a
mov dword [esp], eax
call fcn.00458450
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x60], eax
mov ecx, dword [esp + 0x30]
add esp, 0x4c
pop ebx
lea edx, [esi + 0x1a4]
mov eax, esi
pop esi
pop edi
pop ebp
jmp fcn.00455340
mov ebx, dword [esp + 0x38]
mov esi, 0xff
movzx ecx, byte [esp + 0x34]
shl ebx, 8
sar esi, cl
cmp edx, ebx
jae 0x4592e7
mov ecx, dword [esp + 0x28]
mov eax, edx
mov ebp, edx
and eax, esi
add edx, 1
mov eax, dword [edi + eax*4]
shr ebp, cl
cmp edx, ebx
mov word [eax + ebp*2], 0xffff
jne 0x459370
jmp 0x4592e7
fstp st(0)
jmp 0x459393
fstp st(0)
xor eax, eax
jmp 0x45911b
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 0x2e0]
jmp 0x459331
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 0x2e0]
jmp 0x459259
xor eax, eax
movzx eax, al
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], eax
jmp 0x4590a3