Function at 0x45cc50
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd4
mov eax, dword [0x5cfc24]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xcc], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xd0], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0xd4], eax
mov eax, dword [ebx]
push edi
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0xc4], ebx
mov dword [eax + 8], 0
mov dword [ebp - 0x9c], edi
cmp edi, 4
ja 0x45d60c
push ebx
call fcn.00460b00
add esp, 4
test eax, eax
jne 0x45ccd2
push eax
mov eax, dword [ebx]
push dword [eax + 8]
push ebx
call fcn.00460dc0
add esp, 0xc
xor eax, eax
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004dde94
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x9c]
test ecx, ecx
jne 0x45ccf2
mov eax, dword [ebx]
cmp dword [eax + 8], 3
setge cl
lea ecx, [ecx*2 + 1]
mov dword [ebp - 0x9c], ecx
mov eax, dword [ebx]
push esi
mov edx, dword [eax + 8]
mov dword [ebp - 0xb4], edx
cmp edx, 3
jne 0x45cd2a
cmp dword [ebx + 0x47ec], edx
je 0x45cd1d
cmp dword [ebx + 0x47e8], 0
jne 0x45cd2a
cmp dword [ebx + 0x47e4], 0
jne 0x45cd2a
mov esi, 1
mov dword [ebp - 0xb8], esi
jmp 0x45cd37
xor esi, esi
mov dword [ebp - 0xb8], esi
cmp edx, 3
jne 0x45cd54
cmp ecx, 3
jge 0x45cd54
test esi, esi
jne 0x45cd54
xor eax, eax
mov dword [ebp - 0xb4], 1
mov dword [ebp - 0xb0], eax
jmp 0x45cd6a
xor eax, eax
mov dword [ebp - 0xb8], esi
mov dword [ebp - 0xb0], eax
test edx, edx
jle 0x45ce5d
lea esi, [ebx + 0x46a0]
lea edi, [ebp - 0x88]
mov dword [ebp - 0x98], esi
nop dword [eax]
mov eax, dword [ebx]
mov eax, dword [eax]
add eax, 3
push eax
call fcn.004f027b
add esp, 4
mov dword [esi + 0x34], eax
test eax, eax
je 0x45d5df
mov eax, dword [ebx + 0x4684]
cdq
idiv dword [esi]
mov dword [edi + 0x10], 0
mov dword [ebp - 0xa4], eax
mov dword [edi], eax
mov eax, dword [ebx + 0x4688]
cdq
idiv dword [esi + 4]
xor edx, edx
mov esi, eax
mov eax, dword [ebp - 0xa4]
mov ecx, esi
mov dword [edi + 4], esi
sar ecx, 1
dec eax
mov dword [edi + 0xc], ecx
mov ecx, dword [ebx]
add eax, dword [ecx]
mov ecx, dword [ebp - 0xa4]
div ecx
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x98]
mov eax, dword [eax + 0x28]
mov dword [edi - 4], eax
mov dword [edi - 8], eax
cmp ecx, 1
jne 0x45ce0c
cmp esi, ecx
jne 0x45ce00
mov eax, 0x45d630
jmp 0x45ce2f
cmp esi, 2
jne 0x45ce0c
mov eax, 0x469380
jmp 0x45ce2f
cmp ecx, 2
jne 0x45ce2a
cmp esi, 1
jne 0x45ce1d
mov eax, 0x469060
jmp 0x45ce2f
cmp esi, 2
jne 0x45ce2a
mov eax, dword [ebx + 0x4814]
jmp 0x45ce2f
mov eax, 0x469010
mov esi, dword [ebp - 0x98]
mov dword [edi - 0xc], eax
add esi, 0x48
mov eax, dword [ebp - 0xb0]
add edi, 0x20
inc eax
mov dword [ebp - 0x98], esi
mov dword [ebp - 0xb0], eax
cmp eax, dword [ebp - 0xb4]
jl 0x45cd80
mov eax, dword [ebx]
mov edi, dword [ebp - 0x9c]
mov esi, dword [eax + 4]
mov ecx, dword [eax]
test edi, edi
js 0x45d5df
test ecx, ecx
js 0x45d5df
je 0x45ce8c
mov eax, 0x7fffffff
cdq
idiv ecx
cmp edi, eax
jg 0x45d5df
mov eax, ecx
imul eax, edi
mov dword [ebp - 0xa8], eax
test eax, eax
js 0x45d5df
test esi, esi
js 0x45d5df
je 0x45cebd
mov eax, 0x7fffffff
cdq
idiv esi
cmp dword [ebp - 0xa8], eax
jg 0x45d5df
imul ecx, esi
mov eax, ecx
imul eax, edi
cmp eax, 0x7ffffffe
jg 0x45d5df
imul ecx, edi
inc ecx
push ecx
call fcn.004f027b
mov ecx, eax
add esp, 4
mov eax, dword [ebx]
mov dword [ebp - 0xb0], ecx
test ecx, ecx
je 0x45d5e1
xor edi, edi
mov dword [ebp - 0x98], edi
cmp dword [eax + 4], edi
jbe 0x45d2a1
mov edx, dword [ebp - 0x9c]
mov dword [ebp - 0xb0], ecx
jmp 0x45cf16
mov ecx, dword [ebp - 0xb0]
mov esi, dword [eax]
imul esi, edi
mov dword [ebp - 0xa8], 0
imul esi, edx
add esi, ecx
cmp dword [ebp - 0xb4], 0
mov dword [ebp - 0xa0], esi
jle 0x45d068
mov esi, dword [ebp - 0xb4]
lea eax, [ebx + 0x46bc]
mov dword [ebp - 0xc0], eax
lea edi, [ebp - 0x7c]
mov ebx, eax
jmp 0x45cf66
mov ecx, dword [ebp - 0xb0]
mov eax, dword [ebp - 0xb8]
lea edx, [edi - 0x14]
mov dword [ebp - 0xbc], eax
mov dword [ebp - 0xb8], eax
mov eax, dword [edi - 8]
mov dword [ebp - 0xc8], ecx
mov dword [ebp - 0xb0], ecx
lea ecx, [edi - 0x10]
sar eax, 1
mov dword [ebp - 0xac], esi
mov dword [ebp - 0xc0], ecx
mov dword [ebp - 0xb4], edx
cmp dword [edi], eax
jl 0x45cfc9
mov eax, dword [edx]
mov edx, ecx
mov dword [ebp - 0xa4], ecx
mov ecx, dword [ebp - 0xc8]
mov dword [ebp - 0xb0], ecx
mov ecx, dword [ebp - 0xbc]
mov dword [ebp - 0xb8], ecx
jmp 0x45cfdf
mov eax, ecx
mov dword [ebp - 0xb4], edx
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xc0], eax
mov eax, dword [ecx]
push dword [edi - 0xc]
push dword [edi - 4]
push eax
mov eax, dword [edx]
push eax
push dword [ebx + 0x18]
call dword [edi - 0x18]
mov ecx, dword [ebp - 0xa8]
add esp, 0x14
mov dword [ebp + ecx*4 - 0x14], eax
mov eax, dword [edi]
inc eax
mov dword [edi], eax
cmp eax, dword [edi - 8]
jl 0x45d033
mov edx, dword [ebp - 0xa4]
mov eax, dword [ebp - 0xb4]
inc dword [edi + 4]
mov dword [edi], 0
mov edx, dword [edx]
mov dword [eax], edx
mov eax, dword [edi + 4]
cmp eax, dword [ebx]
jge 0x45d033
mov eax, dword [ebx + 4]
add eax, edx
mov edx, dword [ebp - 0xc0]
mov dword [edx], eax
inc ecx
add edi, 0x20
add ebx, 0x48
mov dword [ebp - 0xa8], ecx
cmp ecx, esi
jl 0x45cf60
mov ebx, dword [ebp - 0xc4]
mov edx, dword [ebp - 0x9c]
mov edi, dword [ebp - 0x98]
mov dword [ebp - 0xb4], esi
mov eax, dword [ebx]
mov esi, dword [ebp - 0xa0]
cmp edx, 3
jl 0x45d324
mov ecx, dword [eax + 8]
cmp ecx, 3
jne 0x45d10f
cmp dword [ebp - 0xb8], 0
je 0x45d0ec
xor edi, edi
cmp dword [eax], edi
jbe 0x45d289
mov ecx, dword [ebp - 0x10]
add esi, 2
mov eax, dword [ebp - 0x14]
mov ebx, dword [ebp - 0xc]
sub eax, ecx
mov dword [ebp - 0xa4], ebx
sub dword [ebp - 0xa4], ecx
mov ebx, dword [ebp - 0xc4]
mov dword [ebp - 0xa0], eax
movzx eax, byte [eax + ecx]
lea ecx, [ecx + 1]
mov byte [esi - 2], al
inc edi
movzx eax, byte [ecx - 1]
mov byte [esi - 1], al
mov eax, dword [ebp - 0xa4]
movzx eax, byte [eax + ecx - 1]
mov byte [esi], al
mov byte [esi + 1], 0xff
add esi, edx
mov eax, dword [ebx]
cmp edi, dword [eax]
mov eax, dword [ebp - 0xa0]
jb 0x45d0b6
jmp 0x45d289
push edx
push dword [eax]
mov eax, dword [ebx + 0x4810]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push esi
call eax
mov edx, dword [ebp - 0x9c]
add esp, 0x18
jmp 0x45d28f
cmp ecx, 4
jne 0x45d2fd
mov ecx, dword [ebx + 0x47e8]
test ecx, ecx
jne 0x45d1e3
mov dword [ebp - 0xa8], ecx
cmp dword [eax], ecx
jbe 0x45d28f
mov ecx, dword [ebp - 0x10]
lea edi, [esi + 2]
mov esi, dword [ebp - 8]
sub ecx, esi
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0xa0], ecx
sub eax, esi
mov ecx, dword [ebp - 0xc]
sub ecx, esi
mov dword [ebp - 0xbc], eax
mov dword [ebp - 0xac], ecx
nop dword [eax + eax]
movzx ecx, byte [eax + esi]
lea esi, [esi + 1]
movzx edx, byte [esi - 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [edi - 2], al
mov eax, dword [ebp - 0xa0]
movzx ecx, byte [eax + esi - 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [edi - 1], al
mov eax, dword [ebp - 0xac]
movzx ecx, byte [eax + esi - 1]
imul ecx, edx
mov edx, dword [ebp - 0x9c]
mov byte [edi + 1], 0xff
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
mov ecx, dword [ebp - 0xa8]
shr eax, 8
inc ecx
mov byte [edi], al
add edi, edx
mov eax, dword [ebx]
mov dword [ebp - 0xa8], ecx
cmp ecx, dword [eax]
mov eax, dword [ebp - 0xbc]
jb 0x45d160
jmp 0x45d289
mov eax, dword [eax]
mov edi, dword [ebx + 0x4810]
push edx
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push esi
cmp ecx, 2
jne 0x45d27e
call edi
mov eax, dword [ebx]
xor edi, edi
add esp, 0x18
cmp dword [eax], edi
jbe 0x45d283
add esi, 2
mov eax, dword [ebp - 8]
movzx edx, byte [eax + edi]
inc edi
movzx eax, byte [esi - 2]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 2], al
movzx eax, byte [esi - 1]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 1], al
movzx eax, byte [esi]
not al
movzx ecx, al
imul ecx, edx
mov edx, dword [ebp - 0x9c]
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi], al
add esi, edx
mov eax, dword [ebx]
cmp edi, dword [eax]
jb 0x45d214
jmp 0x45d289
call edi
add esp, 0x18
mov edx, dword [ebp - 0x9c]
mov edi, dword [ebp - 0x98]
mov eax, dword [ebx]
inc edi
mov dword [ebp - 0x98], edi
cmp edi, dword [eax + 4]
jb 0x45cf10
push 0
push dword [eax + 8]
push ebx
call fcn.00460dc0
mov eax, dword [ebx]
add esp, 0xc
mov ecx, dword [ebp - 0xcc]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, dword [ebx]
mov ecx, dword [ebp - 0xd0]
mov eax, dword [eax + 4]
mov dword [ecx], eax
mov eax, dword [ebp - 0xd4]
test eax, eax
je 0x45d2e6
mov ecx, dword [ebx]
xor edx, edx
cmp dword [ecx + 8], 3
setge dl
lea edx, [edx*2 + 1]
mov dword [eax], edx
mov eax, dword [ebp - 0xb0]
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004dde94
mov esp, ebp
pop ebp
ret
xor ecx, ecx
cmp dword [eax], ecx
jbe 0x45d28f
inc esi
mov eax, dword [ebp - 0x14]
mov al, byte [eax + ecx]
inc ecx
mov byte [esi + 1], al
mov byte [esi], al
mov byte [esi - 1], al
mov byte [esi + 2], 0xff
add esi, edx
mov eax, dword [ebx]
cmp ecx, dword [eax]
jb 0x45d304
jmp 0x45d28f
cmp dword [ebp - 0xb8], 0
je 0x45d405
mov eax, dword [eax]
xor edi, edi
cmp edx, 1
jne 0x45d39f
test eax, eax
je 0x45d289
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
sub eax, edx
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp - 0xc]
sub eax, edx
sub esi, edx
mov dword [ebp - 0xac], eax
nop dword [eax]
movzx eax, byte [edx + eax]
lea edx, [edx + 1]
imul ecx, eax, 0x1d
inc edi
mov eax, dword [ebp - 0xa0]
movzx eax, byte [edx + eax - 1]
imul eax, eax, 0x96
add ecx, eax
movzx eax, byte [edx - 1]
imul eax, eax, 0x4d
add ecx, eax
shr ecx, 8
mov byte [edx + esi - 1], cl
mov eax, dword [ebx]
cmp edi, dword [eax]
mov eax, dword [ebp - 0xac]
jb 0x45d360
jmp 0x45d283
test eax, eax
je 0x45d289
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
sub eax, edx
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp - 0xc]
sub eax, edx
mov dword [ebp - 0xac], eax
movzx eax, byte [edx + eax]
lea edx, [edx + 1]
imul ecx, eax, 0x1d
lea esi, [esi + 2]
mov eax, dword [ebp - 0xa0]
inc edi
movzx eax, byte [edx + eax - 1]
imul eax, eax, 0x96
add ecx, eax
movzx eax, byte [edx - 1]
imul eax, eax, 0x4d
mov byte [esi - 1], 0xff
add ecx, eax
shr ecx, 8
mov byte [esi - 2], cl
mov eax, dword [ebx]
cmp edi, dword [eax]
mov eax, dword [ebp - 0xac]
jb 0x45d3c0
jmp 0x45d283
cmp dword [eax + 8], 4
jne 0x45d585
mov ecx, dword [ebx + 0x47e8]
test ecx, ecx
jne 0x45d510
mov dword [ebp - 0xa8], ecx
cmp dword [eax], ecx
jbe 0x45d28f
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
sub eax, ecx
mov dword [ebp - 0xa0], eax
sub edi, ecx
mov eax, dword [ebp - 0xc]
sub eax, ecx
mov dword [ebp - 0xa4], ecx
mov dword [ebp - 0xbc], edi
mov dword [ebp - 0xac], eax
nop word [eax + eax]
movzx edi, byte [ecx + edi]
movzx eax, byte [ecx]
mov edx, dword [ebp - 0xa0]
mov ebx, dword [ebp - 0xac]
imul edi, eax
movzx ecx, byte [ecx + edx]
mov edx, dword [ebp - 0xa4]
imul ecx, eax
sub edi, 0xffffff80
movzx edx, byte [edx + ebx]
imul edx, eax
sub ecx, 0xffffff80
mov ebx, dword [ebp - 0xc4]
mov eax, ecx
mov byte [esi + 1], 0xff
shr eax, 8
add eax, ecx
shr eax, 8
sub edx, 0xffffff80
movzx eax, al
imul ecx, eax, 0x96
mov eax, edx
shr eax, 8
add eax, edx
mov edx, dword [ebp - 0x9c]
shr eax, 8
movzx eax, al
imul eax, eax, 0x1d
add ecx, eax
mov eax, edi
shr eax, 8
add eax, edi
mov edi, dword [ebp - 0xa8]
shr eax, 8
inc edi
movzx eax, al
imul eax, eax, 0x4d
mov dword [ebp - 0xa8], edi
add ecx, eax
shr ecx, 8
mov byte [esi], cl
add esi, edx
mov eax, dword [ebx]
mov ecx, dword [ebp - 0xa4]
inc ecx
mov dword [ebp - 0xa4], ecx
cmp edi, dword [eax]
mov edi, dword [ebp - 0xbc]
jb 0x45d460
jmp 0x45d289
cmp ecx, 2
jne 0x45d585
cmp dword [eax], 0
mov dword [ebp - 0xa8], 0
jbe 0x45d28f
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 8]
sub eax, edx
mov edi, dword [ebp - 0x9c]
mov dword [ebp - 0xa0], eax
nop dword [eax]
mov al, byte [edx + eax]
lea edx, [edx + 1]
not al
movzx ecx, al
movzx eax, byte [edx - 1]
imul ecx, eax
mov byte [esi + 1], 0xff
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
mov ecx, dword [ebp - 0xa8]
shr eax, 8
inc ecx
mov byte [esi], al
add esi, edi
mov eax, dword [ebx]
mov dword [ebp - 0xa8], ecx
cmp ecx, dword [eax]
mov eax, dword [ebp - 0xa0]
jb 0x45d540
jmp 0x45d283
mov eax, dword [eax]
xor ecx, ecx
cmp edx, 1
jne 0x45d5b5
test eax, eax
je 0x45d28f
mov edi, dword [ebp - 0x14]
sub edi, esi
nop dword [eax + eax]
mov al, byte [edi + esi]
lea esi, [esi + 1]
mov byte [esi - 1], al
inc ecx
mov eax, dword [ebx]
cmp ecx, dword [eax]
jb 0x45d5a0
jmp 0x45d289
test eax, eax
je 0x45d28f
mov edx, dword [ebp - 0x14]
mov al, byte [edx + ecx]
lea esi, [esi + 2]
mov byte [esi - 2], al
inc ecx
mov byte [esi - 1], 0xff
mov eax, dword [ebx]
cmp ecx, dword [eax]
jb 0x45d5c0
mov edx, dword [ebp - 0x9c]
jmp 0x45d28f
mov eax, dword [ebx]
push 0
push dword [eax + 8]
push ebx
call fcn.00460dc0
add esp, 0xc
mov dword [0x5d17b0], 0x5174f8
xor eax, eax
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004dde94
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
xor ecx, ebp
mov dword [0x5d17b0], 0x5175ac
pop ebx
call fcn.004dde94
mov esp, ebp
pop ebp
ret