Function at 0x10c3fd0
Capabilities:
Encrypt data using chaskey

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov esi, dword [ebp + 8]
push edi
push esi
call fcn.01047a40
push esi
call fcn.010c3a80
push esi
call fcn.010c3bd0
push esi
call fcn.010c3d20
push esi
call fcn.010c3e70
mov eax, dword [esi]
push 0
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 8]
push edx
push 0x10172a8
push 0x1015c28
push connect
push eax
call fcn.010bb210
mov edi, eax
test edi, edi
je 0x10c405c
cmp word [edi], 0
je 0x10c4039
jmp 0x10c4030
add eax, 2
cmp word [eax], 0
jne 0x10c4030
sub eax, edi
sar eax, 1
push eax
push edi
call fcn.0102d0b0
mov ecx, dword [esi]
push edi
push 0
mov dword [ecx + 0x1df28], eax
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapFree]
mov eax, dword [esi]
xor edi, edi
push edi
lea edx, [ebp + 8]
push edx
lea ecx, [ebp - 8]
push ecx
push 0x101728c
push 0x1015c28
push connect
push eax
call fcn.010bb210
test eax, eax
je 0x10c4094
mov edi, dword [eax]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapFree]
mov edx, dword [esi]
push ebx
push 0
mov dword [edx + 0x1df24], edi
mov eax, dword [esi]
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 8]
push edx
push 0x1017268
push 0x101723c
push connect
push eax
call fcn.010bb210
push 0
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 8]
push edx
push 0x1017218
push 0x101723c
mov edi, eax
mov eax, dword [esi]
push connect
push eax
call fcn.010bb210
push 0
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 8]
push edx
push 0x10171f0
push 0x101723c
mov ebx, eax
mov eax, dword [esi]
push connect
push eax
call fcn.010bb210
push 0
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 4]
push edx
push 0x10171d0
push 0x101723c
mov dword [ebp + 8], eax
mov eax, dword [esi]
push connect
push eax
call fcn.010bb210
push 0
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 0xc]
push edx
push 0x10171b0
push 0x101723c
mov dword [ebp - 4], eax
mov eax, dword [esi]
push connect
push eax
call fcn.010bb210
mov ecx, dword [ebp + 8]
mov edx, dword [esi]
push eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
push eax
push ecx
push ebx
push edi
push edx
call fcn.010669e0
test edi, edi
je 0x10c417a
push edi
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov edi, dword [sym.imp.KERNEL32.DLL_HeapFree]
push eax
call edi
jmp 0x10c4180
mov edi, dword [sym.imp.KERNEL32.DLL_HeapFree]
test ebx, ebx
je 0x10c4194
push ebx
mov ebx, dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push 0
call ebx
push eax
call edi
jmp 0x10c419a
mov ebx, dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov eax, dword [ebp + 8]
test eax, eax
je 0x10c41a9
push eax
push 0
call ebx
push eax
call edi
mov eax, dword [ebp - 4]
test eax, eax
je 0x10c41b8
push eax
push 0
call ebx
push eax
call edi
mov eax, dword [ebp - 8]
test eax, eax
je 0x10c41c7
push eax
push 0
call ebx
push eax
call edi
mov eax, dword [esi]
push 0
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 0xc]
push edx
push 0x1015c58
push 0x1015c28
push connect
push eax
call fcn.010bb210
mov edi, eax
test edi, edi
je 0x10c429c
cmp byte [edi], 0
je 0x10c4288
mov eax, dword [esi]
push 0
push 0
push 0
push 0
push 0
push edi
push 0
push eax
call fcn.01064580
push 0x105
lea ebx, [esi + 0xa80]
push 0
push ebx
call sub.msvcrt.dll_memset
push edi
push 0x1015d54
push 0x103
push ebx
call fcn.0102c510
mov ecx, dword [esi]
mov ebx, dword [sym.imp.KERNEL32.DLL_InterlockedExchange]
add esp, 0x1c
push 1
add ecx, 0x1df20
push ecx
mov dword [esi + 0x10a0], 1
mov dword [esi + 0x10a4], 0
call ebx
mov edx, dword [esi]
push 0x1017194
push 0x1015c28
push connect
push edx
call fcn.010bb470
mov edx, dword [esi]
xor ecx, ecx
test eax, eax
setne cl
add edx, 0x1df1c
push ecx
push edx
call ebx
push edi
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov ebx, dword [sym.imp.KERNEL32.DLL_HeapFree]
push eax
call ebx
jmp 0x10c42a2
mov ebx, dword [sym.imp.KERNEL32.DLL_HeapFree]
mov eax, dword [esi]
push 0x1017180
push 0x1017168
push connect
push eax
call fcn.010bb5e0
mov ecx, dword [esi]
mov edx, dword [ecx + 0x1d1ac]
xor edx, eax
push 0x1017150
and edx, 1
xor dword [ecx + 0x1d1ac], edx
mov eax, dword [esi]
push 0x1017168
push connect
push eax
call fcn.010bb5e0
mov ecx, dword [esi]
lea edx, [eax + eax]
xor edx, dword [ecx + 0x1d1ac]
push 0x101713c
and edx, 2
xor dword [ecx + 0x1d1ac], edx
mov eax, dword [esi]
push 0x1017168
push connect
push eax
call fcn.010bb5e0
mov ecx, dword [esi]
lea edx, [eax*4]
xor edx, dword [ecx + 0x1d1ac]
push 0x101712c
and edx, 4
xor dword [ecx + 0x1d1ac], edx
mov eax, dword [esi]
push 0x1017168
push connect
push eax
call fcn.010bb5e0
mov ecx, dword [esi]
lea edx, [eax*8]
xor edx, dword [ecx + 0x1d1ac]
push 0x1017114
and edx, 8
xor dword [ecx + 0x1d1ac], edx
mov eax, dword [esi]
push 0x1017168
push connect
push eax
call fcn.010bb5e0
mov ecx, dword [esi]
shl eax, 4
xor eax, dword [ecx + 0x1d1ac]
push 0x1017108
and eax, 0x10
xor dword [ecx + 0x1d1ac], eax
mov ecx, dword [esi]
push 0x1017168
push connect
push ecx
call fcn.010bb5e0
mov ecx, dword [esi]
shl eax, 5
xor eax, dword [ecx + 0x1d1ac]
push 0x10170f4
and eax, 0x20
xor dword [ecx + 0x1d1ac], eax
mov edx, dword [esi]
push 0x1017168
push connect
push edx
call fcn.010bb5e0
mov ecx, dword [esi]
shl eax, 6
xor eax, dword [ecx + 0x1d1ac]
push 0x10170e8
and eax, 0x40
xor dword [ecx + 0x1d1ac], eax
mov eax, dword [esi]
push 0x1017168
push connect
push eax
call fcn.010bb5e0
mov ecx, dword [esi]
shl eax, 7
xor eax, dword [ecx + 0x1d1ac]
push 0x10170d4
and eax, 0x80
xor dword [ecx + 0x1d1ac], eax
mov ecx, dword [esi]
push 0x1017168
push connect
push ecx
call fcn.010bb5e0
mov ecx, dword [esi]
shl eax, 8
xor eax, dword [ecx + 0x1d1ac]
push 0x10170c8
and eax, 0x100
xor dword [ecx + 0x1d1ac], eax
mov edx, dword [esi]
push 0x1017168
push connect
push edx
call fcn.010bb5e0
mov ecx, dword [esi]
shl eax, 9
xor eax, dword [ecx + 0x1d1ac]
push 0x10170b4
and eax, 0x200
xor dword [ecx + 0x1d1ac], eax
mov eax, dword [esi]
push 0x1017168
push connect
push eax
call fcn.010bb5e0
mov ecx, dword [esi]
shl eax, 0xa
xor eax, dword [ecx + 0x1d1ac]
push 0x101709c
and eax, 0x400
xor dword [ecx + 0x1d1ac], eax
mov ecx, dword [esi]
push 0x1017168
push connect
push ecx
call fcn.010bb5e0
mov ecx, dword [esi]
shl eax, 0xb
xor eax, dword [ecx + 0x1d1ac]
push 0x1017088
and eax, 0x800
xor dword [ecx + 0x1d1ac], eax
mov edx, dword [esi]
push 0x1017168
push connect
push edx
call fcn.010bb5e0
mov ecx, dword [esi]
shl eax, 0xc
xor eax, dword [ecx + 0x1d1ac]
xor edi, edi
push edi
and eax, 0x1000
xor dword [ecx + 0x1d1ac], eax
mov eax, dword [esi]
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 0xc]
push edx
push 0x1017058
push 0x1015c28
push connect
push eax
call fcn.010bb210
test eax, eax
je 0x10c4518
mov edi, dword [eax]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call ebx
mov eax, dword [esi]
mov dword [eax + 0x1d2d0], edi
mov eax, dword [esi]
xor edi, edi
push edi
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 0xc]
push edx
push 0x1017030
push 0x1015c28
push connect
push eax
call fcn.010bb210
test eax, eax
je 0x10c4554
mov edi, dword [eax]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call ebx
mov eax, dword [esi]
shl edi, 0xd
xor edi, dword [eax + 0x1d1ac]
lea ecx, [ebp + 8]
and edi, 0x2000
xor dword [eax + 0x1d1ac], edi
mov eax, dword [esi]
xor edi, edi
push edi
push ecx
lea edx, [ebp - 0xc]
push edx
push 0x1017004
push 0x1015c28
push connect
push eax
call fcn.010bb210
test eax, eax
je 0x10c459f
mov edi, dword [eax]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call ebx
mov eax, dword [esi]
shl edi, 0xe
xor edi, dword [eax + 0x1d1ac]
lea ecx, [ebp + 8]
and edi, 0x4000
xor dword [eax + 0x1d1ac], edi
mov eax, dword [esi]
xor edi, edi
push edi
push ecx
lea edx, [ebp - 0xc]
push edx
push 0x1016fec
push 0x1015c28
push connect
push eax
call fcn.010bb210
test eax, eax
je 0x10c45ea
mov edi, dword [eax]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call ebx
mov eax, dword [esi]
shl edi, 0xf
xor edi, dword [eax + 0x1d1ac]
pop ebx
and edi, 0x8000
xor dword [eax + 0x1d1ac], edi
mov eax, dword [esi]
cmp dword [eax + 0x1d1ac], 0
jne 0x10c466b
or dword [eax + 0x1d1ac], 1
mov eax, dword [esi]
or dword [eax + 0x1d1ac], 2
mov eax, dword [esi]
or dword [eax + 0x1d1ac], 4
mov eax, dword [esi]
or dword [eax + 0x1d1ac], 0x40
mov eax, dword [esi]
or dword [eax + 0x1d1ac], 0x100
mov eax, dword [esi]
or dword [eax + 0x1d1ac], 0x400
mov eax, dword [esi]
or dword [eax + 0x1d1ac], 0x800
mov eax, dword [esi]
or dword [eax + 0x1d1ac], 0x1000
mov esi, dword [esi]
and dword [esi + 0x1d1ac], 0xffff7fff
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4