Function at 0x401000
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x3c
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x416410
lea eax, [ebp - 0x18]
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
mov ecx, dword [0x495c38]
lea eax, [ecx - 1]
imul eax, ecx
mov edx, eax
mov ecx, eax
not edx
and ecx, 0xf15bb53e
mov esi, edx
and edx, 0x8e205e79
and esi, 0xea44ac0
or ecx, esi
mov esi, ecx
xor ecx, 0xea44ac1
xor esi, 0xf04b0418
mov edi, ecx
and edi, 0xb94fbe7
and esi, 0xf46b0418
or esi, edi
mov edi, eax
xor edi, 0xfffffffe
and edi, eax
and eax, 0x71dfa186
mov ebx, edi
and edi, 0xf46b0418
or eax, edx
not ebx
mov edx, eax
xor eax, 0x8e205e79
or ecx, ebx
and ebx, 0xb94fbe7
xor edx, 0x71dfa186
or edi, ebx
not ecx
xor edi, esi
or ecx, edi
mov edi, dword [ebp + 0x10]
and eax, ecx
not ecx
and edx, ecx
or eax, edx
not eax
or eax, ecx
mov ecx, dword [0x495c3c]
cmp eax, 0xffffffff
sete dl
setne ah
cmp ecx, 9
setg al
cmp ecx, 0xa
mov ecx, eax
setl dh
xor cl, dl
or ah, dh
xor dh, dl
and cl, al
or al, dl
xor al, ah
mov dl, cl
and dl, dh
xor dh, cl
xor al, 1
mov ecx, dword [ebp + 0xc]
or dh, dl
mov ebx, eax
or bl, dh
xor al, dh
xor bl, 1
mov ah, bl
and ah, al
xor al, bl
or al, ah
nop
push eax
mov esi, esp
sub esp, 0x100
mov ebx, esp
sub esp, 0x100
mov dword [ebp - 0x2c], esp
sub esp, 0xc
mov edx, esp
test al, 1
mov dword [esi], ecx
je 0x401100
mov dword [ebp - 0x24], esi
mov esi, dword [ebp + 0x14]
xor ecx, ecx
mov dword [ebp - 0x38], edx
nop word [eax + eax]
mov eax, ecx
mov byte [ebx + ecx], cl
cdq
idiv esi
movzx eax, byte [edi + edx]
mov edx, dword [ebp - 0x2c]
mov byte [edx + ecx], al
inc ecx
cmp ecx, 0x100
jne 0x401130
xor eax, eax
mov ecx, 0xffffff00
xor esi, esi
mov dword [ebp - 0x28], ebx
nop word [eax + eax]
mov edi, dword [ebp - 0x2c]
movzx edx, byte [ebx + ecx + 0x100]
inc eax
movzx edi, byte [edi + ecx + 0x100]
add esi, edx
add edi, esi
mov esi, edi
sar esi, 0x1f
shr esi, 0x18
add esi, edi
and esi, 0xffffff00
sub edi, esi
mov esi, dword [ebp - 0x28]
movzx ebx, byte [esi + edi]
mov esi, dword [ebp - 0x28]
mov byte [esi + ecx + 0x100], bl
mov ebx, dword [ebp - 0x28]
inc ecx
mov esi, edi
mov byte [ebx + edi], dl
jne 0x401160
mov eax, dword [0x495c40]
lea edx, [eax - 1]
imul edx, eax
mov eax, edx
mov esi, edx
not eax
and esi, 0xab06a8a4
mov ecx, eax
mov edi, eax
and eax, 0xed31206b
and ecx, 0x4114111
or edi, 0xaf17e9b5
or esi, ecx
xor edi, esi
mov ecx, edi
and edi, 0x50e8164b
xor ecx, 0x4114110
and ecx, 0xaf17e9b4
or ecx, edi
mov esi, ecx
and ecx, 0x8af5fe31
not esi
and esi, 0x750a01ce
or ecx, esi
mov esi, ecx
xor ecx, 0x750a01ce
mov edi, ecx
xor esi, 0x88312021
or ecx, edx
and edx, 0x12cedf94
and edi, 0x12cedf94
and esi, 0xed31206b
or eax, edx
not ecx
mov edx, dword [0x495c44]
or esi, edi
mov edi, 0x7a91fa13
xor eax, esi
mov esi, 0x6d628d24
or ecx, eax
mov eax, ecx
and ecx, 0x54bb40a5
not eax
and eax, 0xab44bf5a
or ecx, eax
xor ecx, 0x54bb40a5
setne cl
sete ah
sete byte [ebp - 0x30]
cmp edx, 9
setg al
cmp edx, 0xa
mov ch, cl
setl dl
setl byte [ebp - 0x34]
and ch, dl
xor dl, ah
and ah, al
or al, cl
xor al, 1
or ah, ch
or al, dl
mov cl, ah
xor al, 1
and cl, al
xor al, ah
or al, cl
mov ecx, edx
xor cl, 1
mov dh, cl
mov ah, cl
and dh, dl
xor ah, dh
xor dh, 1
or dh, dl
xor dh, 1
or dh, ah
mov ah, cl
xor cl, al
mov dl, dh
and ah, al
xor dl, 1
or cl, ah
and dl, al
xor al, 1
and dh, al
mov eax, ecx
or dh, dl
xor al, dh
test al, 1
cmovne esi, edi
test cl, 1
mov ecx, 0x6d628d24
cmovne ecx, esi
test dh, 1
mov edx, 0x121b4c40
cmove ecx, esi
nop word cs:[eax + eax]
nop dword [eax]
cmp edx, 0x6d628d23
jg 0x401380
cmp edx, 0xaa0d0e3b
je 0x4013a7
cmp edx, 0x121b4c40
jne 0x4012e0
mov dh, byte [ebp - 0x30]
movzx ebx, byte [ebp - 0x34]
mov esi, 0xaa0d0e3b
mov bh, dh
mov dl, bl
xor bh, 1
xor dl, 1
mov eax, edx
mov ah, bh
or al, dh
or ah, bl
and dh, dl
and bl, bh
xor ah, al
mov al, bh
or bl, dh
xor al, dl
or dl, bh
xor dl, 1
or dl, al
mov al, bl
xor dl, 1
and al, dl
xor dl, bl
mov bl, ah
or dl, al
mov al, ah
xor bl, 1
and al, dl
xor dl, 1
and bl, dl
or bl, al
mov al, ah
xor al, dl
or dl, ah
xor dl, 1
or dl, al
mov eax, edx
xor al, bl
test al, 1
cmovne esi, edi
test dl, 1
mov edx, 0xaa0d0e3b
cmovne edx, esi
test bl, 1
mov ebx, dword [ebp - 0x28]
cmove edx, esi
cmp edx, 0x6d628d23
jle 0x4012ec
cmp edx, 0x6d628d24
je 0x4013b7
cmp edx, 0x7a91fa13
jne 0x4012e0
mov edx, 0xaa0d0e3b
cmp edx, 0x6d628d23
jle 0x4012ec
jmp 0x401380
mov edx, ecx
cmp edx, 0x6d628d23
jle 0x4012ec
jmp 0x401380
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x24]
xor edi, edi
mov esi, ecx
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
add esi, 4
mov dword [ebp - 0x3c], esi
cmp edi, 0x3e8
jb 0x4013fd
jmp 0x4014b6
inc edi
cmp edi, 0x3e8
jae 0x4014b6
mov dword [ebp - 0x30], esi
mov eax, dword [ebp - 0x30]
mov eax, dword [eax]
cmp eax, dword [ecx + 8]
mov eax, 0x1d141caf
setne byte [ebp - 0x1d]
mov ecx, dword [ebp - 0x38]
nop word cs:[eax + eax]
nop
cmp eax, 0xf03e7fc7
jg 0x401440
cmp eax, 0xd44714f1
je 0x401470
cmp eax, 0xd58b63cd
jne 0x401420
jmp 0x4014a0
cmp eax, 0xf03e7fc8
je 0x4013f0
cmp eax, 0x1d141caf
jne 0x401420
mov dword [ebp - 0x34], edx
mov ecx, 0xd44714f1
mov eax, 0xd58b63cd
cmp byte [ebp - 0x1d], 0
cmovne ecx, eax
mov eax, ecx
jmp 0x401411
mov eax, dword [ebp - 0x30]
mov eax, dword [eax]
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0x10], 0
push edx
push eax
mov dword [ebp - 0x2c], edi
call fcn.0040bf70
mov edi, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x28]
mov eax, 0xf03e7fc8
jmp 0x401411
mov eax, dword [ebp - 0x34]
mov ecx, dword [esi]
mov eax, dword [eax]
mov dword [ecx], eax
add dword [esi], 4
mov eax, 0xf03e7fc8
jmp 0x401411
xor edx, edx
xor edi, edi
xor esi, esi
jmp 0x40158a
mov eax, dword [ebp - 0x34]
mov esi, dword [ebp + 8]
mov edi, dword [ebp - 0x44]
mov eax, dword [ebp - 0x24]
mov cl, byte [esi + edi]
mov dl, byte [ebx + eax]
mov eax, ecx
mov ch, cl
not al
or ch, 4
mov ah, al
mov dh, al
and ch, 0x8e
and dh, 0x41
or ah, 0xcb
or dh, ch
mov ch, ah
and ah, 0x8e
not ch
and ch, 0x30
or ch, ah
xor ch, dh
mov ah, ch
and ch, 0xfb
not ah
and ah, 4
or ch, ah
mov dh, ch
xor ch, 0xcd
xor dh, 0x10
and ch, 0xed
and dh, 0x12
or dh, ch
mov ch, dl
mov ah, dh
xor dh, 0xed
not ch
xor ah, 0x12
and dh, dl
and dl, 0x8c
and ah, ch
or dh, ah
mov ah, dh
xor ah, ch
and ch, 0x73
or dl, ch
and ah, dh
mov ch, dl
and dl, 0x84
xor ch, 8
and ch, 0x7b
or ch, dl
mov dl, ch
xor ch, 0x7b
xor dl, 0x84
and ch, al
and dl, cl
mov cl, ah
or dl, ch
not dl
or dl, al
mov al, dl
xor cl, dl
and dl, ah
and cl, ah
not al
not ah
and ah, al
mov al, cl
or dl, ah
and al, dl
xor dl, cl
mov ecx, dword [ebp - 0x38]
or dl, al
mov byte [esi + edi], dl
mov edx, dword [ebp - 0x48]
mov esi, dword [ebp - 0x40]
inc edi
mov eax, dword [ecx]
cmp edi, dword [eax]
jge 0x4019eb
lea eax, [esi + 1]
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x10], 0
mov ecx, eax
sar ecx, 0x1f
shr ecx, 0x18
lea ecx, [esi + ecx + 1]
mov esi, eax
and ecx, 0xffffff00
sub esi, ecx
movzx ecx, byte [ebx + esi]
mov dword [ebp - 0x40], esi
add edx, ecx
mov dword [ebp - 0x24], ecx
mov eax, edx
sar eax, 0x1f
shr eax, 0x18
add eax, edx
and eax, 0xffffff00
sub edx, eax
mov al, byte [ebx + edx]
mov dword [ebp - 0x48], edx
mov byte [ebx + esi], al
mov byte [ebx + edx], cl
movzx eax, byte [ebx + esi]
mov dword [ebp - 0x3c], eax
push 0x43d15e
push 0x496758
call fcn.00401a30
add esp, 8
mov dword [ebp - 0x2c], eax
mov edi, dword [ebp - 0x24]
add edi, dword [ebp - 0x3c]
mov eax, edi
mov ecx, edi
not eax
and ecx, 0x100
mov esi, eax
or ecx, 0xc7165400
and eax, 0xf1897789
or esi, 0xffffff00
xor esi, ecx
mov ecx, esi
xor esi, 0x102e
xor ecx, 0x100
and esi, 0x801a2e
and ecx, 0x1d1
or esi, ecx
mov ecx, esi
xor esi, 0xff7fe5d1
mov edx, esi
xor ecx, 0x800208
or esi, edi
and edi, 0x76
and edx, 0xe768876
and ecx, 0x30892389
or eax, edi
not esi
or ecx, edx
xor eax, ecx
or esi, eax
mov eax, dword [0x495c48]
not esi
lea ecx, [eax - 1]
imul ecx, eax
mov edi, ecx
mov eax, ecx
not edi
and eax, 0x9c45c699
mov dword [ebp - 0x24], edi
and edi, 0x63ba3966
or eax, edi
mov edx, eax
xor eax, 0x63ba3966
or eax, 1
xor edx, 0x80008208
mov edi, eax
and edx, 0xe112b20e
and edi, 0x1eed4df1
or edx, edi
mov edi, ecx
xor edi, 0xfffffffe
and edi, ecx
and ecx, 0xce0789ce
mov ebx, edi
and edi, 0xe112b20e
not ebx
or eax, ebx
and ebx, 0x1eed4df1
or edi, ebx
not eax
mov ebx, dword [ebp - 0x28]
xor edi, edx
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x24], esi
or eax, edi
mov edi, eax
not edi
and edx, 0x31f87631
and edi, 0xf044fb44
or ecx, edx
mov edx, eax
and edx, 0xfbb04bb
or edi, edx
mov edx, ecx
xor ecx, 0x31f87631
xor edx, 0xc0048944
or eax, ecx
and ecx, 0xfbb04bb
and edx, 0xf044fb44
not eax
or edx, ecx
xor edx, edi
mov edi, 0x17629211
or eax, edx
mov ecx, eax
and eax, 0x1a44d26
not ecx
and ecx, 0xfe5bb2d9
or eax, ecx
xor eax, 0x1a44d26
mov eax, dword [0x495c4c]
sete byte [ebp - 0x1d]
cmp eax, 0xa
setl byte [ebp - 0x30]
nop dword [eax + eax]
cmp edi, 0x17629210
jg 0x401780
cmp edi, 0xe1873147
je 0x4017fc
cmp edi, 0xf07238cb
jne 0x401750
jmp 0x4014d0
cmp edi, 0x59139ec2
je 0x4019cc
cmp edi, 0x17629211
jne 0x401750
movzx ecx, byte [ebp - 0x1d]
movzx eax, byte [ebp - 0x30]
mov esi, 0xe1873147
mov edx, ecx
xor cl, al
xor al, 1
xor dl, 1
mov ah, dl
xor ah, al
or al, dl
mov edx, ecx
xor al, 1
mov dh, ah
or al, ah
xor al, 1
and dl, al
xor al, cl
or al, dl
mov ecx, eax
xor dh, al
and al, ah
and dh, ah
xor cl, 1
xor ah, 1
and ah, cl
mov cl, dh
or al, ah
xor cl, al
test cl, 1
mov ecx, 0x59139ec2
cmovne ecx, esi
test al, 1
mov edi, ecx
cmovne edi, esi
test dh, 1
cmove edi, ecx
cmp edi, 0x17629210
jle 0x401758
jmp 0x401780
mov dword [ebp - 0x10], 0
push dword [ebp - 0x2c]
call fcn.00402560
mov ebx, dword [ebp - 0x28]
add esp, 4
mov dword [ebp - 0x34], eax
mov eax, dword [0x495c48]
lea edx, [eax - 1]
imul edx, eax
mov eax, edx
and edx, 0x44821724
not eax
mov ecx, eax
or eax, 0x220fdab8
and ecx, 0xbb7de8db
or edx, ecx
mov ecx, eax
and eax, 0x90725960
mov esi, edx
xor edx, 0x4800
not ecx
xor esi, 0x200
or edx, 0x90700140
and ecx, 0x4d802407
and edx, 0x90725960
and esi, 0x220d8298
or ecx, eax
or esi, edx
xor ecx, esi
mov eax, ecx
and ecx, 0x220fdab8
not eax
and eax, 0xddf02547
or ecx, eax
mov edx, ecx
mov eax, ecx
xor edx, 0xf40348d0
and eax, 0xe0257108
and edx, ecx
not ecx
and ecx, 0x1fda8ef7
or eax, ecx
mov ecx, eax
xor ecx, 0x140208d0
or ecx, 0xbfcb72f
mov esi, ecx
mov edi, ecx
not esi
and edi, 0x6c4a60cc
and esi, 0x90010810
or esi, edi
mov edi, edx
and edx, 0x93b59f33
not edi
or ecx, edi
and edi, 0x6c4a60cc
or edx, edi
not ecx
xor edx, esi
or ecx, edx
mov edx, ecx
and ecx, 0xf40348d1
not edx
and edx, 0xbfcb72e
or ecx, edx
mov edx, eax
xor eax, 0xe0257109
and edx, 1
or eax, edx
mov edx, ecx
and ecx, 0xa7af0b2d
not edx
mov esi, edx
or edx, eax
and esi, 0x5850f4d2
not edx
or ecx, esi
mov esi, eax
and eax, 0x5850f4d2
not esi
and esi, 0xa7af0b2d
or esi, eax
xor esi, ecx
or edx, esi
mov esi, 0x59139ec2
mov eax, edx
and edx, 0xb7c25015
not eax
and eax, 0x483dafea
or eax, edx
mov ecx, eax
xor eax, 0x2d2980
xor ecx, 0x12424011
and eax, 0xa5ad3984
and ecx, 0x5a52c67b
or ecx, eax
mov eax, dword [0x495c4c]
xor ecx, 0x5a52c67b
cmp ecx, 0xffffffff
sete cl
setne dl
cmp eax, 0xa
setl ch
cmp eax, 9
setg al
or ch, dl
mov ah, al
or cl, al
xor ch, 1
and al, dl
xor ah, dl
xor cl, 1
mov dl, ch
and dl, cl
xor cl, ch
or ah, al
or cl, dl
mov al, ah
mov edx, ecx
xor al, 1
and cl, ah
xor dl, 1
or ah, dl
and dl, al
or dl, cl
mov al, ah
mov ecx, 0xf07238cb
xor al, dl
test al, 1
cmovne ecx, esi
test dl, dl
mov edx, 0xf07238cb
mov edi, ecx
cmovne edi, edx
test ah, 1
cmovne edi, ecx
cmp edi, 0x17629210
jle 0x401758
jmp 0x401780
mov dword [ebp - 0x10], 0
push dword [ebp - 0x2c]
call fcn.00402560
mov ebx, dword [ebp - 0x28]
mov edi, 0xe1873147
add esp, 4
jmp 0x401750
call fcn.0040bdc0
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret