Function at 0x502a1f4
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov eax, 0x504eeac
call fcn.05040548
mov eax, 0x25fc
call fcn.05041d40
push ebx
push esi
push edi
xor esi, esi
mov edi, ecx
push esi
mov dword [ebp - 0x2c], edi
call fcn.05008155
cmp dword [edi], esi
mov ebx, dword [ebp + 8]
pop ecx
jne 0x502a239
mov eax, dword [ebx + 4]
push esi
push 0x753
push 0xb71b
push eax
call fcn.0502998c
add esp, 0x10
mov dword [edi], eax
mov ecx, ebx
mov dword [ebp - 0x34], ebx
call fcn.0500a674
push 1
mov dword [ebp - 4], esi
lea eax, [ebp - 0x127c]
pop ecx
mov edi, 0x4000
mov edx, ecx
add ecx, 0x101
shr edx, 1
mov word [eax - 2], dx
mov word [eax], di
mov word [eax + 2], di
add eax, 8
cmp ecx, 0x10101
jb 0x502a254
push esi
push 0x50524742
mov esi, pe_nt_image_headers32
push 0x504c4142
lea eax, [ebp - 0x1280]
push esi
push eax
lea eax, [ebp - 0x1280]
push eax
mov ecx, ebx
call fcn.05012525
lea ecx, [ebp - 0x27c]
lea eax, [ebp - 0x127e]
mov dword [ebp - 0x10], esi
movzx edx, word [eax + 4]
movzx ebx, word [eax + 2]
imul edx, edx, 0x70a
imul ebx, ebx, 0x25c3
add edx, ebx
movzx ebx, word [eax]
imul ebx, ebx, 0x1333
add eax, 8
lea edx, [edx + ebx + 0x2000]
shr edx, 0xe
mov word [ecx], dx
inc ecx
inc ecx
dec dword [ebp - 0x10]
jne 0x502a2a9
lea ecx, [ebp - 0x27c]
call fcn.0503f9ad
test al, al
jne 0x502a2f9
lea ecx, [ebp - 0x27c]
call fcn.0503f994
push 2
lea ecx, [ebp - 0x27c]
call fcn.0503f9cd
mov ecx, dword [ebp - 0x2c]
push 0xffffffffffffff98
pop ebx
lea edx, [ebp - 0x27c]
lea eax, [ecx + 0x68]
sub ebx, ecx
movzx ecx, word [edx]
imul ecx, ecx, 0xff
add ecx, edi
shr ecx, 0xf
mov byte [eax], cl
mov byte [eax + 0x100], cl
mov cl, byte [eax]
inc edx
mov byte [eax + 0x200], cl
inc edx
inc eax
lea ecx, [ebx + eax]
cmp ecx, esi
jb 0x502a317
lea eax, [ebp - 0xa80]
lea ecx, [ebp - 0x27c]
push eax
call fcn.0503fb4d
push 0xc
lea ecx, [ebp - 0x7c]
pop esi
push 0x18
mov eax, esi
xor edx, edx
pop ebx
div ebx
add esi, 0x8000
mov word [ecx], ax
inc ecx
inc ecx
cmp esi, 0xc800c
jb 0x502a357
and dword [ebp - 0x1c], 0
lea eax, [ebp - 0x7c]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
push 0x19
lea ecx, [ebp - 0x7c]
pop esi
mov ax, word [eax]
mov dword [ebp - 0x28], ecx
mov word [ebp - 0x30], ax
lea eax, [ebp - 0x2604]
mov dword [ebp - 0x18], esi
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x14], esi
mov dx, word [ecx]
lea ecx, [ebp - 0x7c]
mov bx, word [ebp - 0x30]
mov word [eax - 2], bx
mov bx, word [ecx]
mov word [eax], dx
mov word [eax + 2], bx
add eax, 8
inc ecx
inc ecx
dec dword [ebp - 0x14]
jne 0x502a3a5
add dword [ebp - 0x28], 2
dec dword [ebp - 0x18]
jne 0x502a399
mov ecx, dword [ebp + 8]
push 0
push 0x50524742
push 0x504c4142
lea eax, [ebp - 0x2608]
push 0x271
push eax
lea eax, [ebp - 0x2608]
push eax
call fcn.05012525
mov eax, dword [ebp - 0x2c]
push 1
push 0x753
lea ecx, [ebp - 0x48]
push dword [ebp - 0x1c]
push dword [eax]
call fcn.0502968c
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
call fcn.050296d8
lea ebx, [ebp - 0x2608]
add eax, 2
mov dword [ebp - 0x14], esi
mov esi, eax
mov dword [ebp - 0x18], 0x19
mov eax, dword [ebx]
lea ecx, [ebp - 0xa80]
mov dword [ebp - 0x24], eax
mov eax, dword [ebx + 4]
mov dword [ebp - 0x20], eax
movzx eax, word [ebp - 0x22]
push eax
call fcn.0503f87f
mov word [ebp - 0x22], ax
lea ecx, [ebp - 0xa80]
movzx eax, word [ebp - 0x20]
push eax
call fcn.0503f87f
mov word [ebp - 0x20], ax
lea ecx, [ebp - 0xa80]
movzx eax, word [ebp - 0x1e]
push eax
call fcn.0503f87f
movzx ecx, word [ebp - 0x22]
imul ecx, ecx, 0xff
add ecx, edi
add ebx, 8
shr ecx, 0xf
mov byte [esi - 2], cl
movzx ecx, word [ebp - 0x20]
movzx eax, ax
imul ecx, ecx, 0xff
imul eax, eax, 0xff
add ecx, edi
add eax, edi
shr ecx, 0xf
shr eax, 0xf
mov byte [esi - 1], cl
mov byte [esi], al
add esi, 3
dec dword [ebp - 0x18]
jne 0x502a429
dec dword [ebp - 0x14]
mov eax, esi
jne 0x502a420
and byte [ebp - 4], 0
lea ecx, [ebp - 0x48]
call fcn.050296bf
add dword [ebp - 0x1c], 0x753
add dword [ebp - 0x10], 2
cmp dword [ebp - 0x1c], 0xb71b
jb 0x502a37d
mov ecx, dword [ebp + 8]
or dword [ebp - 4], 0xffffffff
call fcn.0500a69a
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4