Function at 0x100aeb60
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x6c
push ebx
mov ebx, edx
mov dword [ebp - 0x18], ecx
push esi
push edi
mov dword [ebp - 0x5c], ebx
cmp ebx, dword [ebp + 0x18]
jne 0x100af1d4
mov edx, dword [ebp + 0x20]
mov esi, dword [edx + 0x10]
mov eax, esi
mov edi, dword [edx + 0xc]
imul eax, edi
imul eax, dword [edx + 0x18]
cmp ebx, eax
jne 0x100af1d4
mov edx, dword [edx]
mov eax, edi
shr eax, 1
mov dword [ebp - 0x2c], eax
mov eax, esi
shr eax, 1
mov dword [ebp - 0x34], eax
lea esi, [edx - 1]
mov eax, dword [ebp + 0x1c]
mov ebx, dword [eax + 8]
mov eax, 1
lea ecx, [ebx - 1]
shl eax, cl
add esi, eax
shr esi, cl
mov dword [ebp - 0x24], esi
cmp esi, 1
jae 0x100aebcc
mov dword [ebp - 0x24], 1
mov ecx, dword [ebp + 0x20]
mov ecx, dword [ecx + 4]
dec ecx
add eax, ecx
lea ecx, [ebx - 1]
shr eax, cl
mov dword [ebp - 0x30], eax
cmp eax, 1
jae 0x100aebe9
mov dword [ebp - 0x30], 1
mov ecx, ebx
dec edx
mov eax, 1
shl eax, cl
mov dword [ebp - 0x50], eax
add eax, edx
shr eax, cl
xor edx, edx
dec eax
add eax, edi
div edi
mov edx, eax
mov dword [ebp - 0x3c], eax
cmp edx, 1
jae 0x100aec13
mov edx, 1
mov dword [ebp - 0x3c], edx
mov ecx, dword [ebp + 0x1c]
mov eax, dword [ecx]
mov ecx, ebx
inc eax
cmp eax, edx
mov dword [ebp - 0x54], eax
mov edx, dword [ebp + 0x20]
mov eax, dword [ebp - 0x50]
setae byte [ebp - 3]
dec eax
add eax, dword [edx + 4]
mov esi, dword [edx + 0x10]
xor edx, edx
shr eax, cl
dec eax
add eax, esi
div esi
mov ecx, eax
mov dword [ebp - 0x40], eax
cmp ecx, 1
jae 0x100aec4c
mov ecx, 1
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp + 0x1c]
mov eax, dword [edx + 4]
inc eax
cmp eax, ecx
mov dword [ebp - 0x58], eax
setae byte [ebp - 4]
xor ebx, ebx
mov dword [ebp - 0xc], ebx
test edi, edi
je 0x100af1cb
mov ecx, dword [0x101c0a4c]
mov eax, dword fs:[0x2c]
lea eax, [eax + ecx*4]
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x28], ecx
test ebx, ebx
jne 0x100aecc6
mov ecx, dword [ebp - 0x54]
cmp ecx, dword [ebp - 0x3c]
jb 0x100aecc0
mov ecx, dword [edx + 8]
mov edx, dword [eax]
mov eax, 1
shl eax, cl
dec eax
add eax, edx
shr eax, cl
cmp eax, 1
jae 0x100aecb1
mov eax, 1
xor edx, edx
div edi
cmp edx, dword [ebp - 0x2c]
ja 0x100aecc0
mov byte [ebp - 2], 1
jmp 0x100aeccc
mov byte [ebp - 2], 0
jmp 0x100aeccc
mov al, byte [ebp - 3]
mov byte [ebp - 2], al
mov eax, dword [ebp + 0x20]
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
test esi, esi
je 0x100af1b5
lea esp, [esp]
test ecx, ecx
jne 0x100aed20
mov ecx, dword [ebp - 0x58]
cmp ecx, dword [ebp - 0x40]
jb 0x100aed1a
mov edx, dword [eax + 4]
mov eax, 1
mov ecx, dword [ebp + 0x1c]
mov ecx, dword [ecx + 8]
shl eax, cl
dec eax
add eax, edx
shr eax, cl
cmp eax, 1
jae 0x100aed0b
mov eax, 1
xor edx, edx
div esi
cmp edx, dword [ebp - 0x34]
ja 0x100aed1a
mov byte [ebp - 1], 1
jmp 0x100aed26
mov byte [ebp - 1], 0
jmp 0x100aed26
mov al, byte [ebp - 4]
mov byte [ebp - 1], al
test ebx, ebx
jne 0x100aed39
cmp dword [ebp - 0x1c], ebx
jne 0x100aed34
mov ebx, dword [ebp + 8]
jmp 0x100aed45
mov ebx, dword [ebp + 0x10]
jmp 0x100aed45
cmp dword [ebp - 0x1c], 0
mov ebx, dword [ebp + 0xc]
je 0x100aed45
mov ebx, dword [ebp + 0x14]
cmp byte [ebp - 2], 0
mov esi, dword [ebp + 0x20]
mov dword [ebp - 8], ebx
je 0x100aed88
mov eax, dword [ebp + 0x1c]
mov edx, dword [esi]
dec edx
mov ecx, dword [eax + 8]
mov eax, 1
shl eax, cl
add eax, edx
shr eax, cl
cmp eax, 1
jae 0x100aed6f
mov eax, 1
dec eax
xor edx, edx
div dword [ebp - 0x2c]
test byte [ebp - 0x24], 1
lea edi, [edx + 1]
mov dword [ebp - 0x10], edi
je 0x100aed8b
mov edi, edx
mov dword [ebp - 0x10], edi
jmp 0x100aed8b
mov edi, dword [ebp - 0x10]
cmp byte [ebp - 1], 0
je 0x100aedc7
mov eax, dword [ebp + 0x1c]
mov ecx, dword [eax + 8]
mov eax, 1
shl eax, cl
dec eax
add eax, dword [esi + 4]
shr eax, cl
cmp eax, 1
jae 0x100aedae
mov eax, 1
dec eax
xor edx, edx
div dword [ebp - 0x34]
test byte [ebp - 0x30], 1
lea ecx, [edx + 1]
mov dword [ebp - 0x28], ecx
je 0x100aedca
mov ecx, edx
mov dword [ebp - 0x28], ecx
jmp 0x100aedca
mov ecx, dword [ebp - 0x28]
test ebx, ebx
je 0x100af19b
mov esi, dword [esi + 0xc]
test ecx, ecx
je 0x100af0ba
mov edx, dword [ebp - 0x1c]
lea eax, [edi*8]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x24]
and eax, 1
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x2c]
sub eax, edi
mov dword [ebp - 0x50], ecx
add eax, eax
mov dword [ebp - 0x6c], eax
jmp 0x100aee08
mov edi, dword [ebp - 0x10]
mov eax, ebx
or eax, dword [ebp - 0x18]
test al, 0xf
jne 0x100aef35
call fcn.100b6600
cmp eax, 3
jl 0x100aee4d
mov eax, edi
and eax, 0x80000003
jns 0x100aee2f
dec eax
or eax, 0xfffffffc
add eax, 1
jne 0x100aee4d
push dword [ebp - 0x5c]
mov edx, dword [ebp - 0x14]
push dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
push dword [ebp + 0x18]
push ebx
push esi
push edi
call fcn.100aca80
jmp 0x100af02b
mov edx, dword [ebp - 0x14]
lea eax, [ebx + esi*4]
lea ecx, [eax + 4]
mov dword [ebp - 0x4c], eax
mov eax, edx
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x18]
imul eax, esi
mov esi, dword [ebp - 0xc]
add eax, esi
lea eax, [ecx + eax*4]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x38], eax
lea eax, [edi + esi]
cmp esi, eax
jge 0x100af02e
mov eax, dword [ebp - 0x48]
lea edi, [ebx + 2]
mov ebx, dword [ebp - 0x4c]
mov edx, dword [eax]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x60], edx
mov dword [ebp - 0x44], eax
mov eax, dword [0x101c31f0]
cmp eax, dword [edx + 4]
jg 0x100af1df
jmp 0x100aeea7
mov ecx, dword [ebp - 0x20]
movzx eax, byte [ebx + 2]
movzx esi, byte [edi + 4]
movzx edx, byte [edi + 3]
add esi, eax
movzx eax, byte [ecx + 2]
add esi, eax
movzx eax, byte [edi]
add esi, eax
movzx eax, byte [edi - 1]
add edx, eax
movzx eax, byte [ebx + 1]
add edx, eax
movzx eax, byte [ecx + 1]
movzx ecx, byte [edi - 2]
add edx, eax
movzx eax, byte [edi + 2]
add edi, 8
add ecx, eax
movzx eax, byte [ebx]
add ecx, eax
add ebx, 8
mov eax, dword [ebp - 0x20]
movzx eax, byte [eax]
add eax, 2
add eax, ecx
mov ecx, dword [ebp - 0x38]
shr eax, 2
mov byte [ecx], al
lea eax, [edx + 2]
mov edx, dword [ebp - 0x60]
shr eax, 2
mov byte [ecx + 1], al
lea eax, [esi + 2]
shr eax, 2
mov byte [ecx + 2], al
mov al, byte [0x101c31f4]
mov byte [ecx + 3], al
add ecx, 4
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp - 0x20]
add ecx, 8
sub dword [ebp - 0x44], 1
mov dword [ebp - 0x20], ecx
jne 0x100aee91
jmp 0x100af028
lea eax, [esi + 1]
lea eax, [ebx + eax*4]
mov dword [ebp - 0x20], eax
lea ecx, [ebx + 4]
mov eax, edx
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp - 0x18]
imul eax, esi
add eax, dword [ebp - 0xc]
lea eax, [ecx + eax*4]
mov dword [ebp - 0x44], eax
lea ecx, [ebx + 4]
mov eax, dword [ebp - 0xc]
add eax, edi
cmp dword [ebp - 0xc], eax
jge 0x100af02e
mov eax, dword [ebp - 0x48]
lea ebx, [esi*4 - 3]
add ebx, ecx
lea edi, [ecx - 3]
mov ecx, dword [ebp - 0x20]
mov edx, dword [eax]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x60], edx
mov dword [ebp - 0x4c], eax
mov eax, dword [0x101c31f0]
cmp eax, dword [edx + 4]
jg 0x100af212
jmp 0x100aef99
mov ecx, dword [ebp - 0x20]
movzx eax, byte [edi + 1]
movzx esi, byte [edi + 5]
movzx edx, byte [edi + 4]
add esi, eax
movzx eax, byte [ebx + 1]
add esi, eax
movzx eax, byte [ecx + 2]
add esi, eax
movzx eax, byte [ecx + 1]
movzx ecx, byte [edi - 1]
add edx, eax
movzx eax, byte [edi]
add edi, 8
add edx, eax
movzx eax, byte [ebx]
add edx, eax
movzx eax, byte [ebx - 1]
add ecx, eax
add ebx, 8
mov eax, dword [ebp - 0x38]
add dword [ebp - 0x38], 8
movzx eax, byte [eax]
add ecx, eax
mov eax, dword [ebp - 0x20]
movzx eax, byte [eax]
add eax, 2
add eax, ecx
mov ecx, dword [ebp - 0x44]
shr eax, 2
mov byte [ecx], al
lea eax, [edx + 2]
mov edx, dword [ebp - 0x60]
shr eax, 2
mov byte [ecx + 1], al
lea eax, [esi + 2]
shr eax, 2
mov byte [ecx + 2], al
mov al, byte [0x101c31f4]
mov byte [ecx + 3], al
add ecx, 4
mov dword [ebp - 0x44], ecx
mov ecx, dword [ebp - 0x20]
add ecx, 8
sub dword [ebp - 0x4c], 1
mov dword [ebp - 0x20], ecx
jne 0x100aef83
mov ebx, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
add ebx, dword [ebp - 0x64]
cmp dword [ebp - 0x68], 0
mov dword [ebp - 8], ebx
je 0x100af09b
cmp byte [ebp - 2], 0
je 0x100af09b
mov eax, dword [ebp + 0x20]
movzx esi, byte [ebx]
movzx edi, byte [ebx + 1]
movzx ebx, byte [ebx + 2]
mov edx, dword [eax + 0xc]
mov eax, dword [ebp - 8]
lea ecx, [eax + edx*4]
movzx eax, byte [ecx]
add esi, eax
movzx eax, byte [ecx + 1]
add edi, eax
movzx eax, byte [ecx + 2]
mov ecx, dword [ebp - 0x18]
add ebx, eax
mov eax, dword [ebp - 0x14]
imul eax, edx
mov edx, dword [ebp - 0x14]
add eax, dword [ebp - 0x10]
add eax, dword [ebp - 0xc]
lea ecx, [ecx + eax*4]
lea eax, [esi + 1]
mov byte [ecx + 3], 0xff
shr eax, 1
mov byte [ecx], al
lea eax, [edi + 1]
shr eax, 1
mov byte [ecx + 1], al
lea eax, [ebx + 1]
mov ebx, dword [ebp - 8]
shr eax, 1
mov byte [ecx + 2], al
mov eax, dword [ebp + 0x20]
inc edx
mov dword [ebp - 0x14], edx
mov esi, dword [eax + 0xc]
mov eax, dword [ebp - 0x6c]
add eax, esi
sub dword [ebp - 0x50], 1
lea ebx, [ebx + eax*4]
mov dword [ebp - 8], ebx
jne 0x100aee05
mov eax, dword [ebp - 0x30]
mov ecx, esi
mov dl, byte [ebp - 1]
test al, 1
je 0x100af15e
test dl, dl
je 0x100af15e
mov edi, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
lea eax, [edx + edi]
cmp edi, eax
jge 0x100af152
mov eax, dword [ebp - 0x1c]
lea edi, [ebx + 2]
add eax, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x18]
imul eax, esi
mov dword [ebp - 0x50], edx
add eax, dword [ebp - 0xc]
inc ebx
lea ebx, [ebx + eax*4]
jmp 0x100af100
movzx eax, byte [edi + 2]
lea edi, [edi + 8]
movzx ecx, byte [edi - 0xa]
lea ebx, [ebx + 4]
movzx edx, byte [edi - 9]
add ecx, eax
movzx eax, byte [edi - 5]
movzx esi, byte [edi - 8]
add edx, eax
movzx eax, byte [edi - 4]
add esi, eax
mov byte [ebx - 2], 0xff
lea eax, [ecx + 1]
shr eax, 1
mov byte [ebx - 5], al
lea eax, [edx + 1]
shr eax, 1
mov byte [ebx - 4], al
lea eax, [esi + 1]
shr eax, 1
sub dword [ebp - 0x50], 1
mov byte [ebx - 3], al
jne 0x100af100
mov eax, dword [ebp + 0x20]
mov ebx, dword [ebp - 8]
mov edx, dword [ebp - 0x10]
mov ecx, dword [eax + 0xc]
mov eax, dword [ebp - 0x30]
lea ebx, [ebx + edx*8]
mov dl, byte [ebp - 1]
mov dword [ebp - 8], ebx
and eax, dword [ebp - 0x24]
test al, 1
je 0x100af19b
cmp byte [ebp - 2], 0
je 0x100af19b
test dl, dl
je 0x100af19b
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x28]
mov dl, byte [ebx + 1]
mov bl, byte [ebx + 2]
imul eax, ecx
mov ecx, dword [ebp - 0x18]
add eax, dword [ebp - 0x10]
add eax, dword [ebp - 0xc]
lea ecx, [ecx + eax*4]
mov eax, dword [ebp - 8]
mov al, byte [eax]
mov byte [ecx], al
mov byte [ecx + 1], dl
mov byte [ecx + 2], bl
mov byte [ecx + 3], 0xff
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x34]
mov ebx, dword [ebp - 0xc]
mov esi, dword [eax + 0x10]
mov dword [ebp - 0x1c], ecx
cmp ecx, esi
jb 0x100aece0
mov ecx, dword [ebp - 0x2c]
add ebx, ecx
mov edi, dword [eax + 0xc]
mov edx, dword [ebp + 0x1c]
mov dword [ebp - 0xc], ebx
cmp ebx, edi
jb 0x100aec81
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
push 0x80070057
call dword [sym.imp.PhotoBase.dll_void___stdcall_Base::Throw_long_int_]
push 0x101c31f0
call fcn.101aae4f
add esp, 4
cmp dword [0x101c31f0], 0xffffffff
jne 0x100aeea4
push 0x101c31f0
mov byte [0x101c31f4], 0xff
call fcn.101aadfc
add esp, 4
jmp 0x100aeea4
push 0x101c31f0
call fcn.101aae4f
add esp, 4
cmp dword [0x101c31f0], 0xffffffff
jne 0x100aef96
push 0x101c31f0
mov byte [0x101c31f4], 0xff
call fcn.101aadfc
add esp, 4
jmp 0x100aef96