Function at 0x40ceb6
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x158
push 0x62
xor ecx, ecx
mov dword [ebp - 0x38], 0x52
pop edx
mov dword [ebp - 0x34], 0x26
mov eax, ecx
mov dword [ebp - 0x30], 0xffffff56
add edx, dword [ebp + eax*4 - 0x38]
inc eax
cmp eax, 3
jl 0x40cedb
mov eax, dword [0x4015c8]
mov dword [ebp - 0xc], eax
mov ax, word [0x4015cc]
push esi
push edi
mov word [ebp - 8], ax
mov edi, ecx
mov dword [ebp - 0x3c], edx
mov eax, ecx
mov dword [ebp - 0x2c], 0x1a0652a9
mov dword [ebp - 0x28], 0x42ce9ecc
mov dword [ebp - 0x24], 0x6f5f37a7
mov dword [ebp - 0x20], 0x8cf404df
mov dword [ebp - 0x1c], 0x907c9ef2
mov dword [ebp - 0x18], 0x4e620f6a
mov byte [ebp + eax - 0x158], al
inc eax
cmp eax, 0x100
jb 0x40cf2a
mov esi, ecx
push ebx
xor edx, edx
mov bl, byte [ebp + esi - 0x158]
push 5
mov eax, esi
pop ecx
div ecx
movzx ecx, bl
movzx eax, byte [ebp + edx - 0xc]
add eax, edi
add ecx, eax
movzx edi, cl
mov al, byte [ebp + edi - 0x158]
mov byte [ebp + esi - 0x158], al
inc esi
mov byte [ebp + edi - 0x158], bl
cmp esi, 0x100
jb 0x40cf3c
xor ebx, ebx
mov ecx, ebx
mov edi, ebx
mov esi, ebx
lea eax, [edi + 1]
movzx edi, al
push 0x61
pop edx
mov al, byte [ebp + edi - 0x158]
mov byte [ebp - 1], al
movzx eax, al
mov dword [ebp - 0x10], eax
add eax, ecx
movzx eax, al
mov ecx, 0x1afc
mov dword [ebp - 0x14], eax
mov eax, 0x401860
add ecx, edx
inc eax
cmp ecx, 0x15bd
ja 0x40cfca
movsx edx, byte [eax]
test edx, edx
jne 0x40cfac
mov eax, dword [0x44d494]
and eax, 0xcb4f4c16
jmp 0x40cfdf
call fcn.0040cc68
mov eax, dword [0x44d494]
xor eax, 0xd15b5aab
imul eax, eax, 0x2431170e
imul eax, eax, 0x13391e15
push 0x1cdf
mov dword [0x44d494], eax
call dword [sym.imp.USER32.dll_IsZoomed]
call fcn.0040cc68
mov ecx, dword [ebp - 0x14]
mov al, byte [ebp + ecx - 0x158]
mov byte [ebp + edi - 0x158], al
mov al, byte [ebp - 1]
mov byte [ebp + ecx - 0x158], al
movzx eax, byte [ebp + edi - 0x158]
add eax, dword [ebp - 0x10]
movzx eax, al
mov al, byte [ebp + eax - 0x158]
xor al, byte [ebp + esi - 0x2c]
mov byte [ebp + esi - 0x58], al
inc esi
cmp esi, 0x18
jb 0x40cf81
mov eax, dword [0x44d494]
lea edi, [ebp - 0x28]
mov esi, 0x4015d0
mov byte [ebp - 0x40], bl
sub eax, 0x62c07106
mov dword [ebp - 0xc], 0x9b1e799f
push 0x6b
mov edx, 0x401878
mov dword [ebp - 0x14], eax
movsd dword es:[edi], dword [esi]
pop ecx
mov word [ebp - 8], 0x9187
mov al, cl
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov esi, edx
sub al, 0x30
cmp al, 9
ja 0x40d084
inc esi
mov al, byte [esi]
test al, al
jne 0x40d072
mov esi, dword [ebp - 0x14]
jmp 0x40d08d
mov esi, dword [ebp - 0x14]
or esi, 0x7b4e307e
or esi, 0x8e09589b
sub cl, 0x30
cmp cl, 9
ja 0x40d0a6
inc edx
mov al, byte [edx]
mov cl, al
test al, al
jne 0x40d093
jmp 0x40d0ac
and esi, 0x1ecb0d13
mov eax, ebx
and esi, 0x6b7e54eb
imul esi, esi, 0xc86f799d
mov byte [ebp + eax - 0x158], al
inc eax
cmp eax, 0x100
jb 0x40d0b4
mov edi, ebx
mov dl, byte [ebp + edi - 0x158]
mov eax, edi
and eax, 0xf
movzx ecx, dl
movzx eax, byte [ebp + eax - 0x28]
add eax, ebx
add ecx, eax
movzx ebx, cl
mov al, byte [ebp + ebx - 0x158]
mov byte [ebp + edi - 0x158], al
inc edi
mov byte [ebp + ebx - 0x158], dl
cmp edi, 0x100
jb 0x40d0cb
xor ebx, ebx
mov edi, ebx
mov edx, ebx
mov ecx, ebx
lea eax, [edx + 1]
movzx edx, al
mov al, byte [ebp + edx - 0x158]
mov byte [ebp - 1], al
movzx eax, al
mov dword [ebp - 0x10], eax
add eax, edi
movzx edi, al
mov eax, ebx
inc eax
cmp eax, 0x10ac
jl 0x40d13b
cmp byte [eax + 0x4017d8], bl
jne 0x40d129
jmp 0x40d141
sub esi, 0x77e79f70
mov al, byte [ebp + edi - 0x158]
and esi, 0xe7a1b00f
mov byte [ebp + edx - 0x158], al
or esi, 0x62a08009
mov al, byte [ebp - 1]
mov byte [ebp + edi - 0x158], al
movzx eax, byte [ebp + edx - 0x158]
add eax, dword [ebp - 0x10]
movzx eax, al
mov al, byte [ebp + eax - 0x158]
xor al, byte [ebp + ecx - 0xc]
mov byte [ebp + ecx - 0x34], al
inc ecx
cmp ecx, 6
jb 0x40d10c
push 0x3e
mov dword [0x44d494], esi
mov byte [ebp - 0x2e], bl
pop edx
mov dword [ebp - 0xc], 9
mov dword [ebp - 8], 0xffffffba
add edx, dword [ebp + ebx*4 - 0xc]
inc ebx
cmp ebx, 2
jl 0x40d1a2
mov ecx, dword [ebp - 0x3c]
neg edx
mov esi, dword [ebp + 8]
pop ebx
mov ecx, dword fs:[ecx]
mov eax, dword [ecx + 0xa4]
mov dword [esi], eax
mov eax, dword [ecx + 0xa8]
mov dword [esi + 4], eax
movzx eax, word [ecx + 0xac]
lea ecx, [ebp - 0x34]
mov dword [esi + 8], eax
lea eax, [esi + 0xc]
push eax
push edx
call fcn.0041e657
mov edx, eax
lea ecx, [ebp - 0x58]
call fcn.0041e636
call eax
pop edi
mov eax, esi
pop esi
leave
ret