Function at 0x403030
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xec
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0xec], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0xe8], edx
mov edx, eax
and edx, 0xff
push ebx
mov dword [ebp - 0xe4], edx
xor edx, edx
mov dl, ah
push esi
mov dword [ebp - 0xe0], edx
xor edx, edx
mov dl, byte [ebp + 0x22]
push edi
shr eax, 0x18
mov dword [ebp - 0xd8], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xdc], edx
mov edx, dword [ebp + 0x14]
mov dword [ebp - 0xd4], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0xd0], edx
mov edx, eax
and edx, 0xff
mov dword [ebp - 0x84], ecx
mov dword [ebp - 0xcc], edx
xor edx, edx
mov dl, ah
mov dword [ebp - 0xc8], edx
xor edx, edx
mov dl, byte [ebp + 0x26]
shr eax, 0x18
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0xc4], edx
mov edx, dword [ebp + 0x1c]
mov dword [ebp - 0xbc], eax
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0xb8], edx
mov edx, eax
fld dword [ebp + 0xc]
fcomp dword [ebp + 0x14]
and edx, 0xff
mov dword [ebp - 0xb4], edx
xor edx, edx
mov dl, ah
shr eax, 0x18
mov dword [ebp - 0xa8], eax
mov eax, dword [ecx + 0x30]
mov dword [ebp - 0xb0], edx
mov dword [ebp - 0xa4], eax
xor edx, edx
mov dl, byte [ebp + 0x2a]
fnstsw ax
mov dword [ebp - 0xac], edx
test ah, 1
je 0x40312c
fld dword [ebp + 0xc]
fcomp dword [ebp + 0x1c]
fnstsw ax
test ah, 1
je 0x40313e
xor ebx, ebx
jmp 0x403143
fld dword [ebp + 0x14]
fcomp dword [ebp + 0x1c]
mov ebx, 1
fnstsw ax
test ah, 1
jne 0x403143
mov ebx, 2
lea ecx, [ebx + ebx*2]
lea edi, [ebp - 0x70]
lea eax, [ebx + 1]
lea esi, [ebp + ecx*8 - 0xec]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
cdq
mov ecx, 3
lea edi, [ebp - 0x58]
idiv ecx
mov ecx, 6
lea eax, [ebx + 2]
lea edx, [edx + edx*2]
lea esi, [ebp + edx*8 - 0xec]
rep movsd dword es:[edi], dword [esi]
cdq
mov ecx, 3
lea edi, [ebp - 0x40]
idiv ecx
mov ecx, 6
lea edx, [edx + edx*2]
lea esi, [ebp + edx*8 - 0xec]
rep movsd dword es:[edi], dword [esi]
fld dword [ebp - 0x58]
fsub dword [ebp - 0x70]
fld dword [ebp - 0x40]
fsub dword [ebp - 0x70]
fld dword [ebp - 0x54]
fsub dword [ebp - 0x6c]
fst dword [ebp - 0x80]
fld dword [ebp - 0x3c]
fsub dword [ebp - 0x6c]
fstp dword [ebp - 0x78]
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x14], eax
fld dword [ebp + 0x14]
fmul st(3)
fld st(1)
fmul st(3)
fsubp st(1)
fst dword [ebp + 0xc]
fcomp dword [0x4996f4]
fnstsw ax
test ah, 0x41
jne 0x40375b
mov ecx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x68]
mov edx, dword [ebp - 0x38]
sub ecx, eax
mov dword [ebp + 0x1c], ecx
mov ecx, dword [ebp - 0x4c]
fild dword [ebp + 0x1c]
sub edx, eax
mov eax, dword [ebp - 0x64]
mov dword [ebp + 0x1c], edx
mov edx, dword [ebp - 0x34]
fild dword [ebp + 0x1c]
sub ecx, eax
sub edx, eax
mov eax, dword [ebp - 0x60]
mov dword [ebp + 0x1c], ecx
fild dword [ebp + 0x1c]
mov ecx, dword [ebp - 0x48]
mov dword [ebp + 0x1c], edx
mov edx, dword [ebp - 0x30]
sub ecx, eax
fstp dword [ebp + 0x20]
fild dword [ebp + 0x1c]
mov dword [ebp + 0x24], ecx
mov ecx, dword [ebp - 0x44]
sub edx, eax
mov eax, dword [ebp - 0x5c]
fstp dword [ebp + 0x1c]
fild dword [ebp + 0x24]
mov dword [ebp + 0x24], edx
mov edx, dword [ebp - 0x2c]
sub ecx, eax
sub edx, eax
fstp dword [ebp - 0x1c]
fild dword [ebp + 0x24]
mov dword [ebp + 0x24], ecx
fstp dword [ebp + 0x18]
fild dword [ebp + 0x24]
mov dword [ebp + 0x24], edx
fstp dword [ebp - 0x18]
fild dword [ebp + 0x24]
fstp dword [ebp - 0x20]
fld st(1)
fmul dword [ebp + 0x14]
fld st(1)
fmul st(4)
fsubp st(1)
fdiv dword [ebp + 0xc]
fstp dword [ebp + 0x24]
fld dword [ebp + 0x20]
fmul dword [ebp + 0x14]
fld dword [ebp + 0x1c]
fmul st(4)
fsubp st(1)
fdiv dword [ebp + 0xc]
fstp dword [ebp + 0x28]
fld dword [ebp - 0x1c]
fmul dword [ebp + 0x14]
fld dword [ebp + 0x18]
fmul st(4)
fsubp st(1)
fdiv dword [ebp + 0xc]
fstp dword [ebp + 8]
fld dword [ebp - 0x18]
fmul dword [ebp + 0x14]
fld dword [ebp - 0x20]
fmul st(4)
fsubp st(1)
fdiv dword [ebp + 0xc]
fstp dword [ebp + 0x10]
fmul st(4)
fxch st(1)
fmul st(3)
fsubp st(1)
fdiv dword [ebp + 0xc]
fstp dword [ebp - 0x74]
fstp st(0)
fld dword [ebp + 0x1c]
fmul st(2)
fld dword [ebp + 0x20]
fmul st(2)
fsubp st(1)
fdiv dword [ebp + 0xc]
fstp dword [ebp - 0x7c]
fld dword [ebp + 0x18]
fmul st(2)
fld dword [ebp - 0x1c]
fmul st(2)
fsubp st(1)
fdiv dword [ebp + 0xc]
fstp dword [ebp - 0x1c]
fld dword [ebp - 0x20]
fmul st(2)
fld dword [ebp - 0x18]
fmul st(2)
fsubp st(1)
fdiv dword [ebp + 0xc]
fstp dword [ebp - 0x18]
fstp st(0)
fstp st(0)
fild dword [ebp - 0x68]
fld dword [ebp - 0x74]
fmul dword [ebp - 0x6c]
fsubp st(1)
fld dword [ebp + 0x24]
fmul dword [ebp - 0x70]
fsubp st(1)
fstp dword [ebp - 0x20]
fild dword [ebp - 0x64]
fld dword [ebp - 0x7c]
fmul dword [ebp - 0x6c]
fsubp st(1)
fld dword [ebp + 0x28]
fmul dword [ebp - 0x70]
fsubp st(1)
fstp dword [ebp - 0x88]
fild dword [ebp - 0x60]
fld dword [ebp - 0x1c]
fmul dword [ebp - 0x6c]
fsubp st(1)
fld dword [ebp + 8]
fmul dword [ebp - 0x70]
fsubp st(1)
fstp dword [ebp - 0x9c]
fild dword [ebp - 0x5c]
fld dword [ebp - 0x18]
fmul dword [ebp - 0x6c]
fsubp st(1)
fld dword [ebp + 0x10]
fmul dword [ebp - 0x70]
fsubp st(1)
fstp dword [ebp - 0x8c]
fld dword [ebp + 0x24]
fmul dword [0x4996f0]
call fcn.00464e6c
fld dword [ebp + 0x28]
fmul dword [0x4996f0]
mov word [ebp - 0x28], ax
call fcn.00464e6c
fld dword [ebp + 8]
fmul dword [0x4996f0]
mov word [ebp - 0x26], ax
call fcn.00464e6c
fld dword [ebp + 0x10]
fmul dword [0x4996f0]
mov word [ebp - 0x24], ax
call fcn.00464e6c
fld dword [ebp - 0x54]
mov bx, ax
mov word [ebp - 0x22], 0
mov word [ebp - 0x92], bx
mov word [ebp - 0x94], bx
mov word [ebp - 0x96], bx
mov word [ebp - 0x98], bx
fadd dword [0x4996ec]
fld dword [ebp - 0x3c]
fadd dword [0x4996ec]
fstp dword [ebp + 0xc]
fcom dword [ebp + 0xc]
fnstsw ax
test ah, 0x41
je 0x4033d0
fstp st(0)
fld dword [ebp + 0xc]
call fcn.00464e6c
mov ecx, eax
mov eax, dword [0x4aa0d4]
cmp ecx, eax
mov dword [ebp + 0x18], ecx
jl 0x4033e6
mov dword [ebp + 0x18], eax
fld dword [ebp - 0x6c]
fadd dword [0x4996ec]
call fcn.00464e6c
xor ecx, ecx
test eax, eax
setl cl
dec ecx
and ecx, eax
mov eax, dword [ebp + 0x18]
mov esi, ecx
cmp esi, eax
mov dword [ebp + 0x20], esi
jge 0x403761
fild dword [ebp + 0x20]
fadd dword [0x4996ec]
fst dword [ebp + 0xc]
fcomp dword [ebp - 0x3c]
fnstsw ax
test ah, 0x41
je 0x403450
fld dword [ebp - 0x6c]
fcomp dword [ebp - 0x3c]
fnstsw ax
test ah, 1
je 0x403450
fld dword [ebp - 0x3c]
fsub dword [ebp + 0xc]
fstp dword [ebp + 0x14]
fld dword [ebp + 0xc]
fsub dword [ebp - 0x6c]
fmul dword [ebp - 0x40]
fld dword [ebp + 0x14]
fmul dword [ebp - 0x70]
faddp st(1)
fdiv dword [ebp - 0x78]
jmp 0x403472
fld dword [ebp - 0x3c]
fsub dword [ebp + 0xc]
fstp dword [ebp + 0x14]
fld dword [ebp + 0xc]
fsub dword [ebp - 0x54]
fmul dword [ebp - 0x40]
fld dword [ebp + 0x14]
fmul dword [ebp - 0x58]
faddp st(1)
fld dword [ebp - 0x3c]
fsub dword [ebp - 0x54]
fdivp st(1)
fld dword [ebp + 0xc]
fcomp dword [ebp - 0x54]
fnstsw ax
test ah, 0x41
je 0x4034a5
fld dword [ebp - 0x6c]
fcomp dword [ebp - 0x54]
fnstsw ax
test ah, 1
je 0x4034a5
fld dword [ebp - 0x54]
fsub dword [ebp + 0xc]
fmul dword [ebp - 0x70]
fld dword [ebp + 0xc]
fsub dword [ebp - 0x6c]
fmul dword [ebp - 0x58]
faddp st(1)
fdiv dword [ebp - 0x80]
jmp 0x4034be
fld dword [ebp + 0xc]
fsub dword [ebp - 0x54]
fmul dword [ebp - 0x40]
fld dword [ebp + 0x14]
fmul dword [ebp - 0x58]
faddp st(1)
fld dword [ebp - 0x3c]
fsub dword [ebp - 0x54]
fdivp st(1)
fstp dword [ebp + 0x14]
fadd dword [0x4996ec]
fcom dword [0x4996f4]
fnstsw ax
test ah, 0x41
je 0x4034dc
fstp st(0)
fld dword [0x4996f4]
fld dword [ebp + 0x14]
fadd dword [0x4996ec]
fild dword [0x4aa0d0]
fstp dword [ebp + 0x14]
fcom dword [ebp + 0x14]
fnstsw ax
test ah, 1
jne 0x4034fd
fstp st(0)
fld dword [ebp + 0x14]
fxch st(1)
call fcn.00464e6c
mov dword [ebp + 0x14], eax
call fcn.00464e6c
mov ecx, dword [ebp - 0x84]
mov dword [ebp + 0x1c], eax
lea edx, [ebp + 0x1c]
lea eax, [ebp + 0x14]
push edx
push eax
push esi
call fcn.00402ea0
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x1c]
cmp eax, ecx
jge 0x403743
fild dword [ebp + 0x14]
imul esi, dword [0x4aa0d0]
fadd dword [0x4996ec]
fld dword [ebp + 0xc]
fmul dword [ebp - 0x74]
fld st(1)
fmul dword [ebp + 0x24]
mov ecx, dword [ebp - 0xa4]
add esi, eax
faddp st(1)
lea esi, [ecx + esi*4]
mov dword [ebp - 0xa0], esi
fadd dword [ebp - 0x20]
fmul dword [0x4996f0]
call fcn.00464e6c
fld dword [ebp + 0xc]
fmul dword [ebp - 0x7c]
fld st(1)
fmul dword [ebp + 0x28]
mov word [ebp - 8], ax
faddp st(1)
fadd dword [ebp - 0x88]
fmul dword [0x4996f0]
call fcn.00464e6c
fld dword [ebp + 0xc]
fmul dword [ebp - 0x1c]
fld st(1)
fmul dword [ebp + 8]
mov word [ebp - 6], ax
faddp st(1)
fadd dword [ebp - 0x9c]
fmul dword [0x4996f0]
call fcn.00464e6c
fld dword [ebp + 0xc]
fmul dword [ebp - 0x18]
fxch st(1)
fmul dword [ebp + 0x10]
mov word [ebp - 4], ax
faddp st(1)
fadd dword [ebp - 0x8c]
fmul dword [0x4996f0]
call fcn.00464e6c
mov edx, dword [ebp + 0x14]
mov di, ax
mov eax, dword [ebp + 0x1c]
mov word [ebp - 0xe], di
sub eax, edx
mov edx, dword [ebp - 0x84]
mov word [ebp - 0x10], di
mov word [ebp - 0x12], di
mov ecx, dword [edx + 0x2c]
mov word [ebp - 0x14], di
test ecx, ecx
mov word [ebp - 2], 0x7f80
mov dword [ebp + 0xc], eax
je 0x403656
pxor mm0, mm0
mov edi, dword [ebp - 0xa0]
movq mm4, qword [ebp - 8]
movq mm5, qword [ebp - 0x28]
movq mm6, qword [ebp - 0x14]
movq mm7, qword [ebp - 0x98]
mov ecx, dword [ebp + 0xc]
movd mm1, dword [edi]
punpcklbw mm1, mm0
movq mm2, mm4
psraw mm2, 7
psubw mm2, mm1
psllw mm2, 1
pmulhw mm2, mm6
paddw mm1, mm2
packuswb mm1, mm0
movd dword [edi], mm1
paddw mm4, mm5
paddw mm6, mm7
add edi, 4
dec ecx
jne 0x403623
emms
jmp 0x403740
test eax, eax
jle 0x403740
mov dword [ebp + 0xc], eax
mov cl, byte [esi]
mov eax, dword [ebp - 8]
and eax, 0xffff
mov edx, ecx
shr eax, 7
and edx, 0xff
add di, bx
sub eax, edx
mov edx, dword [ebp - 0x14]
and edx, 0xffff
add word [ebp - 0x14], bx
imul eax, edx
sar eax, 0xf
add al, cl
mov cl, byte [esi + 1]
mov byte [esi], al
mov eax, dword [ebp - 6]
and eax, 0xffff
mov edx, ecx
shr eax, 7
and edx, 0xff
add esi, 4
sub eax, edx
mov edx, dword [ebp - 0x12]
and edx, 0xffff
add word [ebp - 0x12], bx
imul eax, edx
mov dl, byte [esi - 2]
sar eax, 0xf
add al, cl
mov ecx, dword [ebp - 4]
mov byte [esi - 3], al
and ecx, 0xffff
mov eax, edx
shr ecx, 7
and eax, 0xff
sub ecx, eax
mov eax, dword [ebp - 0x10]
and eax, 0xffff
add word [ebp - 0x10], bx
imul ecx, eax
mov eax, dword [ebp - 0xe]
mov word [ebp - 0xe], di
sar ecx, 0xf
add cl, dl
mov edx, 0xff
mov byte [esi - 2], cl
and ecx, 0xff
sub edx, ecx
and eax, 0xffff
imul edx, eax
mov al, byte [esi - 1]
mov cx, word [ebp - 0x28]
sar edx, 0xf
add word [ebp - 8], cx
add al, dl
mov dx, word [ebp - 0x26]
mov byte [esi - 1], al
mov ax, word [ebp - 0x24]
add word [ebp - 6], dx
add word [ebp - 4], ax
mov eax, dword [ebp + 0xc]
dec eax
mov dword [ebp + 0xc], eax
jne 0x403661
mov esi, dword [ebp + 0x20]
mov eax, dword [ebp + 0x18]
inc esi
cmp esi, eax
mov dword [ebp + 0x20], esi
jl 0x40340e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
fstp st(0)
fstp st(0)
fstp st(0)
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24