Function at 0x10162d00
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov edx, dword [ebp + 0x10]
mov ecx, edx
push esi
mov esi, dword [ebp + 8]
push edi
sar ecx, 8
mov dword [ebp - 0x18], ecx
mov edi, dword [esi + 0x78]
mov eax, dword [esi + 0x54]
sar edi, 8
cmp edi, eax
jl 0x10162d36
cmp ecx, eax
jl 0x10162d36
mov eax, dword [ebp + 0xc]
pop edi
mov dword [esi + 0x74], eax
mov dword [esi + 0x78], edx
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x50]
cmp edi, eax
jge 0x10162d41
cmp ecx, eax
jl 0x10162d27
mov eax, dword [esi + 0x74]
mov edx, eax
mov ecx, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0xc]
sar ebx, 8
mov dword [ebp - 0x20], ebx
movzx ebx, al
mov dword [ebp - 0x10], ecx
sub dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0x78]
sub dword [ebp - 0xc], eax
sar edx, 8
mov dword [ebp + 8], ebx
mov ebx, dword [esi + 0x78]
mov dword [ebp - 4], edx
movzx ebx, bl
cmp edx, dword [ebp - 0x20]
jne 0x10162d87
cmp edi, ecx
je 0x10162fc6
mov eax, dword [ebp - 0xc]
test eax, eax
jne 0x10162dae
push ecx
push dword [ebp - 0x20]
push esi
call fcn.10163000
mov eax, dword [ebp + 0xc]
add esp, 0xc
mov dword [esi + 0x74], eax
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x78], eax
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x10]
test ecx, ecx
jne 0x10162e23
test eax, eax
jle 0x10162df5
nop dword [eax]
mov eax, pe_nt_image_headers32
inc edi
sub eax, ebx
add dword [esi + 0x5c], eax
mov eax, pe_nt_image_headers32
sub eax, ebx
xor ebx, ebx
imul eax, dword [ebp + 8]
push edi
push edx
push esi
add eax, eax
add dword [esi + 0x58], eax
call fcn.10163000
mov edx, dword [ebp - 4]
add esp, 0xc
cmp edi, dword [ebp - 0x18]
jne 0x10162dc0
jmp 0x10162fc6
mov eax, dword [ebp + 8]
dec edi
sub dword [esi + 0x5c], ebx
imul eax, ebx
mov ebx, pe_nt_image_headers32
push edi
push edx
push esi
neg eax
add eax, eax
add dword [esi + 0x58], eax
call fcn.10163000
mov edx, dword [ebp - 4]
add esp, 0xc
cmp edi, dword [ebp - 0x18]
jne 0x10162df5
jmp 0x10162fc6
imul eax, dword [ebp + 8]
imul ecx, ebx
sub ecx, eax
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x10]
cmp edx, dword [ebp - 0x20]
je 0x10162e44
mov eax, 0xffffff
cdq
idiv ecx
mov dword [ebp - 0x24], eax
jmp 0x10162e4b
mov dword [ebp - 0x24], 0
cmp edi, dword [ebp - 0x18]
je 0x10162e5e
mov eax, 0xffffff
cdq
idiv dword [ebp - 0xc]
mov dword [ebp - 0x28], eax
jmp 0x10162e65
mov dword [ebp - 0x28], 0
mov eax, ecx
shl eax, 8
mov dword [ebp - 0x1c], eax
mov ecx, eax
nop
mov edx, dword [ebp - 0x14]
mov dword [ebp - 8], ecx
test edx, edx
jg 0x10162ec1
mov ecx, eax
mov dword [ebp - 8], eax
mov eax, edx
sub eax, dword [ebp - 0x1c]
test eax, eax
jle 0x10162ec1
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0xc]
neg eax
imul ecx, edx
shl eax, 8
add edx, eax
shr ecx, 0x18
mov eax, ecx
sub eax, ebx
add dword [esi + 0x5c], eax
mov eax, ecx
sub eax, ebx
mov ebx, ecx
imul eax, dword [ebp + 8]
mov dword [ebp + 8], pe_nt_image_headers32
add dword [esi + 0x58], eax
dec dword [ebp - 4]
mov eax, dword [ebp - 0x1c]
jmp 0x10162f97
mov dword [ebp - 0x14], ecx
mov eax, edx
sub eax, ecx
mov ecx, dword [ebp - 0xc]
sub ecx, dword [ebp - 0x10]
shl ecx, 8
add ecx, edx
test eax, eax
jg 0x10162f1a
test ecx, ecx
jle 0x10162f12
mov edx, dword [ebp - 0x28]
mov ecx, eax
imul edx, ecx
mov eax, pe_nt_image_headers32
sub eax, ebx
mov dword [ebp - 0x14], ecx
add dword [esi + 0x5c], eax
mov eax, pe_nt_image_headers32
mov ecx, dword [ebp + 8]
sub eax, ebx
xor ebx, ebx
neg edx
shr edx, 0x18
add ecx, edx
mov dword [ebp + 8], edx
imul ecx, eax
add dword [esi + 0x58], ecx
inc edi
jmp 0x10162f9d
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], eax
jmp 0x10162f24
mov eax, dword [ebp - 0x14]
mov dword [ebp - 8], eax
test ecx, ecx
jg 0x10162f65
mov ecx, dword [ebp - 0xc]
shl ecx, 8
add ecx, edx
js 0x10162f6d
mov edx, dword [ebp - 0x24]
imul edx, ecx
mov dword [ebp - 0x14], ecx
shr edx, 0x18
mov eax, edx
mov ecx, edx
sub eax, ebx
sub ecx, ebx
add dword [esi + 0x5c], eax
mov ebx, edx
mov eax, dword [ebp + 8]
add eax, 0x100
mov dword [ebp + 8], 0
imul ecx, eax
mov eax, dword [ebp - 4]
add dword [esi + 0x58], ecx
inc eax
mov dword [ebp - 4], eax
jmp 0x10162fa0
mov eax, dword [ebp - 0x14]
mov dword [ebp - 8], eax
jmp 0x10162f70
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x28]
sub dword [esi + 0x5c], ebx
imul ecx, edx
add edx, eax
mov eax, dword [ebp + 8]
neg ecx
shr ecx, 0x18
add eax, ecx
mov dword [ebp + 8], ecx
imul eax, ebx
mov ebx, pe_nt_image_headers32
sub dword [esi + 0x58], eax
dec edi
mov eax, dword [ebp - 8]
mov dword [ebp - 8], eax
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 4]
push edi
push eax
push esi
call fcn.10163000
mov eax, dword [ebp - 0x20]
add esp, 0xc
cmp dword [ebp - 4], eax
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
jne 0x10162e70
cmp edi, dword [ebp - 0x18]
jne 0x10162e70
mov edx, dword [ebp + 0x10]
movzx ecx, dl
mov eax, ecx
mov dword [esi + 0x78], edx
sub eax, ebx
sub ecx, ebx
add dword [esi + 0x5c], eax
mov eax, dword [ebp + 0xc]
movzx eax, al
add eax, dword [ebp + 8]
imul eax, ecx
pop ebx
add dword [esi + 0x58], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x74], eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret