Function at 0x4aea7c
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff54
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0xac], ebx
mov dword [ebp - 0xa8], ebx
mov esi, ecx
lea edi, [ebp - 0x78]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4af409
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0xa4]
xor ecx, ecx
mov edx, 0x2c
call fcn.00403140
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov eax, dword [eax + 0x454]
mov dword [0x52046c], eax
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov eax, dword [eax + 0x458]
neg eax
mov dword [0x520470], eax
mov esi, 0x520468
lea edi, [ebp - 0xa4]
mov ecx, 0xa
rep movsd dword es:[edi], dword [esi]
push 0
call sub.gdi32.dll_CreateCompatibleDC
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4aeb33
lea edx, [ebp - 0xa8]
mov eax, dword [0x52187c]
call fcn.00406ae4
mov ecx, dword [ebp - 0xa8]
mov edx, dword [0x4a85b4]
mov eax, dword [ebp - 4]
call fcn.004ae93c
push 0
push 0
lea eax, [ebp - 0x10]
push eax
push 0
lea eax, [ebp - 0xa4]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.gdi32.dll_CreateDIBSection
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x4aeb5c
cmp dword [ebp - 0x10], 0
jne 0x4aeb98
cmp dword [ebp - 0x18], 0
je 0x4aeb6b
mov eax, dword [ebp - 0x18]
push eax
call sub.gdi32.dll_DeleteObject
mov eax, dword [ebp - 0xc]
push eax
call sub.gdi32.dll_DeleteDC
lea edx, [ebp - 0xac]
mov eax, dword [0x52187c]
call fcn.00406ae4
mov ecx, dword [ebp - 0xac]
mov edx, dword [0x4a85b4]
mov eax, dword [ebp - 4]
call fcn.004ae93c
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.gdi32.dll_SelectObject
mov dword [ebp - 0x14], eax
push 0xcc0020
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov eax, dword [eax + 0x458]
push eax
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov eax, dword [eax + 0x454]
push eax
mov eax, dword [ebp - 0x74]
push eax
mov eax, dword [ebp - 0x78]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov eax, dword [eax + 0x458]
push eax
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov eax, dword [eax + 0x454]
push eax
push 0
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.gdi32.dll_StretchBlt
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov eax, dword [eax + 0x454]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x2c]
movzx edx, word [ebp - 0x96]
imul edx
add eax, 0x1f
and eax, 0xffffffe0
test eax, eax
jns 0x4aec31
add eax, 7
sar eax, 3
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 4]
call fcn.004ae9c8
movzx ebx, word [eax + 0x2b]
mov eax, dword [ebp - 4]
call fcn.004ae9c8
imul ebx, dword [eax + 0x454]
add ebx, 0x1f
and ebx, 0xffffffe0
shr ebx, 3
mov dword [ebp - 0x34], ebx
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov eax, dword [eax + 0x450]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov ebx, dword [eax + 0x448]
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov eax, dword [eax + 0x458]
dec eax
imul ebx, eax
mov eax, dword [ebp - 4]
call fcn.004ae9c8
add ebx, dword [eax + 0x44c]
mov dword [ebp - 0x3c], ebx
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov ax, word [eax + 0x2b]
dec ax
je 0x4af01c
sub ax, 3
je 0x4af01c
sub ax, 4
je 0x4af01c
sub ax, 0x10
jne 0x4af372
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov eax, dword [eax + 0x458]
test eax, eax
jle 0x4af372
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x4c], 1
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov eax, dword [eax + 0x454]
dec eax
test eax, eax
jl 0x4aeff9
inc eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x48], 0
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x48]
lea eax, [eax + edx*4]
mov dword [ebp - 0x5c], eax
cmp dword [ebp + 0x14], 0
jle 0x4aed49
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0x48]
movzx eax, byte [eax + edx]
mov edx, 0xff
sub edx, dword [ebp + 0x14]
imul edx
shr eax, 8
mov byte [ebp - 0x4e], al
jmp 0x4aed55
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0x48]
mov al, byte [eax + edx]
mov byte [ebp - 0x4e], al
cmp byte [ebp + 0x10], 0
je 0x4aee33
mov eax, dword [ebp - 0x48]
lea eax, [eax + eax*2]
add eax, 2
mov edx, dword [ebp - 0x3c]
movzx eax, byte [edx + eax]
mov edx, dword [ebp - 0x48]
lea edx, [edx + edx*2]
inc edx
mov ecx, dword [ebp - 0x3c]
movzx edx, byte [ecx + edx]
add eax, edx
mov edx, dword [ebp - 0x48]
lea edx, [edx + edx*2]
mov ecx, dword [ebp - 0x3c]
movzx edx, byte [ecx + edx]
add eax, edx
mov ecx, 3
xor edx, edx
div ecx
mov byte [ebp - 0x4d], al
xor eax, eax
mov al, byte [ebp - 0x4d]
xor edx, edx
mov dl, byte [ebp - 0x4e]
imul edx
add eax, 0xff
xor edx, edx
mov dl, byte [ebp - 0x4e]
mov ecx, 0xff
sub ecx, edx
mov edx, dword [ebp - 0x5c]
movzx edx, byte [edx + 2]
imul ecx, edx
add eax, ecx
shr eax, 8
mov edx, dword [ebp - 0x5c]
mov byte [edx + 2], al
xor eax, eax
mov al, byte [ebp - 0x4d]
xor edx, edx
mov dl, byte [ebp - 0x4e]
imul edx
add eax, 0xff
xor edx, edx
mov dl, byte [ebp - 0x4e]
mov ecx, 0xff
sub ecx, edx
mov edx, dword [ebp - 0x5c]
movzx edx, byte [edx + 1]
imul ecx, edx
add eax, ecx
shr eax, 8
mov edx, dword [ebp - 0x5c]
mov byte [edx + 1], al
xor eax, eax
mov al, byte [ebp - 0x4d]
xor edx, edx
mov dl, byte [ebp - 0x4e]
imul edx
add eax, 0xff
xor edx, edx
mov dl, byte [ebp - 0x4e]
mov ecx, 0xff
sub ecx, edx
mov edx, dword [ebp - 0x5c]
movzx edx, byte [edx]
imul ecx, edx
add eax, ecx
shr eax, 8
mov edx, dword [ebp - 0x5c]
mov byte [edx], al
jmp 0x4aefed
cmp dword [ebp + 8], 0
jg 0x4aee43
cmp dword [ebp + 0xc], 0
jle 0x4aef3d
mov eax, dword [ebp - 0x48]
lea eax, [eax + eax*2]
add eax, 2
mov edx, dword [ebp - 0x3c]
movzx eax, byte [edx + eax]
add eax, dword [ebp + 8]
mov edx, 0xff
call fcn.0042b788
sub eax, dword [ebp + 0xc]
xor edx, edx
call fcn.0042b7d0
xor edx, edx
mov dl, byte [ebp - 0x4e]
imul edx
add eax, 0xff
xor edx, edx
mov dl, byte [ebp - 0x4e]
mov ecx, 0xff
sub ecx, edx
mov edx, dword [ebp - 0x5c]
movzx edx, byte [edx + 2]
imul ecx, edx
add eax, ecx
shr eax, 8
mov edx, dword [ebp - 0x5c]
mov byte [edx + 2], al
mov eax, dword [ebp - 0x48]
lea eax, [eax + eax*2]
inc eax
mov edx, dword [ebp - 0x3c]
movzx eax, byte [edx + eax]
add eax, dword [ebp + 8]
mov edx, 0xff
call fcn.0042b788
sub eax, dword [ebp + 0xc]
xor edx, edx
call fcn.0042b7d0
xor edx, edx
mov dl, byte [ebp - 0x4e]
imul edx
add eax, 0xff
xor edx, edx
mov dl, byte [ebp - 0x4e]
mov ecx, 0xff
sub ecx, edx
mov edx, dword [ebp - 0x5c]
movzx edx, byte [edx + 1]
imul ecx, edx
add eax, ecx
shr eax, 8
mov edx, dword [ebp - 0x5c]
mov byte [edx + 1], al
mov eax, dword [ebp - 0x48]
lea eax, [eax + eax*2]
mov edx, dword [ebp - 0x3c]
movzx eax, byte [edx + eax]
add eax, dword [ebp + 8]
mov edx, 0xff
call fcn.0042b788
sub eax, dword [ebp + 0xc]
xor edx, edx
call fcn.0042b7d0
xor edx, edx
mov dl, byte [ebp - 0x4e]
imul edx
add eax, 0xff
xor edx, edx
mov dl, byte [ebp - 0x4e]
mov ecx, 0xff
sub ecx, edx
mov edx, dword [ebp - 0x5c]
movzx edx, byte [edx]
imul ecx, edx
add eax, ecx
shr eax, 8
mov edx, dword [ebp - 0x5c]
mov byte [edx], al
jmp 0x4aefed
mov eax, dword [ebp - 0x48]
lea eax, [eax + eax*2]
add eax, 2
mov edx, dword [ebp - 0x3c]
movzx eax, byte [edx + eax]
xor edx, edx
mov dl, byte [ebp - 0x4e]
imul edx
add eax, 0xff
xor edx, edx
mov dl, byte [ebp - 0x4e]
mov ecx, 0xff
sub ecx, edx
mov edx, dword [ebp - 0x5c]
movzx edx, byte [edx + 2]
imul ecx, edx
add eax, ecx
shr eax, 8
mov edx, dword [ebp - 0x5c]
mov byte [edx + 2], al
mov eax, dword [ebp - 0x48]
lea eax, [eax + eax*2]
inc eax
mov edx, dword [ebp - 0x3c]
movzx eax, byte [edx + eax]
xor edx, edx
mov dl, byte [ebp - 0x4e]
imul edx
add eax, 0xff
xor edx, edx
mov dl, byte [ebp - 0x4e]
mov ecx, 0xff
sub ecx, edx
mov edx, dword [ebp - 0x5c]
movzx edx, byte [edx + 1]
imul ecx, edx
add eax, ecx
shr eax, 8
mov edx, dword [ebp - 0x5c]
mov byte [edx + 1], al
mov eax, dword [ebp - 0x48]
lea eax, [eax + eax*2]
mov edx, dword [ebp - 0x3c]
movzx eax, byte [edx + eax]
xor edx, edx
mov dl, byte [ebp - 0x4e]
imul edx
add eax, 0xff
xor edx, edx
mov dl, byte [ebp - 0x4e]
mov ecx, 0xff
sub ecx, edx
mov edx, dword [ebp - 0x5c]
movzx edx, byte [edx]
imul ecx, edx
add eax, ecx
shr eax, 8
mov edx, dword [ebp - 0x5c]
mov byte [edx], al
inc dword [ebp - 0x48]
dec dword [ebp - 0x58]
jne 0x4aed1b
mov eax, dword [ebp - 0x30]
add dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x34]
sub dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x38]
add dword [ebp - 0x40], eax
inc dword [ebp - 0x4c]
dec dword [ebp - 0x54]
jne 0x4aecf9
jmp 0x4af372
mov eax, dword [ebp - 4]
call fcn.004ae9c8
cmp byte [eax + 0x45d], 4
jne 0x4af17d
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov eax, dword [eax + 0x458]
test eax, eax
jle 0x4af372
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x4c], 1
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov eax, dword [eax + 0x454]
dec eax
test eax, eax
jl 0x4af15a
inc eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x48], 0
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x48]
lea eax, [eax + edx*4]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 4]
call fcn.004ae9c8
add eax, 0x1d
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x48]
movzx eax, byte [eax + edx]
mov edx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x48]
movzx edx, byte [edx + ecx]
imul edx
add eax, 0xff
mov edx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x48]
movzx edx, byte [edx + ecx]
mov ecx, 0xff
sub ecx, edx
mov edx, dword [ebp - 0x60]
movzx edx, byte [edx + 2]
imul ecx, edx
add eax, ecx
shr eax, 8
mov edx, dword [ebp - 0x60]
mov byte [edx + 2], al
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x48]
movzx eax, byte [eax + edx]
mov edx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x48]
movzx edx, byte [edx + ecx]
imul edx
add eax, 0xff
mov edx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x48]
movzx edx, byte [edx + ecx]
mov ecx, 0xff
sub ecx, edx
mov edx, dword [ebp - 0x60]
movzx edx, byte [edx + 1]
imul ecx, edx
add eax, ecx
shr eax, 8
mov edx, dword [ebp - 0x60]
mov byte [edx + 1], al
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x48]
movzx eax, byte [eax + edx]
mov edx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x48]
movzx edx, byte [edx + ecx]
imul edx
add eax, 0xff
mov edx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x48]
movzx edx, byte [edx + ecx]
mov ecx, 0xff
sub ecx, edx
mov edx, dword [ebp - 0x60]
movzx edx, byte [edx]
imul ecx, edx
add eax, ecx
shr eax, 8
mov edx, dword [ebp - 0x60]
mov byte [edx], al
inc dword [ebp - 0x48]
dec dword [ebp - 0x58]
jne 0x4af073
mov eax, dword [ebp - 0x30]
add dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x34]
sub dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x38]
add dword [ebp - 0x40], eax
inc dword [ebp - 0x4c]
dec dword [ebp - 0x54]
jne 0x4af051
jmp 0x4af372
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x238]
mov edx, dword [0x4a8f70]
call fcn.004a9de8
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x238]
mov edx, dword [0x4a8f04]
call fcn.004a9de8
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov eax, dword [eax + 0x458]
test eax, eax
jle 0x4af372
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x4c], 1
xor eax, eax
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x2c], eax
xor eax, eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov al, byte [eax + 0x45c]
dec al
je 0x4af1f7
dec al
je 0x4af21c
sub al, 2
je 0x4af21c
jmp 0x4af246
mov eax, dword [ebp - 0x48]
and eax, 0x80000007
jns 0x4af206
dec eax
or eax, 0xfffffff8
inc eax
mov ecx, 7
sub ecx, eax
mov eax, dword [ebp - 0x2c]
movzx eax, byte [eax]
shr eax, cl
and al, 1
mov byte [ebp - 0x22], al
jmp 0x4af24e
mov eax, dword [ebp - 0x48]
and eax, 0x80000001
jns 0x4af22b
dec eax
or eax, 0xfffffffe
inc eax
mov edx, 1
sub edx, eax
mov ecx, edx
shl ecx, 2
mov eax, dword [ebp - 0x2c]
movzx eax, byte [eax]
shr eax, cl
and al, 0xf
mov byte [ebp - 0x22], al
jmp 0x4af24e
mov eax, dword [ebp - 0x2c]
mov al, byte [eax]
mov byte [ebp - 0x22], al
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x48]
lea eax, [eax + edx*4]
mov dword [ebp - 0x68], eax
xor eax, eax
mov al, byte [ebp - 0x22]
mov edx, dword [ebp - 0x1c]
mov al, byte [edx + eax + 0x15]
mov byte [ebp - 0x21], al
mov dl, byte [ebp - 0x22]
mov eax, dword [ebp - 0x20]
call fcn.004adf64
shr eax, 0x10
and eax, 0xff
xor edx, edx
mov dl, byte [ebp - 0x21]
imul edx
add eax, 0xff
xor edx, edx
mov dl, byte [ebp - 0x21]
mov ecx, 0xff
sub ecx, edx
mov edx, dword [ebp - 0x68]
movzx edx, byte [edx + 2]
imul ecx, edx
add eax, ecx
shr eax, 8
mov edx, dword [ebp - 0x68]
mov byte [edx + 2], al
mov dl, byte [ebp - 0x22]
mov eax, dword [ebp - 0x20]
call fcn.004adf64
shr eax, 8
and eax, 0xff
xor edx, edx
mov dl, byte [ebp - 0x21]
imul edx
add eax, 0xff
xor edx, edx
mov dl, byte [ebp - 0x21]
mov ecx, 0xff
sub ecx, edx
mov edx, dword [ebp - 0x68]
movzx edx, byte [edx + 1]
imul ecx, edx
add eax, ecx
shr eax, 8
mov edx, dword [ebp - 0x68]
mov byte [edx + 1], al
mov dl, byte [ebp - 0x22]
mov eax, dword [ebp - 0x20]
call fcn.004adf64
and eax, 0xff
xor edx, edx
mov dl, byte [ebp - 0x21]
imul edx
add eax, 0xff
xor edx, edx
mov dl, byte [ebp - 0x21]
mov ecx, 0xff
sub ecx, edx
mov edx, dword [ebp - 0x68]
movzx edx, byte [edx]
imul ecx, edx
add eax, ecx
shr eax, 8
mov edx, dword [ebp - 0x68]
mov byte [edx], al
inc dword [ebp - 0x48]
mov eax, dword [ebp - 4]
call fcn.004ae9c8
movzx eax, word [eax + 0x2b]
add dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 8
jl 0x4af1db
inc dword [ebp - 0x2c]
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov eax, dword [eax + 0x454]
cmp eax, dword [ebp - 0x48]
jg 0x4af1d6
mov eax, dword [ebp - 0x30]
add dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x34]
sub dword [ebp - 0x3c], eax
inc dword [ebp - 0x4c]
dec dword [ebp - 0x54]
jne 0x4af1cb
push 0xcc0020
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov eax, dword [eax + 0x458]
push eax
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov eax, dword [eax + 0x454]
push eax
push 0
push 0
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov eax, dword [eax + 0x458]
push eax
mov eax, dword [ebp - 4]
call fcn.004ae9c8
mov eax, dword [eax + 0x454]
push eax
mov eax, dword [ebp - 0x74]
push eax
mov eax, dword [ebp - 0x78]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.gdi32.dll_StretchBlt
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.gdi32.dll_SelectObject
mov eax, dword [ebp - 0x18]
push eax
call sub.gdi32.dll_DeleteObject
mov eax, dword [ebp - 0xc]
push eax
call sub.gdi32.dll_DeleteDC
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4af410
lea eax, [ebp - 0xac]
mov edx, 2
call fcn.004047c0
ret