Function at 0x40a2e6
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1f0
cmp dword [0x435c3c], 0
push esi
mov esi, ecx
mov dword [ebp - 0x60], edx
push edi
mov dword [ebp - 0x2c], esi
jne 0x40a30c
call fcn.0040a28a
mov dword [0x435c3c], eax
cmp dword [0x435c30], 0
jne 0x40a324
mov edx, 0x4a6bed0c
call fcn.0040a1f2
mov dword [0x435c30], eax
cmp dword [0x435c40], 0
jne 0x40a33c
mov edx, 0xe1a00b78
call fcn.0040a1f2
mov dword [0x435c40], eax
cmp dword [0x435c38], 0
jne 0x40a4db
add dword [0x434238], 0x2c7e32f
lea edi, [ebp - 0x4c]
mov esi, 0x42c768
mov dword [ebp - 0x38], 0xc5ec97ae
mov dword [ebp - 0x34], 0x848aabf0
mov byte [ebp - 0x30], 0xdd
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor edi, edi
xor eax, eax
mov byte [ebp + eax - 0x160], al
inc eax
cmp eax, 0x100
jb 0x40a374
xor esi, esi
xor edx, edx
mov dword [ebp - 0x24], 0xb
mov eax, esi
mov cl, byte [ebp + esi - 0x160]
div dword [ebp - 0x24]
mov byte [ebp - 1], cl
movzx ecx, cl
movzx eax, byte [ebp + edx - 0x4c]
add eax, edi
add ecx, eax
movzx edi, cl
mov al, byte [ebp + edi - 0x160]
mov byte [ebp + esi - 0x160], al
inc esi
mov al, byte [ebp - 1]
mov byte [ebp + edi - 0x160], al
cmp esi, 0x100
jb 0x40a385
and dword [ebp - 0x5c], 0
xor esi, esi
and dword [ebp - 0x24], esi
lea eax, [esi + 1]
movzx eax, al
mov dword [ebp - 0x28], eax
call fcn.00409ae0
push 0xf
pop ecx
mov esi, 0x42e050
lea edi, [ebp - 0x19c]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
cmp byte [ebp - 0x19c], 0x63
mov dword [ebp - 0x20], eax
jne 0x40a425
mov cl, 0x63
test cl, cl
je 0x40a422
cmp byte [ebp + eax - 0x19c], 0
je 0x40a422
mov cl, byte [eax + 0x42e5a1]
inc eax
cmp cl, byte [ebp + eax - 0x19c]
je 0x40a404
mov dword [ebp - 0x20], eax
call fcn.004090f6
mov ecx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x3c]
cmp edi, ecx
jae 0x40a466
imul eax, dword [0x434290], 0x7467e6d9
mov esi, ecx
sub esi, edi
mov dword [ebp - 0x3c], ecx
mov dword [0x434238], eax
push ecx
push 0x42e5a0
mov edx, 0x42c0f0
mov ecx, 0x42e090
call fcn.004096ca
pop ecx
pop ecx
sub esi, 1
jne 0x40a44a
mov esi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x5c]
mov cl, byte [ebp + esi - 0x160]
movzx edx, cl
add eax, edx
movzx edi, al
mov dword [ebp - 0x5c], edi
mov al, byte [ebp + edi - 0x160]
mov byte [ebp + esi - 0x160], al
mov byte [ebp + edi - 0x160], cl
movzx eax, byte [ebp + esi - 0x160]
mov ecx, dword [ebp - 0x24]
add eax, edx
movzx eax, al
mov al, byte [ebp + eax - 0x160]
xor al, byte [ebp + ecx - 0x38]
mov byte [ebp + ecx - 0x4c], al
inc ecx
mov dword [ebp - 0x24], ecx
cmp ecx, 9
jb 0x40a3d6
lea eax, [ebp - 0x4c]
mov byte [ebp - 0x43], 0
push eax
push dword [0x435c3c]
call dword [0x435c30]
mov esi, dword [ebp - 0x2c]
mov dword [0x435c38], eax
cmp dword [0x435c34], 0
jne 0x40a4f3
mov edx, 0x4d6cd9e
call fcn.0040a1f2
mov dword [0x435c34], eax
cmp esi, 1
jne 0x40a672
mov esi, 0x42c218
mov dword [ebp - 0x1c], 0x7dd333a9
lea edi, [ebp - 0x54]
mov dword [ebp - 0x18], 0x7e5774d
mov dword [ebp - 0x14], 0x6119596e
mov dword [ebp - 0x10], 0xfce65e94
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0xc], 0x220ced7b
mov dword [ebp - 8], 0xd1cd3394
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov esi, dword [0x434238]
xor edi, edi
and esi, 0x81109526
xor eax, eax
mov dword [0x434290], esi
mov byte [ebp + eax - 0x160], al
inc eax
cmp eax, 0x100
jb 0x40a54b
push ecx
push 0x42e5a0
mov edx, str.onecoreinternal_sdkincwilopensourcewil_result_macros.h
mov ecx, 0x42e150
call fcn.004096ca
xor eax, eax
pop ecx
pop ecx
cmp byte [str.already_connected], al
je 0x40a5aa
inc eax
cmp byte [eax + str.already_connected], 0
jne 0x40a57b
cmp eax, 0x1c7d
jb 0x40a5aa
or esi, 0x6f139e0d
mov edx, 0x42e250
push ecx
mov ecx, 0x42e270
mov dword [0x434238], esi
call fcn.004091be
jmp 0x40a5be
push ecx
or esi, 0x6582d9a2
push ecx
mov dword [0x434238], esi
call fcn.004098c9
pop ecx
pop ecx
xor esi, esi
xor edx, edx
mov dword [ebp - 0x28], 0x12
mov eax, esi
mov cl, byte [ebp + esi - 0x160]
div dword [ebp - 0x28]
mov byte [ebp - 1], cl
movzx ecx, cl
movzx eax, byte [ebp + edx - 0x54]
add eax, edi
add ecx, eax
movzx edi, cl
mov al, byte [ebp + edi - 0x160]
mov byte [ebp + esi - 0x160], al
inc esi
mov al, byte [ebp - 1]
mov byte [ebp + edi - 0x160], al
cmp esi, 0x100
jb 0x40a5c1
and dword [ebp - 0x20], 0
xor edi, edi
xor esi, esi
lea eax, [edi + 1]
movzx edi, al
mov eax, dword [ebp - 0x20]
mov cl, byte [ebp + edi - 0x160]
movzx edx, cl
add eax, edx
movzx eax, al
mov dword [ebp - 0x20], eax
mov al, byte [ebp + eax - 0x160]
mov byte [ebp + edi - 0x160], al
mov eax, dword [ebp - 0x20]
mov byte [ebp + eax - 0x160], cl
movzx eax, byte [ebp + edi - 0x160]
add eax, edx
movzx eax, al
mov al, byte [ebp + eax - 0x160]
xor al, byte [ebp + esi - 0x1c]
mov byte [ebp + esi - 0x58], al
inc esi
cmp esi, 0x18
jb 0x40a611
mov byte [ebp - 0x40], 0
lea ecx, [ebp - 0x58]
jmp 0x40ab9a
cmp esi, 2
jne 0x40a7e4
imul eax, dword [0x434238], 0x9f196197
lea edi, [ebp - 0x180]
push 7
pop ecx
mov esi, 0x42ce6c
mov dword [ebp - 0x1c], 0x85407f79
rep movsd dword es:[edi], dword [esi]
mov dword [0x434238], eax
mov dword [ebp - 0x18], 0xa093acc5
mov dword [ebp - 0x14], 0x105f4b67
movsw word es:[edi], word [esi]
xor edi, edi
mov dword [ebp - 0x10], 0x14337bf0
mov dword [ebp - 0xc], 0xa598b3f2
xor eax, eax
mov dword [ebp - 8], 0x11c9e448
mov byte [ebp + eax - 0x160], al
inc eax
cmp eax, 0x100
jb 0x40a6ca
xor esi, esi
xor edx, edx
mov dword [ebp - 0x28], 0x1d
mov eax, esi
mov cl, byte [ebp + esi - 0x160]
div dword [ebp - 0x28]
mov byte [ebp - 1], cl
movzx ecx, cl
movzx eax, byte [ebp + edx - 0x180]
add eax, edi
add ecx, eax
movzx edi, cl
mov al, byte [ebp + edi - 0x160]
mov byte [ebp + esi - 0x160], al
inc esi
mov al, byte [ebp - 1]
mov byte [ebp + edi - 0x160], al
cmp esi, 0x100
jb 0x40a6db
and dword [ebp - 0x28], 0
lea edi, [ebp - 0x50]
mov esi, str.no_such_process
xor edx, edx
xor ecx, ecx
mov dword [ebp - 0x24], ecx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x28]
lea eax, [edx + 1]
movzx edx, al
mov dword [ebp - 0x28], edx
mov al, byte [ebp + edx - 0x160]
mov byte [ebp - 1], al
movzx eax, al
mov dword [ebp - 0x3c], eax
add eax, edi
movzx edi, al
mov al, byte [str.already_connected]
cmp al, byte [ebp - 0x50]
jne 0x40a78d
xor esi, esi
test al, al
je 0x40a787
cmp byte [ebp + esi - 0x50], 0
je 0x40a787
call fcn.00409d00
mov al, byte [esi + 0x4342c1]
inc esi
cmp al, byte [ebp + esi - 0x50]
je 0x40a76a
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
mov al, byte [ebp + edi - 0x160]
mov byte [ebp + edx - 0x160], al
mov al, byte [ebp - 1]
mov byte [ebp + edi - 0x160], al
movzx eax, byte [ebp + edx - 0x160]
add eax, dword [ebp - 0x3c]
movzx eax, al
mov al, byte [ebp + eax - 0x160]
xor al, byte [ebp + ecx - 0x1c]
mov byte [ebp + ecx - 0x1b8], al
inc ecx
mov dword [ebp - 0x24], ecx
cmp ecx, 0x18
jb 0x40a740
mov byte [ebp - 0x1a0], 0
lea ecx, [ebp - 0x1b8]
jmp 0x40ab9a
cmp esi, 5
jne 0x40a93e
push esi
and dword [ebp - 0x24], 0
lea edi, [ebp - 0x58]
pop ecx
mov esi, 0x42c140
mov dword [ebp - 0x1c], 0xbabc9aab
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x18], 0xe2196154
xor eax, eax
mov dword [ebp - 0x14], 0xf42b149
mov dword [ebp - 0x10], 0x77f59dad
mov dword [ebp - 0xc], 0xb3afc0f0
mov dword [ebp - 8], 0x8c5d7eb7
movsw word es:[edi], word [esi]
mov byte [ebp + eax - 0x160], al
inc eax
cmp eax, 0x100
jb 0x40a82b
push 0x15
xor esi, esi
pop edi
xor edx, edx
mov cl, byte [ebp + esi - 0x160]
mov eax, esi
mov byte [ebp - 1], cl
div edi
movzx ecx, cl
movzx eax, byte [ebp + edx - 0x58]
add eax, dword [ebp - 0x24]
add ecx, eax
movzx ecx, cl
mov dword [ebp - 0x24], ecx
mov al, byte [ebp + ecx - 0x160]
mov byte [ebp + esi - 0x160], al
inc esi
mov al, byte [ebp - 1]
mov byte [ebp + ecx - 0x160], al
cmp esi, 0x100
jb 0x40a83f
mov esi, 0x42d680
lea edi, [ebp - 0x4c]
xor eax, eax
mov dword [ebp - 0x24], eax
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, eax
mov edi, eax
lea eax, [esi + 1]
movzx esi, al
mov dword [ebp - 0x20], esi
mov cl, byte [ebp + esi - 0x160]
movzx edx, cl
lea eax, [edi + edx]
movzx edi, al
mov al, byte [ebp + edi - 0x160]
mov byte [ebp + esi - 0x160], al
mov byte [ebp + edi - 0x160], cl
movzx eax, byte [ebp + esi - 0x160]
add eax, edx
movzx eax, al
mov al, byte [ebp + eax - 0x160]
mov byte [ebp - 1], al
call fcn.00409d00
mov al, byte [str.already_connected]
cmp al, byte [ebp - 0x4c]
jne 0x40a90e
xor esi, esi
test al, al
je 0x40a90b
cmp byte [ebp + esi - 0x4c], 0
je 0x40a90b
call fcn.004094c0
mov al, byte [esi + 0x4342c1]
inc esi
cmp al, byte [ebp + esi - 0x4c]
je 0x40a8ee
mov esi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x24]
mov al, byte [ebp + ecx - 0x1c]
xor al, byte [ebp - 1]
mov byte [ebp + ecx - 0x1d4], al
inc ecx
mov dword [ebp - 0x24], ecx
cmp ecx, 0x18
jb 0x40a898
mov byte [ebp - 0x1bc], 0
lea ecx, [ebp - 0x1d4]
jmp 0x40ab9a
cmp esi, 6
jne 0x40aa50
push 5
and dword [ebp - 0x24], 0
lea edi, [ebp - 0x58]
pop ecx
mov esi, 0x42d740
mov dword [ebp - 0x1c], 0x2902645d
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x18], 0x13905070
xor eax, eax
mov dword [ebp - 0x14], 0x26ae6626
mov dword [ebp - 0x10], 0x954b1803
mov dword [ebp - 0xc], 0xdd6c20b4
mov dword [ebp - 8], 0xb2f74121
movsw word es:[edi], word [esi]
mov byte [ebp + eax - 0x160], al
inc eax
cmp eax, 0x100
jb 0x40a986
push 0x15
xor esi, esi
pop edi
xor edx, edx
mov cl, byte [ebp + esi - 0x160]
mov eax, esi
mov byte [ebp - 1], cl
div edi
movzx ecx, cl
movzx eax, byte [ebp + edx - 0x58]
add eax, dword [ebp - 0x24]
add ecx, eax
movzx ecx, cl
mov dword [ebp - 0x24], ecx
mov al, byte [ebp + ecx - 0x160]
mov byte [ebp + esi - 0x160], al
inc esi
mov al, byte [ebp - 1]
mov byte [ebp + ecx - 0x160], al
cmp esi, 0x100
jb 0x40a99a
and dword [ebp - 0x20], 0
xor edi, edi
xor esi, esi
lea eax, [edi + 1]
movzx edi, al
mov eax, dword [ebp - 0x20]
mov cl, byte [ebp + edi - 0x160]
movzx edx, cl
add eax, edx
movzx eax, al
mov dword [ebp - 0x20], eax
mov al, byte [ebp + eax - 0x160]
mov byte [ebp + edi - 0x160], al
mov eax, dword [ebp - 0x20]
mov byte [ebp + eax - 0x160], cl
movzx eax, byte [ebp + edi - 0x160]
add eax, edx
movzx eax, al
mov al, byte [ebp + eax - 0x160]
xor al, byte [ebp + esi - 0x1c]
mov byte [ebp + esi - 0x1f0], al
inc esi
cmp esi, 0x18
jb 0x40a9e6
mov byte [ebp - 0x1d8], 0
lea ecx, [ebp - 0x1f0]
jmp 0x40ab9a
cmp esi, 7
jne 0x40abfb
push ecx
mov edx, 0x42e2c0
mov dword [ebp - 0x1c], 0x858a9ed8
mov ecx, str.SrchCollatorProperties
mov dword [ebp - 0x18], 0x7f67f54a
mov dword [ebp - 0x14], 0x950564b5
mov dword [ebp - 0x10], 0x84a1986a
mov dword [ebp - 0xc], 0x2e59ed9c
mov dword [ebp - 8], 0x11dea8b2
call fcn.00409f3b
cmp byte [str.already_connected], 0
pop ecx
je 0x40aac0
mov edi, dword [0x434238]
mov esi, str.already_connected
lea eax, [edi - 0x36b359a9]
mov dword [0x434290], eax
mov ecx, edi
call fcn.0040938b
inc esi
cmp byte [esi], 0
jne 0x40aab3
push 5
pop ecx
mov esi, 0x42ccc4
lea edi, [ebp - 0x58]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
xor edi, edi
xor eax, eax
mov byte [ebp + eax - 0x160], al
inc eax
cmp eax, 0x100
jb 0x40aad4
xor esi, esi
xor edx, edx
mov dword [ebp - 0x28], 0x16
mov eax, esi
mov cl, byte [ebp + esi - 0x160]
div dword [ebp - 0x28]
mov byte [ebp - 1], cl
movzx ecx, cl
movzx eax, byte [ebp + edx - 0x58]
add eax, edi
add ecx, eax
movzx edi, cl
mov al, byte [ebp + edi - 0x160]
mov byte [ebp + esi - 0x160], al
inc esi
mov al, byte [ebp - 1]
mov byte [ebp + edi - 0x160], al
cmp esi, 0x100
jb 0x40aae5
and dword [ebp - 0x20], 0
xor edi, edi
xor esi, esi
lea eax, [edi + 1]
movzx edi, al
mov eax, dword [ebp - 0x20]
mov cl, byte [ebp + edi - 0x160]
movzx edx, cl
add eax, edx
movzx eax, al
mov dword [ebp - 0x20], eax
mov al, byte [ebp + eax - 0x160]
mov byte [ebp + edi - 0x160], al
mov eax, dword [ebp - 0x20]
mov byte [ebp + eax - 0x160], cl
movzx eax, byte [ebp + edi - 0x160]
add eax, edx
movzx eax, al
mov al, byte [ebp + eax - 0x160]
xor al, byte [ebp + esi - 0x1c]
mov byte [ebp + esi - 0x17c], al
inc esi
cmp esi, 0x18
jb 0x40ab35
mov byte [ebp - 0x164], 0
lea ecx, [ebp - 0x17c]
call fcn.0040b5df
mov edi, dword [ebp - 0x2c]
mov esi, eax
mov eax, dword [edi*4 + 0x435c88]
mov dword [ebp - 0x2c], eax
test eax, eax
jne 0x40abc3
push esi
call dword [0x435c40]
mov dword [ebp - 0x2c], eax
mov dword [edi*4 + 0x435c88], eax
mov ecx, esi
call fcn.0040a2d2
mov ecx, dword [ebp - 0x60]
call fcn.0040b5df
mov edi, eax
push edi
push dword [ebp - 0x2c]
call dword [0x435c30]
imul ecx, dword [0x434290], 0x3df5730f
mov esi, eax
mov dword [0x434290], ecx
mov ecx, edi
call fcn.0040a2d2
mov eax, esi
jmp 0x40abfd
xor eax, eax
pop edi
pop esi
leave
ret