Function at 0x42b190
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
mov ebx, ecx
mov dword [ebp - 4], edx
xor ecx, ecx
mov edx, dword [ebp + 0x14]
cmp dword [ebp + 0x18], 0x10
push esi
sete cl
mov dword [ebp - 0x3c], ebx
inc ecx
push edi
mov edi, ecx
imul edi, dword [ebp + 0xc]
mov eax, edi
imul eax, dword [ebp + 0x10]
mov dword [ebp - 0x34], eax
mov eax, dword [ebx]
mov eax, dword [eax + 8]
mov dword [ebp - 0x1c], eax
imul eax, ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 8], ecx
mov dword [ebp - 0x14], eax
test ecx, ecx
js 0x42bbcf
test edx, edx
js 0x42bbcf
mov esi, DirectSoundCreate
je 0x42b1fa
xor edx, edx
mov eax, esi
div dword [ebp + 0x14]
cmp ecx, eax
jg 0x42bbcf
mov edx, dword [ebp + 0x14]
imul ecx, edx
test ecx, ecx
js 0x42bbcf
test edi, edi
js 0x42bbcf
je 0x42b21f
mov eax, esi
cdq
idiv edi
cmp ecx, eax
jg 0x42bbcf
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x34]
imul eax, edx
push eax
call fcn.00466b42
add esp, 4
mov dword [ebx + 0xc], eax
test eax, eax
je 0x42bbd6
mov edi, dword [ebp - 0x1c]
test edi, edi
js 0x42bbb4
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x42b259
xor edx, edx
mov eax, esi
div ecx
cmp edi, eax
jg 0x42bbb4
mov ebx, edi
imul ebx, ecx
mov dword [ebp - 0xc], ebx
test ebx, ebx
js 0x42bbb4
mov edi, dword [ebp + 0x18]
test edi, edi
js 0x42bbb4
je 0x42b284
xor edx, edx
mov eax, esi
div edi
cmp ebx, eax
jg 0x42bbb4
mov eax, ebx
imul eax, edi
cmp eax, 0x7ffffff8
jg 0x42bbb4
mov ecx, edi
imul ecx, ebx
mov ebx, dword [ebp + 0x14]
add ecx, 7
shr ecx, 3
mov dword [ebp - 0x30], ecx
test ebx, ebx
je 0x42b2b7
xor edx, edx
mov eax, esi
div ebx
cmp ecx, eax
jg 0x42bbb4
mov eax, ecx
sub esi, ecx
imul eax, ebx
cmp eax, esi
jg 0x42bbb4
lea eax, [ecx + 1]
imul eax, ebx
cmp dword [ebp + 8], eax
jae 0x42b2ec
mov eax, dword fs:[0x2c]
pop edi
pop esi
pop ebx
mov eax, dword [eax]
mov dword [eax + 8], str.not_enough_pixels
xor eax, eax
mov esp, ebp
pop ebp
ret
lea eax, [ecx + ecx]
push eax
call fcn.00466b42
add esp, 4
mov dword [ebp - 0x28], eax
test eax, eax
je 0x42bbd6
cmp edi, 8
jge 0x42b315
mov edx, dword [ebp - 0x30]
mov ebx, 1
mov dword [ebp - 0x14], ebx
jmp 0x42b31b
mov edx, dword [ebp - 8]
mov ebx, dword [ebp - 0x14]
xor edi, edi
mov dword [ebp - 0x20], edi
cmp dword [ebp + 0x14], edi
jbe 0x42bba0
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 4]
imul edx, ebx
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x40], eax
mov dword [ebp - 8], edx
nop dword [eax + eax]
mov edx, dword [ebp - 0x20]
mov esi, edi
imul edx, dword [ebp - 0x34]
not edi
movzx eax, byte [ecx]
and esi, 1
imul esi, dword [ebp - 0x30]
and edi, 1
imul edi, dword [ebp - 0x30]
inc ecx
mov dword [ebp - 4], ecx
add edx, dword [ebp - 0x40]
mov dword [ebp - 0x10], edx
add esi, dword [ebp - 0x28]
add edi, dword [ebp - 0x28]
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x18], edi
cmp eax, 4
ja 0x42bb7a
cmp dword [ebp - 0x20], 0
jne switch.0x0042b391
movzx eax, byte [eax + 0x4a5884]
cmp eax, 5
ja 0x42b872
jmp dword [eax*4 + 0x42bbf4]
push dword [ebp - 8]
push ecx
push esi
call fcn.0045ea40
add esp, 0xc
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
mov edi, dword [ebp + 0x18]
add ecx, eax
mov dword [ebp - 4], ecx
cmp edi, 8
jge 0x42b9d8
cmp dword [ebp + 0x1c], 0
jne 0x42b87a
mov bh, byte [edi + 0x4a588c]
jmp 0x42b87c
mov eax, dword [ebp - 8]
jmp 0x42b3ae
mov bh, 1
mov ecx, dword [ebp - 0xc]
xor bl, bl
mov eax, ecx
mov dword [ebp - 0x2c], eax
cmp edi, 4
jne 0x42b8d2
xor edi, edi
test eax, eax
je 0x42b95e
mov eax, edi
and eax, 1
mov dword [ebp - 0x48], eax
jne 0x42b8a1
mov bl, byte [esi]
mov dword [ebp - 0xc], ecx
mov cl, bl
shr cl, 4
movzx eax, bh
movzx ecx, cl
imul ecx, eax
lea eax, [esi + 1]
shl bl, 4
mov byte [edx + edi], cl
inc edi
cmp dword [ebp - 0x48], 0
mov ecx, dword [ebp - 0xc]
cmovne eax, esi
mov esi, eax
cmp edi, dword [ebp - 0x2c]
jb 0x42b895
jmp 0x42b958
cmp edi, 2
jne 0x42b91b
xor edi, edi
test eax, eax
je 0x42b95e
mov eax, edi
and eax, 3
mov dword [ebp - 0x48], eax
jne 0x42b8ed
mov bl, byte [esi]
mov dword [ebp - 0xc], ecx
mov cl, bl
shr cl, 6
movzx eax, bh
movzx ecx, cl
imul ecx, eax
lea eax, [esi + 1]
shl bl, 2
mov byte [edi + edx], cl
inc edi
cmp dword [ebp - 0x48], 0
mov ecx, dword [ebp - 0xc]
cmovne eax, esi
mov esi, eax
cmp edi, dword [ebp - 0x2c]
jb 0x42b8e1
jmp 0x42b958
xor edi, edi
test eax, eax
je 0x42b95e
mov eax, edi
and eax, 7
mov dword [ebp - 0x48], eax
jne 0x42b92d
mov bl, byte [esi]
mov dword [ebp - 0xc], ecx
mov cl, bl
shr cl, 7
add bl, bl
movzx eax, bh
movzx ecx, cl
imul ecx, eax
lea eax, [esi + 1]
mov byte [edi + edx], cl
inc edi
cmp dword [ebp - 0x48], 0
mov ecx, dword [ebp - 0xc]
cmovne eax, esi
mov esi, eax
cmp edi, dword [ebp - 0x2c]
jb 0x42b921
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp + 0xc]
je 0x42bb4d
mov ecx, dword [ebp + 0x10]
dec ecx
cmp eax, 1
jne 0x42b995
test ecx, ecx
js 0x42bb4d
nop dword [eax + eax]
mov byte [edx + ecx*2 + 1], 0xff
mov al, byte [ecx + edx]
mov byte [edx + ecx*2], al
sub ecx, 1
jns 0x42b980
jmp 0x42bb4d
test ecx, ecx
js 0x42bb4d
lea esi, [ecx*2 + 1]
add esi, edx
lea edx, [edx + ecx*4]
add esi, ecx
add edx, 2
nop
sub ecx, 1
mov byte [edx + 1], 0xff
movzx eax, byte [esi + 1]
lea esi, [esi - 3]
mov byte [edx], al
lea edx, [edx - 4]
movzx eax, byte [esi + 3]
mov byte [edx + 3], al
movzx eax, byte [esi + 2]
mov byte [edx + 2], al
jns 0x42b9b0
jmp 0x42bb4d
jne 0x42ba68
mov ebx, dword [ebp - 0x1c]
cmp ebx, dword [ebp + 0xc]
jne 0x42b9f8
push dword [ebp - 0xc]
push esi
push edx
call fcn.0045ea40
add esp, 0xc
jmp 0x42bb4d
mov ecx, dword [ebp + 0x10]
dec ecx
cmp ebx, 1
jne 0x42ba25
test ecx, ecx
js 0x42bb4d
nop dword [eax]
mov byte [edx + ecx*2 + 1], 0xff
mov al, byte [esi + ecx]
mov byte [edx + ecx*2], al
sub ecx, 1
jns 0x42ba10
jmp 0x42bb4d
test ecx, ecx
js 0x42bb4d
lea esi, [esi + ecx*2]
inc esi
lea edx, [edx + ecx*4]
add esi, ecx
add edx, 2
nop dword [eax]
sub ecx, 1
mov byte [edx + 1], 0xff
movzx eax, byte [esi + 1]
lea esi, [esi - 3]
mov byte [edx], al
lea edx, [edx - 4]
movzx eax, byte [esi + 3]
mov byte [edx + 3], al
movzx eax, byte [esi + 2]
mov byte [edx + 2], al
jns 0x42ba40
jmp 0x42bb4d
cmp edi, 0x10
jne 0x42bb50
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp + 0xc]
jne 0x42bab5
mov ebx, dword [ebp - 0xc]
test ebx, ebx
je 0x42bb50
mov eax, dword [ebp - 0x20]
mov edi, ebx
and eax, 1
imul eax, dword [ebp - 0x30]
sub edx, eax
sub edx, dword [ebp - 0x28]
movzx ecx, byte [esi]
lea esi, [esi + 2]
movzx eax, byte [esi - 1]
shl cx, 8
or cx, ax
mov word [edx + esi - 2], cx
sub edi, 1
jne 0x42ba95
jmp 0x42bb4d
cmp eax, 1
mov eax, dword [ebp + 0x10]
jne 0x42baf8
test eax, eax
je 0x42bb50
mov edi, eax
nop word [eax + eax]
movzx ecx, byte [esi]
lea edx, [edx + 4]
movzx eax, byte [esi + 1]
lea esi, [esi + 2]
shl cx, 8
or cx, ax
mov eax, 0xffff
mov word [edx - 4], cx
mov word [edx - 2], ax
sub edi, 1
jne 0x42bad0
jmp 0x42bb4d
test eax, eax
je 0x42bb50
add edx, 4
mov edi, eax
movzx ecx, byte [esi]
lea edx, [edx + 8]
movzx eax, byte [esi + 1]
lea esi, [esi + 6]
shl cx, 8
or cx, ax
mov word [edx - 0xc], cx
movzx ecx, byte [esi - 4]
movzx eax, byte [esi - 3]
shl cx, 8
or cx, ax
mov word [edx - 0xa], cx
movzx ecx, byte [esi - 2]
movzx eax, byte [esi - 1]
shl cx, 8
or cx, ax
mov eax, 0xffff
mov word [edx - 8], cx
mov word [edx - 6], ax
sub edi, 1
jne 0x42bb01
mov ecx, dword [ebp - 4]
mov edi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x14]
inc edi
mov dword [ebp - 0x20], edi
cmp edi, dword [ebp + 0x14]
jb 0x42b340
push dword [ebp - 0x28]
call fcn.0046660e
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword fs:[0x2c]
push dword [ebp - 0x28]
mov eax, dword [eax]
mov dword [eax + 8], str.invalid_filter
call fcn.0046660e
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push eax
call fcn.0046660e
add esp, 4
xor eax, eax
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword fs:[0x2c]
pop edi
pop esi
pop ebx
mov eax, dword [eax]
mov dword [eax + 8], str.too_large
xor eax, eax
mov esp, ebp
pop ebp
ret
mov dword [ebx + 0xc], 0
mov eax, dword fs:[0x2c]
pop edi
pop esi
pop ebx
mov eax, dword [eax]
mov dword [eax + 8], str.outofmem
xor eax, eax
mov esp, ebp
pop ebp
ret