Function at 0x401000
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x244
mov esi, dword [ebp + 0x14]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 0x401b10
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
xor ecx, ecx
nop dword [eax + eax]
mov byte [ebp + ecx - 0x150], cl
mov eax, ecx
cdq
idiv esi
movzx eax, byte [edi + edx]
mov byte [ebp + ecx - 0x250], al
inc ecx
cmp ecx, 0x100
jne 0x401040
xor eax, eax
xor ecx, ecx
nop word cs:[eax + eax]
movzx edx, byte [ebp + eax - 0x150]
add cl, dl
add cl, byte [ebp + eax - 0x250]
movzx esi, cl
mov dh, byte [ebp + esi - 0x150]
mov byte [ebp + eax - 0x150], dh
mov byte [ebp + esi - 0x150], dl
inc eax
cmp eax, 0x100
jne 0x401070
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
xor edx, edx
cmp edx, 0x3e8
jb 0x4010e4
jmp 0x40110f
mov ecx, dword [ebp + 0xc]
mov dword [eax], ecx
add eax, 4
mov dword [ebp - 0x34], eax
inc edx
cmp edx, 0x3e8
jae 0x40110f
mov eax, dword [ebp - 0x34]
cmp eax, dword [ebp - 0x30]
jne 0x4010d0
mov dword [ebp - 0x10], 2
lea ecx, [ebp - 0x38]
lea esi, [ebp + 0xc]
push esi
push eax
mov dword [ebp - 0x20], edx
call fcn.00402a10
mov edx, dword [ebp - 0x20]
inc edx
cmp edx, 0x3e8
jb 0x4010e4
mov eax, dword [ebp - 0x38]
cmp dword [eax], 0
jle 0x401296
mov dword [ebp - 0x3c], 0
xor edi, edi
xor edx, edx
jmp 0x40116f
add ecx, 0x23
mov eax, edx
push ecx
push eax
call fcn.00409a40
add esp, 8
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov edi, dword [ebp - 0x44]
mov eax, dword [ebp - 0x40]
movzx eax, byte [ebp + eax - 0x150]
mov ecx, dword [ebp + 8]
xor byte [ecx + edi], al
inc edi
mov eax, dword [ebp - 0x38]
cmp edi, dword [eax]
mov edx, dword [ebp - 0x48]
jge 0x401296
mov esi, dword [ebp - 0x3c]
lea eax, [esi + 1]
lea ecx, [esi + 0x100]
test eax, eax
cmovns ecx, eax
and ecx, 0xffffff00
neg ecx
add esi, ecx
inc esi
movzx eax, byte [ebp + esi - 0x150]
add dl, al
mov dword [ebp - 0x48], edx
movzx ecx, dl
movzx edx, byte [ebp + ecx - 0x150]
mov byte [ebp + esi - 0x150], dl
mov byte [ebp + ecx - 0x150], al
mov dword [ebp - 0x3c], esi
add al, byte [ebp + esi - 0x150]
movzx eax, al
je 0x401152
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x40], eax
mov ecx, eax
xor ecx, 3
xor edx, edx
mov dword [ebp - 0x4c], ecx
cmp edx, 0xa
jb 0x4011fe
jmp 0x40122c
mov dword [eax], ecx
add eax, 4
mov dword [ebp - 0x28], eax
inc edx
cmp edx, 0xa
jae 0x40122c
mov dword [ebp - 0x50], ecx
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x24]
jne 0x4011f0
mov dword [ebp - 0x10], 3
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x20], edx
lea edx, [ebp - 0x50]
push edx
push eax
call fcn.00402a10
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x4c]
inc edx
cmp edx, 0xa
jb 0x4011fe
xor edx, edx
nop
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x28]
sub ecx, eax
sar ecx, 2
cmp edx, ecx
jae 0x401260
mov dword [ebp - 0x20], edx
mov eax, dword [eax + edx*4]
mov dword [ebp - 0x10], 3
push eax
push str.Current_val:__d_n
call fcn.00401b40
add esp, 8
mov edx, dword [ebp - 0x20]
inc edx
jmp 0x401230
test eax, eax
je 0x40114c
mov ecx, dword [ebp - 0x24]
sub ecx, eax
cmp ecx, 0x1000
jb 0x40112d
mov edx, dword [eax - 4]
add eax, 0xfffffffc
sub eax, edx
cmp eax, 0x20
jb 0x401128
mov dword [ebp - 0x10], 1
call fcn.00411cbf
mov ecx, dword [ebp - 0x30]
sub ecx, eax
cmp ecx, 0x1000
jb 0x4012b5
mov edx, dword [eax - 4]
add eax, 0xfffffffc
sub eax, edx
cmp eax, 0x20
jae 0x4012d3
add ecx, 0x23
mov eax, edx
push ecx
push eax
call fcn.00409a40
add esp, 8
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x244
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x10], 0
call fcn.00411cbf
nop
push ebp
sub esp, 8
add ebp, 0xc
call fcn.0040e227
nop dword [eax]
push ebp
sub esp, 8
add ebp, 0xc
call fcn.0040e227
nop dword [eax]
push ebp
sub esp, 8
add ebp, 0xc
lea ecx, [ebp - 0x2c]
call fcn.00401b80
add esp, 8
pop ebp
ret