Function at 0x40efac
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x60
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x1c], eax
mov ebp, dword [esp + 0x8c]
movsx eax, byte [0x5867ac]
mov dword [esp + 0x48], eax
test eax, eax
je 0x40f0a7
mov eax, 0x3fa00000
mov dword [0x7d4618], eax
mov dword [0x7d461c], eax
movsx edx, byte [0x7d4620]
test edx, edx
jne 0x40f0a7
mov byte [0x7d4620], 1
xor edx, edx
fld qword [0x5622f8]
fld qword [0x5622f0]
mov dword [esp + 0x30], edx
fild dword [esp + 0x30]
fsub st(1)
fld qword [0x5622f8]
fmul st(1)
fadd st(2)
fnstcw word [esp]
movzx eax, word [esp]
or eax, 0xc00
mov dword [esp + 8], eax
fldcw word [esp + 8]
fistp dword [esp + 0x28]
fldcw word [esp]
mov eax, dword [esp + 0x28]
test eax, eax
jl 0x40f051
cmp eax, 0xff
jle 0x40f053
mov eax, 0xff
jmp 0x40f053
xor eax, eax
mov byte [edx + 0x7c9fc0], al
fmul st(2)
fadd st(1)
fnstcw word [esp]
movzx eax, word [esp]
or eax, 0xc00
mov dword [esp + 8], eax
fldcw word [esp + 8]
fistp dword [esp + 0x28]
fldcw word [esp]
mov eax, dword [esp + 0x28]
test eax, eax
jl 0x40f08e
cmp eax, 0xff
jle 0x40f090
mov eax, 0xff
jmp 0x40f090
xor eax, eax
mov byte [edx + 0x7ca0c0], al
inc edx
cmp edx, 0x100
jl 0x40f00c
fstp st(0)
fstp st(0)
mov eax, 0x51eb851f
mov ebp, dword [esp + 0x24]
imul ebp
sar edx, 5
mov eax, ebp
sar eax, 0x1f
sub edx, eax
mov dword [esp + 0x3c], edx
lea eax, [edx + edx]
add eax, eax
sub eax, edx
lea ecx, [edx + eax*8]
add ecx, ecx
add ecx, ecx
neg ecx
add ecx, ebp
mov esi, dword [esp + 0x80]
mov eax, 0x51eb851f
imul esi
sar edx, 5
mov eax, esi
sar eax, 0x1f
sub edx, eax
mov dword [esp + 0x38], edx
lea eax, [edx + edx]
add eax, eax
sub eax, edx
lea ebx, [edx + eax*8]
add ebx, ebx
add ebx, ebx
neg ebx
add ebx, esi
mov esi, dword [esp + 0x94]
mov eax, 0x51eb851f
imul esi
sar edx, 5
mov eax, esi
sar eax, 0x1f
sub edx, eax
mov dword [esp + 0x4c], edx
mov edi, dword [esp + 0x98]
mov eax, 0x51eb851f
imul edi
sar edx, 5
sar edi, 0x1f
sub edx, edi
mov dword [esp + 0x54], edx
shl ecx, 8
mov eax, 0x51eb851f
imul ecx
mov edi, edx
sar edi, 5
sar ecx, 0x1f
sub edi, ecx
mov dword [esp + 0x40], edi
shl ebx, 8
mov eax, 0x51eb851f
imul ebx
sar edx, 5
sar ebx, 0x1f
sub edx, ebx
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x84]
sub eax, ebp
mov dword [esp + 0x44], eax
cmp esi, eax
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x4c]
mov ebp, dword [esp + 0x8c]
jge 0x40f192
xor eax, eax
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x94]
mov edx, dword [esp + 0x44]
cmp eax, edx
jl 0x40f1a7
xor eax, eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x88]
sub eax, dword [esp + 0x80]
mov dword [esp + 0x5c], eax
mov edx, dword [esp + 0x98]
cmp edx, eax
jge 0x40f1ca
xor eax, eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x98]
mov edx, dword [esp + 0x5c]
cmp eax, edx
jl 0x40f1df
xor eax, eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x98]
lea eax, [eax - 0x64]
mov esi, dword [esp + 0x94]
add esi, 0xffffff9c
jne 0x40f1fa
mov esi, 0x64
test eax, eax
jne 0x40f203
mov eax, 0x64
mov edx, dword [esp + 0x54]
test edx, edx
jle 0x40f26e
xor ebx, ebx
mov dword [esp + 0xc], ebx
cdq
mov ebx, edx
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], esi
mov dword [esp + 0x58], eax
mov dword [esp + 0x3c], ecx
mov ebp, dword [esp + 0xc]
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x5c]
imul esi
push ebx
mov ecx, dword [esp + 0x5c]
push ecx
push edx
push eax
call fcn.00459630
add eax, edi
mov dword [ebp*4 + 0x789bc0], eax
add esi, 0x100
inc ebp
mov ecx, dword [esp + 0x54]
cmp ebp, ecx
jl 0x40f230
mov edi, dword [esp + 0x4c]
mov esi, dword [esp + 0x50]
mov ecx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x8c]
mov edx, dword [esp + 0x48]
test edx, edx
je 0x40f2ae
mov edx, dword [esp + 0x54]
test edx, edx
jle 0x40f2ae
xor eax, eax
mov ebx, edx
mov edx, dword [eax*4 + 0x789bc0]
movzx ebp, dl
and edx, 0xffffff00
movzx ebp, byte [ebp + 0x7ca0c0]
or edx, ebp
mov dword [eax*4 + 0x789bc0], edx
inc eax
cmp eax, ebx
jl 0x40f282
mov ebp, dword [esp + 0x8c]
test edi, edi
jle 0x40f35d
xor ebx, ebx
mov dword [esp + 0xc], ebx
mov eax, esi
cdq
mov dword [esp + 0x4c], edi
mov dword [esp + 0x58], edx
mov dword [esp + 0x50], esi
mov dword [esp + 0x3c], ecx
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x44]
imul ebp
mov ecx, dword [esp + 0x58]
push ecx
mov esi, dword [esp + 0x54]
push esi
push edx
push eax
call fcn.00459630
mov edx, dword [esp + 0x40]
add eax, edx
mov ecx, dword [esp + 0x48]
test ecx, ecx
je 0x40f309
movzx edx, al
and eax, 0xffffff00
movzx ecx, byte [edx + 0x7c9fc0]
or eax, ecx
movzx edx, al
mov edi, edx
shl edi, 0x10
add edi, edx
xor ecx, ecx
shld ecx, edx, 0x10
mov esi, edx
shl esi, 0x10
add esi, edx
adc ecx, 0
add edi, ecx
mov dword [ebx*8 + 0x7a9dc0], esi
mov dword [ebx*8 + 0x7a9dc4], edi
sar eax, 8
add eax, eax
add eax, eax
mov dword [ebx*4 + 0x799cc0], eax
add ebp, 0x100
inc ebx
mov eax, dword [esp + 0x4c]
cmp ebx, eax
jl 0x40f2d3
mov edi, eax
mov ecx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x8c]
mov eax, dword [esp + 0x54]
mov dword [esp + 0x14], eax
test eax, eax
jle 0x40f5e4
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x3c], ecx
mov esi, dword [esp + 0x54]
mov ecx, dword [esp + 0x38]
mov ebp, dword [esp + 0x90]
mov edx, dword [eax*4 + 0x789bc0]
sar edx, 8
add edx, ecx
test edx, edx
jge 0x40f397
lea ebx, [eax + 1]
cmp edx, ebp
jge 0x40f5d0
inc eax
cmp eax, esi
jl 0x40f384
mov ecx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x8c]
mov dword [esp + 0x5c], edi
test edi, edi
jle 0x40f5c9
xor esi, esi
xor eax, eax
mov edx, dword [eax*4 + 0x799cc0]
sar edx, 2
add edx, ecx
test edx, edx
jge 0x40f3d2
lea esi, [eax + 1]
cmp edx, ebp
jge 0x40f5c0
inc eax
cmp eax, edi
jl 0x40f3bf
mov eax, dword [esp + 0x14]
cmp ebx, eax
jge 0x40f3ef
mov eax, dword [esp + 0x5c]
cmp esi, eax
jl 0x40f40e
add edi, edi
add edi, edi
mov eax, dword [esp + 0x54]
imul eax, edi
push eax
mov edx, dword [esp + 0x20]
push edx
call dword [0x5a3440]
add esp, 0x68
pop ebx
pop ebp
pop esi
pop edi
ret
add edi, edi
add edi, edi
mov eax, ebx
imul eax, edi
push eax
mov edx, dword [esp + 0x20]
push edx
call dword [0x5a3440]
mov ecx, dword [esp + 0x1c]
mov edx, ecx
imul edx, edi
add edx, dword [esp + 0x24]
mov eax, dword [esp + 0x5c]
imul eax, edi
neg ecx
imul ecx, edi
add eax, ecx
push eax
push edx
call dword [0x5a3440]
add esp, 0x10
movsx ecx, byte [0x5866f4]
test ecx, ecx
jle 0x40f597
mov dword [0x6504a4], 0x15
xor edi, edi
xor eax, eax
mov edx, dword [esp + 0x14]
sub edx, ebx
mov dword [esp + 0x18], esi
mov esi, eax
mov ebp, edx
jmp 0x40f47e
mov ebp, dword [esp + 0x40]
mov ebx, dword [esp + 0x44]
mov dword [esi + 0x6504a8], ebx
mov eax, ebp
cdq
idiv ecx
add eax, ebx
mov dword [esi + 0x6504ac], eax
mov dword [esp + 0x40], ebp
mov dword [esp + 0x44], ebx
mov ebx, dword [esp + 0x98]
mov ebp, dword [esp + 0x94]
mov edx, dword [esp + 0x18]
mov dword [esi + 0x6504b0], edx
mov ecx, dword [esp + 0x5c]
mov dword [esi + 0x6504b4], ecx
mov edx, dword [esp + 0x24]
mov dword [esi + 0x6504b8], edx
mov edx, dword [esp + 0x80]
mov dword [esi + 0x6504bc], edx
mov edx, dword [esp + 0x84]
mov dword [esi + 0x6504c0], edx
mov edx, dword [esp + 0x88]
mov dword [esi + 0x6504c4], edx
mov edx, dword [esp + 0x8c]
mov dword [esi + 0x6504c8], edx
mov edx, dword [esp + 0x90]
mov dword [esi + 0x6504cc], edx
mov dword [esi + 0x6504d0], ebp
mov dword [esi + 0x6504d4], ebx
mov edx, dword [esp + 0x1c]
mov dword [esi + 0x6504d8], edx
mov edx, dword [esp + 0x20]
mov dword [esi + 0x6504dc], edx
push dword [edi*4 + 0x651da0]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0xffffffffffffffff
push dword [edi*4 + 0x651ea0]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
inc edi
movsx ecx, byte [0x5866f4]
cmp edi, ecx
jge 0x40f597
lea eax, [edi + edi]
add eax, eax
sub eax, edi
lea esi, [edi + eax*8]
add esi, esi
add esi, esi
mov dword [esi + 0x6504a4], 0x15
test edi, edi
je 0x40f476
cmp edi, 1
jne 0x40f4a7
mov eax, dword [esp + 0x40]
cdq
idiv ecx
add eax, dword [esp + 0x44]
mov dword [esi + 0x6504a8], eax
mov ecx, dword [esp + 0x14]
mov dword [esi + 0x6504ac], ecx
jmp 0x40f4a7
test ecx, ecx
jle 0x40f5b8
xor ebx, ebx
push 0xffffffffffffffff
push dword [ebx*4 + 0x651fa0]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
inc ebx
movsx eax, byte [0x5866f4]
cmp ebx, eax
jl 0x40f59d
add esp, 0x60
pop ebx
pop ebp
pop esi
pop edi
ret
mov dword [esp + 0x5c], eax
jmp 0x40f3df
xor esi, esi
jmp 0x40f3df
mov ecx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x8c]
mov dword [esp + 0x14], eax
jmp 0x40f3af
xor ebx, ebx
jmp 0x40f3af