Function at 0x41e470
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x24
mov eax, dword [esp + 0x28]
cmp dword [eax + 0x68], 0
mov edx, dword [eax + 0x7c]
push ebx
push ebp
mov ebp, dword [eax + 0xa0]
push esi
push edi
mov dword [esp + 0x1c], edx
push eax
jne 0x41ab76
call fcn.00417710
jmp 0x41ab7b
call fcn.00417890
cmp dword [ecx + 0x80c34], 0
mov edx, dword [ecx + 0xb4c]
mov eax, dword [ecx + 0xb3c]
mov ebx, dword [ecx + 0xb48]
mov esi, dword [ecx + 0xb40]
mov edi, dword [ecx + 0xb44]
mov dword [esp + 0x18], edx
mov edx, dword [ecx + 0xb58]
mov dword [esp + 0x14], edx
mov edx, dword [ecx + 0xb5c]
mov dword [esp + 0x20], edx
mov edx, dword [ecx + 0xb60]
mov dword [esp + 0x28], eax
mov eax, dword [ecx + 0xb50]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x24], edx
jne 0x41b026
mov edx, dword [esp + 0x38]
mov edx, dword [edx + 0xe0]
test edx, edx
jne 0x41ac69
mov edx, dword [ecx + 0xb54]
cmp edx, eax
jge 0x41b0af
sub eax, edx
mov dword [esp + 0x10], eax
lea esp, [esp]
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x14], eax
jge 0x41ac4c
sub eax, dword [esp + 0x14]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x1c]
cmp byte [eax + ebx], 0
je 0x41ac3e
movzx eax, byte [edi + ebp]
mov edx, dword [ecx + 0x68]
mov byte [esi + edx], al
movzx eax, byte [edi + ebp + 1]
mov edx, dword [ecx + 0x68]
mov byte [edx + esi + 1], al
movzx eax, byte [edi + ebp + 2]
mov edx, dword [ecx + 0x68]
mov byte [edx + esi + 2], al
inc ebx
add esi, 3
add edi, 3
sub dword [esp + 0x38], 1
jne 0x41ac12
add edi, dword [esp + 0x20]
add ebx, dword [esp + 0x24]
add esi, dword [esp + 0x28]
sub dword [esp + 0x10], 1
jne 0x41ac00
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 4
cmp edx, 1
jne 0x41ae3e
mov edx, dword [ecx + 0xb54]
cmp edx, eax
jge 0x41b0af
sub eax, edx
mov dword [esp + 0x30], eax
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
cmp edx, eax
jge 0x41ae19
sub eax, edx
mov dword [esp + 0x2c], eax
lea esp, [esp]
mov edx, dword [esp + 0x1c]
cmp byte [edx + ebx], 0
je 0x41ae03
mov eax, dword [ecx + 0x68]
movzx edx, byte [eax + esi]
movzx eax, byte [edi + ebp]
mov dword [esp + 0x38], eax
add eax, edx
cmp eax, 0xff
jge 0x41ace9
mov eax, 0xff
sub eax, dword [esp + 0x38]
mov ebx, 0xff
sub ebx, edx
imul eax, ebx
mov ebx, dword [esp + 0x10]
sar eax, 8
mov edx, 0xff
sub edx, eax
jmp 0x41ad0d
cmp byte [edi + ebp], 0
je 0x41ad08
mov eax, 0xff
sub eax, edx
cdq
idiv dword [esp + 0x38]
mov ebx, dword [esp + 0x10]
mov edx, 0xff
sub edx, eax
jmp 0x41ad0d
mov edx, 0xff
mov eax, dword [ecx + 0x68]
mov byte [esi + eax], dl
mov edx, dword [ecx + 0x68]
movzx eax, byte [edi + ebp + 1]
movzx edx, byte [edx + esi + 1]
add edx, eax
cmp edx, 0xff
mov dword [esp + 0x38], eax
jge 0x41ad57
mov edx, dword [ecx + 0x68]
movzx edx, byte [edx + esi + 1]
mov ebx, 0xff
sub ebx, edx
mov edx, 0xff
sub edx, eax
imul ebx, edx
sar ebx, 8
mov edx, 0xff
sub edx, ebx
mov ebx, dword [esp + 0x10]
jmp 0x41ad84
cmp byte [edi + ebp + 1], 0
je 0x41ad7f
mov eax, dword [ecx + 0x68]
movzx edx, byte [eax + esi + 1]
mov eax, 0xff
sub eax, edx
cdq
idiv dword [esp + 0x38]
mov ebx, dword [esp + 0x10]
mov edx, 0xff
sub edx, eax
jmp 0x41ad84
mov edx, 0xff
mov eax, dword [ecx + 0x68]
mov byte [eax + esi + 1], dl
mov edx, dword [ecx + 0x68]
movzx eax, byte [edi + ebp + 2]
movzx edx, byte [edx + esi + 2]
add edx, eax
cmp edx, 0xff
mov dword [esp + 0x38], eax
jge 0x41adcf
mov edx, dword [ecx + 0x68]
movzx edx, byte [edx + esi + 2]
mov ebx, 0xff
sub ebx, edx
mov edx, 0xff
sub edx, eax
imul ebx, edx
sar ebx, 8
mov edx, 0xff
sub edx, ebx
mov ebx, dword [esp + 0x10]
jmp 0x41adfc
cmp byte [edi + ebp + 2], 0
je 0x41adf7
mov eax, dword [ecx + 0x68]
movzx edx, byte [eax + esi + 2]
mov eax, 0xff
sub eax, edx
cdq
idiv dword [esp + 0x38]
mov ebx, dword [esp + 0x10]
mov edx, 0xff
sub edx, eax
jmp 0x41adfc
mov edx, 0xff
mov eax, dword [ecx + 0x68]
mov byte [eax + esi + 2], dl
inc ebx
add esi, 3
add edi, 3
sub dword [esp + 0x2c], 1
mov dword [esp + 0x10], ebx
jne 0x41aca0
add ebx, dword [esp + 0x24]
add edi, dword [esp + 0x20]
add esi, dword [esp + 0x28]
sub dword [esp + 0x30], 1
mov dword [esp + 0x10], ebx
jne 0x41ac86
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 4
cmp edx, 2
jne 0x41af5d
mov edx, dword [ecx + 0xb54]
cmp edx, eax
jge 0x41b0af
sub eax, edx
mov dword [esp + 0x30], eax
jmp 0x41ae60
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
cmp edx, eax
jge 0x41af38
sub eax, edx
mov dword [esp + 0x38], eax
jmp 0x41ae80
mov edx, dword [esp + 0x1c]
cmp byte [edx + ebx], 0
je 0x41af22
mov eax, dword [ecx + 0x68]
movzx edx, byte [edi + ebp]
add eax, esi
mov dword [esp + 0x2c], eax
movzx eax, byte [eax]
mov ebx, 0xff
sub ebx, edx
mov edx, 0xff
sub edx, eax
imul ebx, edx
mov edx, dword [esp + 0x2c]
sar ebx, 8
or al, 0xff
sub al, bl
mov byte [edx], al
mov eax, dword [ecx + 0x68]
movzx edx, byte [edi + ebp + 1]
lea eax, [eax + esi + 1]
mov dword [esp + 0x2c], eax
movzx eax, byte [eax]
mov ebx, 0xff
sub ebx, edx
mov edx, 0xff
sub edx, eax
imul ebx, edx
mov edx, dword [esp + 0x2c]
sar ebx, 8
or al, 0xff
sub al, bl
mov byte [edx], al
mov eax, dword [ecx + 0x68]
movzx edx, byte [edi + ebp + 2]
lea eax, [eax + esi + 2]
mov dword [esp + 0x2c], eax
movzx eax, byte [eax]
mov ebx, 0xff
sub ebx, edx
mov edx, 0xff
sub edx, eax
imul ebx, edx
mov edx, dword [esp + 0x2c]
sar ebx, 8
or al, 0xff
sub al, bl
mov ebx, dword [esp + 0x10]
mov byte [edx], al
inc ebx
add esi, 3
add edi, 3
sub dword [esp + 0x38], 1
mov dword [esp + 0x10], ebx
jne 0x41ae80
add ebx, dword [esp + 0x24]
add edi, dword [esp + 0x20]
add esi, dword [esp + 0x28]
sub dword [esp + 0x30], 1
mov dword [esp + 0x10], ebx
jne 0x41ae60
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 4
cmp edx, 3
jne 0x41b0af
mov edx, dword [ecx + 0xb54]
cmp edx, eax
jge 0x41b0af
sub eax, edx
mov dword [esp + 0x30], eax
lea ebx, [ebx]
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x14], eax
jge 0x41b005
sub eax, dword [esp + 0x14]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x1c]
cmp byte [eax + ebx], 0
je 0x41aff7
mov edx, dword [ecx + 0x68]
lea eax, [edx + esi]
movzx edx, byte [edi + ebp]
mov dword [esp + 0x2c], eax
movzx eax, byte [eax]
imul edx, eax
mov eax, dword [esp + 0x2c]
sar edx, 8
mov byte [eax], dl
mov edx, dword [ecx + 0x68]
lea eax, [edx + esi + 1]
movzx edx, byte [edi + ebp + 1]
mov dword [esp + 0x2c], eax
movzx eax, byte [eax]
imul edx, eax
mov eax, dword [esp + 0x2c]
sar edx, 8
mov byte [eax], dl
mov edx, dword [ecx + 0x68]
lea eax, [edx + esi + 2]
movzx edx, byte [edi + ebp + 2]
mov dword [esp + 0x2c], eax
movzx eax, byte [eax]
imul edx, eax
mov eax, dword [esp + 0x2c]
sar edx, 8
mov byte [eax], dl
inc ebx
add esi, 3
add edi, 3
sub dword [esp + 0x38], 1
jne 0x41af92
add edi, dword [esp + 0x20]
add ebx, dword [esp + 0x24]
add esi, dword [esp + 0x28]
sub dword [esp + 0x30], 1
jne 0x41af80
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 4
mov edx, dword [ecx + 0xb54]
cmp edx, eax
jge 0x41b0af
sub eax, edx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x14], eax
jge 0x41b09c
sub eax, dword [esp + 0x14]
mov dword [esp + 0x38], eax
jmp 0x41b050
mov edx, dword [esp + 0x1c]
cmp byte [edx + ebx], 0
je 0x41b08e
movzx eax, byte [edi + ebp + 1]
movzx edx, byte [edi + ebp + 2]
add edx, eax
movzx eax, byte [edi + ebp]
add edx, eax
mov eax, 0x55555556
imul edx
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [ecx + 0x68]
mov byte [esi + edx], al
mov edx, dword [ecx + 0x68]
mov byte [edx + esi + 1], al
mov edx, dword [ecx + 0x68]
mov byte [edx + esi + 2], al
inc ebx
add esi, 3
add edi, 3
sub dword [esp + 0x38], 1
jne 0x41b050
add edi, dword [esp + 0x20]
add ebx, dword [esp + 0x24]
add esi, dword [esp + 0x28]
sub dword [esp + 0x30], 1
jne 0x41b036
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 4
mov eax, dword [esp + 4]
mov edx, dword [eax + 0xc8]
cmp edx, 0xffffffff
je 0x41e4b2
mov dword [ecx + 0xfc], edx
movsx edx, byte [eax + 0xdc]
test dl, 1
je 0x41e4a9
test dl, 2
je 0x41e4b2
mov dword [esp + 4], eax
test dl, 4
je 0x41e4a4
jmp fcn.0041b0c0
jmp 0x41ab50
mov dword [esp + 4], eax
jmp fcn.0041a6b0
ret 4