Function at 0x1037f980
Capabilities:
Encrypt data using chaskey

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
mov esi, ecx
push 0x400
push 0
lea edi, [esi + 0x12a4]
push edi
call fcn.10425c00
add esp, 0xc
mov ecx, esi
call fcn.103da220
mov ecx, dword [esi + 0xccc]
mov dword [edi], eax
mov ax, word [esi + 0xce4]
shl ax, cl
mov di, word [esi + 0xce8]
dec ax
movzx edx, ax
mov word [esi + 0x12a8], ax
movzx eax, word [esi + 0x1b8]
mov word [esi + 0x12ac], ax
movzx eax, word [esi + 0x1bc]
mov word [esi + 0x12ae], ax
mov eax, dword [esi + 0x1cc]
mov dword [esi + 0x12b4], eax
mov eax, dword [esi + 0x1d4]
mov dword [esi + 0x12bc], eax
mov eax, dword [esi + 0x1d0]
mov dword [esi + 0x12b8], eax
mov eax, dword [esi + 0x1d8]
mov dword [esi + 0x12c0], eax
mov eax, dword [esi + 0x19c]
shl di, cl
add eax, 0x10
mov ecx, dword [esi + 0x12c4]
dec di
and ecx, 0xffffff80
mov word [esi + 0x12aa], di
or ecx, 0x80
mov dword [ebp - 8], edx
lea eax, [esi + eax*4]
mov dword [esi + 0x12c4], ecx
mov dword [ebp - 4], eax
mov eax, dword [eax]
mov eax, dword [eax]
cmp byte [eax + 0x1b4], 0
je 0x1037fa60
mov eax, dword [eax + 0x1b0]
jmp 0x1037fa66
mov eax, dword [eax + 0x74]
mov eax, dword [eax + 0x28]
movzx eax, ax
push ebx
xor ebx, ebx
cmp dword [esi + 0xcb4], 8
setne bl
xor edx, edx
inc ebx
or ecx, 2
div ebx
xor edx, edx
and ecx, 0xffffff7f
mov word [esi + 0x12ac], ax
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov eax, dword [eax]
mov eax, dword [eax + 0x74]
movzx eax, word [eax + 0x2c]
div ebx
mov edx, dword [ebp - 4]
mov word [esi + 0x12ae], ax
mov dword [esi + 0x12b4], 0
mov eax, dword [edx]
mov eax, dword [eax]
mov eax, dword [eax + 0x74]
mov eax, dword [eax + 0xf0]
shr eax, 8
mov dword [esi + 0x12b8], eax
mov eax, dword [edx]
mov eax, dword [eax]
mov eax, dword [eax + 0x74]
mov eax, dword [eax + 0xf8]
shr eax, 8
mov dword [esi + 0x12bc], eax
mov eax, dword [edx]
mov eax, dword [eax]
mov eax, dword [eax + 0x74]
mov eax, dword [eax + 0xfc]
shr eax, 8
cmp byte [esi + 0xced], 0
mov dword [esi + 0x12c0], eax
mov dword [esi + 0x12c4], ecx
movups xmm0, xmmword [esi + 0x12a8]
movups xmmword [esi + 0x12e8], xmm0
movups xmm0, xmmword [esi + 0x12b8]
movups xmmword [esi + 0x12f8], xmm0
je 0x1037fb44
movzx eax, word [esi + 0xca0]
mov edx, 0xfffe
inc ax
and ax, dx
dec ax
movzx ecx, ax
movzx eax, word [esi + 0xc9c]
inc ax
and ax, dx
dec ax
jmp 0x1037fb4a
mov eax, dword [ebp - 8]
movzx ecx, di
movzx eax, ax
mov word [esi + 0x12c8], ax
mov word [esi + 0x12ca], cx
mov edi, dword [esi + 0x1c]
mov eax, dword [edi]
cmp byte [eax + 0x1b4], 0
je 0x1037fb71
mov eax, dword [eax + 0x1b0]
jmp 0x1037fb77
mov eax, dword [eax + 0x74]
mov eax, dword [eax + 0x28]
movzx eax, ax
xor edx, edx
div ebx
mov word [esi + 0x12cc], ax
mov eax, dword [edi]
cmp byte [eax + 0x1b4], 0
je 0x1037fb98
mov eax, dword [eax + 0x1b0]
jmp 0x1037fb9e
mov eax, dword [eax + 0x74]
mov eax, dword [eax + 0x28]
movzx eax, ax
xor edx, edx
div ebx
mov ecx, dword [esi + 0x12e4]
mov word [esi + 0x12ce], ax
and ecx, 0xfffffcff
mov dword [esi + 0x12d4], 0
mov dword [esi + 0x12d8], 0
mov eax, dword [edi]
mov eax, dword [eax + 0x74]
mov eax, dword [eax + 0xf8]
shr eax, 8
mov dword [esi + 0x12dc], eax
mov dword [esi + 0x12e0], 0
mov dword [esi + 0x12e4], ecx
mov eax, dword [edi]
mov eax, dword [eax + 0x74]
cmp byte [eax + 0xbd], 0
je 0x1037fc0c
and ecx, 0xffffff82
or ecx, 2
and ecx, 0xffffff7f
jmp 0x1037fc29
and ecx, 0xffffff80
mov dword [esi + 0x12e4], ecx
mov eax, dword [edi]
mov eax, dword [eax + 0x74]
cmp byte [eax + 0xbc], 0
je 0x1037fc2f
or ecx, 0x80
mov dword [esi + 0x12e4], ecx
mov ecx, dword [esi + 0xcb0]
mov ebx, 0x1000000
xor ecx, dword [esi + 0x1308]
mov eax, dword [esi + 0xcbc]
and ecx, 3
xor ecx, dword [esi + 0x1308]
shl eax, 3
xor eax, ecx
and eax, 0x78
xor ecx, eax
mov eax, dword [esi + 0xcc4]
inc eax
shl eax, 7
xor eax, ecx
and eax, 0x180
xor ecx, eax
mov eax, dword [esi + 0xccc]
inc eax
shl eax, 9
xor eax, ecx
and eax, 0x600
xor ecx, eax
mov eax, dword [esi + 0xcf8]
sub eax, 2
shl eax, 0xb
xor eax, ecx
and eax, 0x1800
xor ecx, eax
mov eax, dword [esi + 0xcfc]
sub eax, 2
shl eax, 0xd
xor eax, ecx
and eax, 0x6000
xor ecx, eax
mov eax, dword [esi + 0xd00]
shl eax, 0x10
xor eax, ecx
and eax, 0x30000
xor ecx, eax
mov eax, dword [esi + 0xd04]
shl eax, 0x12
xor eax, ecx
and eax, 0xc0000
xor ecx, eax
xor eax, eax
cmp byte [esi + 0xd0c], al
cmovne eax, ebx
and ecx, 0xfeffffff
or eax, ecx
mov ecx, dword [esi + 0xcb4]
and eax, 0x1ffffff
sub ecx, 8
or eax, 0x2000000
and ecx, 0xf
mov dword [esi + 0x1308], eax
mov eax, dword [esi + 0x130c]
and eax, 0xfffffe00
shl ecx, 5
or ecx, eax
mov eax, dword [esi + 0xca4]
mov dword [esi + 0x130c], ecx
test eax, eax
jns 0x1037fd20
xor eax, eax
jmp 0x1037fd2a
mov ecx, 0x3f
cmp eax, ecx
cmovg eax, ecx
mov byte [esi + 0x1310], al
xor edx, edx
mov ecx, dword [esi + 0x1310]
mov eax, dword [esi + 0x1200]
and ecx, 0xfffc00ff
shl eax, 0x17
xor eax, ecx
and eax, 0x800000
xor ecx, eax
cmp byte [esi + 0x123c], dl
movzx eax, byte [esi + 0xd14]
cmovne edx, ebx
shl eax, 0x1a
and ecx, 0xfeffffff
or edx, ecx
movzx ecx, byte [esi + 0x1224]
and edx, 0xfdffffff
and ecx, 1
xor eax, edx
and eax, 0x4000000
xor edx, eax
mov eax, dword [esi + 0x11ec]
shl eax, 0x1b
xor eax, edx
and eax, 0x8000000
xor eax, edx
mov dword [esi + 0x1310], eax
mov eax, dword [esi + 0xd10]
and eax, 1
add eax, eax
or ecx, eax
mov eax, dword [esi + 0x11f4]
and eax, 0x1f
shl ecx, 5
or ecx, eax
mov eax, dword [esi + 0x11f0]
and eax, 0x1f
shl ecx, 5
or ecx, eax
mov eax, dword [esi + 0xd08]
shl eax, 0x14
sub eax, 0x100001
shl ecx, 6
and eax, 0x700000
or ecx, eax
mov eax, dword [esi + 0x1314]
and eax, 0xff800000
or ecx, eax
lea eax, [esi + 0x1318]
mov dword [esi + 0x1314], ecx
lea ecx, [esi + 0x1244]
test eax, eax
je 0x1037fe41
test ecx, ecx
je 0x1037fe34
movups xmm0, xmmword [ecx]
movups xmmword [eax], xmm0
movups xmm0, xmmword [ecx + 0x10]
movups xmmword [eax + 0x10], xmm0
movups xmm0, xmmword [ecx + 0x20]
movups xmmword [eax + 0x20], xmm0
movups xmm0, xmmword [ecx + 0x30]
movups xmmword [eax + 0x30], xmm0
movups xmm0, xmmword [ecx + 0x40]
movups xmmword [eax + 0x40], xmm0
movups xmm0, xmmword [ecx + 0x50]
movups xmmword [eax + 0x50], xmm0
jmp 0x1037fe51
push 0x60
push 0
push eax
call fcn.10425c00
add esp, 0xc
call fcn.1043a2d6
mov dword [eax], 0x16
call fcn.1043a1d8
mov dl, byte [esi + 0x1214]
test dl, dl
je 0x1037fe63
mov eax, dword [esi + 0x1218]
jmp 0x1037fe65
xor eax, eax
mov dword [esi + 0x1420], eax
xor edi, edi
movzx eax, word [esi + 0x310]
mov word [esi + 0x142a], ax
movzx eax, byte [esi + 0x1210]
dec al
mov ecx, dword [esi + 0x2f8]
xor ecx, dword [esi + 0x1428]
mov byte [esi + 0x142c], al
and ecx, 1
xor ecx, dword [esi + 0x1428]
movzx eax, byte [esi + 0x1220]
dec al
mov byte [esi + 0x142f], 0
mov byte [esi + 0x142d], al
movzx eax, byte [esi + 0x121c]
dec al
mov byte [esi + 0x1558], 0
mov byte [esi + 0x142e], al
mov eax, dword [esi + 0x308]
add eax, eax
xor eax, ecx
and eax, 2
xor eax, ecx
mov ecx, dword [esi + 0x144c]
mov dword [esi + 0x1428], eax
and ecx, 0xfffffffc
mov eax, dword [esi + 0x180]
mov dword [esi + 0x1430], eax
mov eax, dword [esi + 0x178]
mov dword [esi + 0x1438], eax
mov eax, dword [esi + 0x174]
mov dword [esi + 0x1434], eax
mov eax, dword [esi + 0x17c]
mov dword [esi + 0x143c], eax
mov eax, dword [esi + 0x184]
mov dword [esi + 0x1554], eax
mov eax, dword [esi + 0x2c]
mov eax, dword [eax + 0x74]
mov eax, dword [eax + 0x24]
mov dword [esi + 0x1440], eax
mov eax, dword [esi + 0x24]
mov eax, dword [eax + 0x74]
mov eax, dword [eax + 0x24]
mov dword [esi + 0x1444], eax
mov eax, dword [esi + 0x7b64]
mov dword [esi + 0x1448], eax
mov eax, dword [ebp + 8]
and eax, 3
or ecx, eax
mov dword [ebp + 8], eax
mov eax, dword [ebp + 0xc]
and ecx, 0xfffffffb
and eax, 1
shl eax, 2
or ecx, eax
mov dword [ebp - 0xc], eax
test dl, dl
mov eax, 8
cmovne edi, eax
movzx eax, word [esi + 0x1238]
mov word [esi + 0x156c], ax
and ecx, 0xfffffff7
mov eax, dword [esi + 0xd20]
or edi, ecx
mov ecx, dword [esi + 0xd24]
and edi, 0xffffffef
shl eax, 0xe
and ecx, 0x1f
xor eax, edi
shl ecx, 0x13
and eax, 0x7c000
xor edi, eax
mov eax, dword [esi + 0x9570]
and edi, 0xff07ffbf
mov dword [esi + 0x1450], eax
mov ebx, dword [esi + 0x314]
or ecx, edi
mov edx, dword [esi + 0x5c0]
or ecx, 0xa0
mov dword [esi + 0x144c], ecx
mov edi, dword [esi + 0xcf4]
xor ecx, ecx
mov eax, dword [esi + 0xcf0]
and edi, 3
and eax, 3
shl edi, 2
or edi, eax
and edx, 0x3f
mov eax, dword [esi + 0x2f0]
and eax, 7
shl edi, 5
or edi, eax
mov eax, dword [esi + 0x2e8]
and eax, 0x3f
shl edi, 0xc
or edi, eax
mov eax, 0x800000
shl edi, 7
or edi, edx
mov edx, 0x1000000
add edi, edi
cmp byte [esi + 0x9574], cl
cmovne ecx, eax
mov eax, dword [esi + 0x1460]
and eax, 0xff0fc080
and ebx, 1
or ecx, ebx
or ecx, eax
xor eax, eax
and ecx, 0xfeffffff
cmp byte [esi + 0xced], al
pop ebx
cmovne eax, edx
lea edx, [esi + 0x36c]
or ecx, eax
and ecx, 0xe1ffffff
or edi, ecx
mov dword [esi + 0x1460], edi
lea edi, [esi + 0x1492]
movzx eax, word [esi + 0x3b0]
mov word [esi + 0x146c], ax
movzx eax, word [esi + 0x3b4]
mov word [esi + 0x146e], ax
mov ecx, dword [esi + 0x320]
mov eax, dword [esi + 0x31c]
neg ecx
sbb ecx, ecx
and eax, 0x3f
add eax, eax
and ecx, 0x80
or ecx, eax
xor eax, eax
and ecx, 0xff0000ff
cmp dword [esi + 0x318], eax
setne al
and eax, 0xff000001
or ecx, eax
movzx eax, word [esi + 0x324]
shl eax, 8
or ecx, eax
mov eax, dword [esi + 0x1464]
and eax, 0xff000000
or ecx, eax
mov dword [esi + 0x1464], ecx
xor ecx, ecx
nop dword [eax]
movzx eax, word [edx - 0x44]
lea edi, [edi + 2]
and ax, 1
lea edx, [edx + 4]
shl ax, cl
or word [esi + 0x1468], ax
movzx eax, word [edx - 4]
and ax, 1
shl ax, cl
or word [esi + 0x146a], ax
movzx eax, word [edx + 0x48]
mov word [edi - 0x24], ax
movzx eax, word [edx + 0xc8]
mov word [edi - 2], ax
movzx eax, word [edx + 0x88]
and ax, 1
shl ax, cl
or word [esi + 0x1490], ax
movzx eax, word [edx + 0x108]
and ax, 1
shl ax, cl
inc ecx
or word [esi + 0x14b2], ax
cmp ecx, 0x10
jl 0x103800e0
mov edx, dword [esi + 0x5c8]
mov ecx, edx
mov eax, dword [esi + 0x14b4]
and ecx, 0x1f
mov edi, dword [esi + 0x5c4]
and eax, 0xfffffc00
shl ecx, 5
or ecx, eax
mov eax, edi
and eax, 0x1f
or ecx, eax
lea eax, [edx + edi]
mov dword [esi + 0x14b4], ecx
xor ecx, ecx
test eax, eax
jle 0x103801e9
lea edi, [esi + 0x14c8]
lea edx, [esi + 0x608]
mov al, byte [edx - 0x3c]
lea edi, [edi + 2]
mov byte [esi + ecx + 0x14b8], al
lea edx, [edx + 4]
movzx eax, word [edx - 4]
mov word [edi - 2], ax
movzx eax, word [edx + 0x38]
and ax, 1
shl ax, cl
or word [esi + 0x14e8], ax
movzx eax, word [edx + 0x74]
and ax, 1
shl ax, cl
inc ecx
or word [esi + 0x14ea], ax
mov eax, dword [edx + 0xb0]
mov dword [edx + 0xee0], eax
mov eax, dword [esi + 0x5c8]
add eax, dword [esi + 0x5c4]
cmp ecx, eax
jl 0x10380190
mov ax, word [esi + 0x7ac0]
mov edx, 0xff
movzx ecx, byte [esi + 0x7ac2]
and ax, dx
mov edx, dword [esi + 0xce4]
imul edx, dword [esi + 0xce8]
shl cx, 8
or cx, ax
mov word [esi + 0x156e], cx
xor ecx, ecx
cmp edx, 1
jle 0x1038022d
mov eax, 1
rol eax, 1
inc ecx
cmp eax, edx
jl 0x10380226
shl ecx, 8
lea edx, [esi + 0x798]
xor ecx, dword [esi + 0x144c]
mov edi, 0x10
and ecx, 0x3f00
xor dword [esi + 0x144c], ecx
mov ecx, dword [esi + 0x794]
mov eax, dword [esi + 0x710]
and ecx, 1
and eax, 1
add ecx, ecx
or ecx, eax
mov eax, dword [esi + 0x7884]
add eax, dword [esi + 0x787c]
add eax, dword [esi + 0x7878]
and eax, 0x1f
shl ecx, 5
or ecx, eax
mov eax, dword [esi + 0x152c]
and eax, 0xffffff80
or ecx, eax
mov dword [esi + 0x152c], ecx
lea ecx, [esi + 0x1540]
nop dword [eax]
nop dword [eax + eax]
movzx eax, byte [edx - 0x84]
lea edx, [edx + 4]
mov byte [ecx - 0x10], al
lea ecx, [ecx + 1]
movzx eax, byte [edx - 4]
mov byte [ecx - 1], al
sub edi, 1
jne 0x103802a0
mov byte [esi + 0x155a], 1
mov ecx, dword [esi + 0x144c]
mov eax, dword [esi + 0x1428]
and ecx, 0xfffffff7
and dword [esi + 0x1308], 0xff0ffffb
and ecx, 0xfffffffc
or ecx, dword [ebp + 8]
or eax, 4
and dword [esi + 0x130c], 0xfffffdff
or eax, 1
and dword [esi + 0x1310], 0xcf8000ff
and ecx, 0xfffffffb
or ecx, dword [ebp - 0xc]
and eax, 0xfffffffd
mov dword [esi + 0x1420], edi
and ecx, 0xffffffef
mov dword [esi + 0x1428], eax
mov dword [esi + 0x144c], ecx
mov eax, dword [esi + 4]
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x1c]
test dword [eax + 0x44], 0x8000000
jne 0x1038033e
test dword [eax + 0x4c], 0x100
jne 0x1038033e
test dword [eax + 0x48], 0x800000
je 0x1038034a
mov eax, 8
mov word [esi + 0x156c], ax
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 8