Function at 0x140012c10
Capabilities:
Encrypt data using aes
Reference aes constants
Resolve function by parsing pe exports

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0xb8
cmp qword [rsp + 0xd8], 0
jne 0x140012c3d
jmp 0x1400136ae
cmp dword [rsp + 0xe8], 0x10
je 0x140012c60
cmp dword [rsp + 0xe8], 0x18
je 0x140012c60
cmp dword [rsp + 0xe8], 0x20
je 0x140012c60
jmp 0x1400136ae
cmp dword [rsp + 0xf0], 0x10
je 0x140012c83
cmp dword [rsp + 0xf0], 0x18
je 0x140012c83
cmp dword [rsp + 0xf0], 0x20
je 0x140012c83
jmp 0x1400136ae
mov rax, qword [rsp + 0xd0]
mov ecx, dword [rsp + 0xe8]
mov dword [rax + 0x3cc], ecx
mov rax, qword [rsp + 0xd0]
mov ecx, dword [rsp + 0xf0]
mov dword [rax + 0x3d0], ecx
mov rax, qword [rsp + 0xd0]
movsxd rax, dword [rax + 0x3d0]
mov rcx, qword [rsp + 0xd0]
add rcx, 0x3d8
mov rdi, rcx
mov rsi, qword [rsp + 0xe0]
mov rcx, rax
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0xd0]
movsxd rax, dword [rax + 0x3d0]
mov rcx, qword [rsp + 0xd0]
add rcx, 0x3f8
mov rdi, rcx
mov rsi, qword [rsp + 0xe0]
mov rcx, rax
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0xd0]
mov eax, dword [rax + 0x3cc]
mov dword [rsp + 0x38], eax
cmp dword [rsp + 0x38], 0x10
je 0x140012d2e
cmp dword [rsp + 0x38], 0x18
je 0x140012d88
jmp 0x140012dbf
mov rax, qword [rsp + 0xd0]
cmp dword [rax + 0x3d0], 0x10
jne 0x140012d49
mov dword [rsp + 0x40], 0xa
jmp 0x140012d74
mov rax, qword [rsp + 0xd0]
cmp dword [rax + 0x3d0], 0x18
jne 0x140012d64
mov dword [rsp + 0x3c], recv
jmp 0x140012d6c
mov dword [rsp + 0x3c], recv
mov eax, dword [rsp + 0x3c]
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0xd0]
mov ecx, dword [rsp + 0x40]
mov dword [rax + 0x3d4], ecx
jmp 0x140012dd1
mov rax, qword [rsp + 0xd0]
cmp dword [rax + 0x3d0], 0x20
je 0x140012da3
mov dword [rsp + 0x44], recv
jmp 0x140012dab
mov dword [rsp + 0x44], recv
mov rax, qword [rsp + 0xd0]
mov ecx, dword [rsp + 0x44]
mov dword [rax + 0x3d4], ecx
jmp 0x140012dd1
mov rax, qword [rsp + 0xd0]
mov dword [rax + 0x3d4], recv
mov rax, qword [rsp + 0xd0]
mov eax, dword [rax + 0x3d0]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [rsp + 0x14], eax
mov dword [rsp + 4], 0
jmp 0x140012e00
mov eax, dword [rsp + 4]
inc eax
mov dword [rsp + 4], eax
mov rax, qword [rsp + 0xd0]
mov eax, dword [rax + 0x3d4]
cmp dword [rsp + 4], eax
jg 0x140012e53
mov dword [rsp], 0
jmp 0x140012e25
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
mov eax, dword [rsp + 0x14]
cmp dword [rsp], eax
jge 0x140012e51
movsxd rax, dword [rsp + 4]
imul rax, rax, 0x20
mov rcx, qword [rsp + 0xd0]
lea rax, [rcx + rax + 0xc]
movsxd rcx, dword [rsp]
mov dword [rax + rcx*4], 0
jmp 0x140012e1d
jmp 0x140012df6
mov dword [rsp + 4], 0
jmp 0x140012e67
mov eax, dword [rsp + 4]
inc eax
mov dword [rsp + 4], eax
mov rax, qword [rsp + 0xd0]
mov eax, dword [rax + 0x3d4]
cmp dword [rsp + 4], eax
jg 0x140012ebd
mov dword [rsp], 0
jmp 0x140012e8c
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
mov eax, dword [rsp + 0x14]
cmp dword [rsp], eax
jge 0x140012ebb
movsxd rax, dword [rsp + 4]
imul rax, rax, 0x20
mov rcx, qword [rsp + 0xd0]
lea rax, [rcx + rax + 0x1ec]
movsxd rcx, dword [rsp]
mov dword [rax + rcx*4], 0
jmp 0x140012e84
jmp 0x140012e5d
mov rax, qword [rsp + 0xd0]
mov eax, dword [rax + 0x3d4]
inc eax
imul eax, dword [rsp + 0x14]
mov dword [rsp + 0x34], eax
mov rax, qword [rsp + 0xd0]
mov eax, dword [rax + 0x3cc]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [rsp + 0x10], eax
mov rax, qword [rsp + 0xd0]
add rax, 0x418
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0xd8]
mov qword [rsp + 0x18], rax
mov dword [rsp + 4], 0
jmp 0x140012f25
mov eax, dword [rsp + 4]
inc eax
mov dword [rsp + 4], eax
mov eax, dword [rsp + 0x10]
cmp dword [rsp + 4], eax
jge 0x140012ffe
mov rax, qword [rsp + 0x18]
movzx eax, byte [rax]
mov dword [rsp + 0x68], eax
mov rax, qword [rsp + 0x18]
inc rax
mov qword [rsp + 0x18], rax
mov eax, dword [rsp + 0x68]
shl eax, 0x18
mov rcx, qword [rsp + 0x28]
mov dword [rcx], eax
mov rax, qword [rsp + 0x18]
movzx eax, byte [rax]
mov dword [rsp + 0x6c], eax
mov rax, qword [rsp + 0x18]
inc rax
mov qword [rsp + 0x18], rax
mov eax, dword [rsp + 0x6c]
shl eax, 0x10
mov rcx, qword [rsp + 0x28]
mov ecx, dword [rcx]
or ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x28]
mov dword [rcx], eax
mov rax, qword [rsp + 0x18]
movzx eax, byte [rax]
mov dword [rsp + 0x48], eax
mov rax, qword [rsp + 0x18]
inc rax
mov qword [rsp + 0x18], rax
mov eax, dword [rsp + 0x48]
shl eax, 8
mov rcx, qword [rsp + 0x28]
mov ecx, dword [rcx]
or ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x28]
mov dword [rcx], eax
mov rax, qword [rsp + 0x18]
movzx eax, byte [rax]
mov dword [rsp + 0x4c], eax
mov rax, qword [rsp + 0x18]
inc rax
mov qword [rsp + 0x18], rax
mov rax, qword [rsp + 0x28]
mov ecx, dword [rsp + 0x4c]
mov eax, dword [rax]
or eax, ecx
mov rcx, qword [rsp + 0x28]
mov dword [rcx], eax
mov rax, qword [rsp + 0x28]
add rax, 4
mov qword [rsp + 0x28], rax
jmp 0x140012f1b
mov dword [rsp + 8], 0
mov dword [rsp], 0
jmp 0x140013021
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
mov eax, dword [rsp + 8]
inc eax
mov dword [rsp + 8], eax
mov eax, dword [rsp + 0x10]
cmp dword [rsp], eax
jge 0x140013108
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 8], eax
jge 0x140013108
movsxd rax, dword [rsp]
mov qword [rsp + 0x70], rax
mov eax, dword [rsp + 8]
cdq
idiv dword [rsp + 0x14]
cdqe
imul rax, rax, 0x20
mov rcx, qword [rsp + 0xd0]
lea rax, [rcx + rax + 0xc]
mov qword [rsp + 0x78], rax
mov eax, dword [rsp + 8]
cdq
idiv dword [rsp + 0x14]
mov eax, edx
cdqe
mov rcx, qword [rsp + 0xd0]
mov rdx, qword [rsp + 0x70]
mov ecx, dword [rcx + rdx*4 + 0x418]
mov rdx, qword [rsp + 0x78]
mov dword [rdx + rax*4], ecx
movsxd rax, dword [rsp]
mov qword [rsp + 0x80], rax
mov eax, dword [rsp + 8]
cdq
idiv dword [rsp + 0x14]
mov rcx, qword [rsp + 0xd0]
mov ecx, dword [rcx + 0x3d4]
sub ecx, eax
mov eax, ecx
cdqe
imul rax, rax, 0x20
mov rcx, qword [rsp + 0xd0]
lea rax, [rcx + rax + 0x1ec]
mov qword [rsp + 0x88], rax
mov eax, dword [rsp + 8]
cdq
idiv dword [rsp + 0x14]
mov eax, edx
cdqe
mov rcx, qword [rsp + 0xd0]
mov rdx, qword [rsp + 0x80]
mov ecx, dword [rcx + rdx*4 + 0x418]
mov rdx, qword [rsp + 0x88]
mov dword [rdx + rax*4], ecx
jmp 0x14001300f
mov dword [rsp + 0x30], 0
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 8], eax
jge 0x1400135a5
mov eax, dword [rsp + 0x10]
dec eax
cdqe
mov rcx, qword [rsp + 0xd0]
mov eax, dword [rcx + rax*4 + 0x418]
mov dword [rsp + 0xc], eax
movsxd rax, dword [rsp + 0x30]
lea rcx, [0x1400f2070]
movsx eax, byte [rcx + rax]
and eax, 0xff
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x30]
inc eax
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x50]
shl eax, 0x18
mov ecx, dword [rsp + 0xc]
sar ecx, 0x18
and ecx, 0xff
movsxd rcx, ecx
lea rdx, [0x1400f0b10]
movsx ecx, byte [rdx + rcx]
and ecx, 0xff
mov edx, dword [rsp + 0xc]
and edx, 0xff
movsxd rdx, edx
lea rdi, [0x1400f0b10]
movsx edx, byte [rdi + rdx]
and edx, 0xff
shl edx, 8
mov edi, dword [rsp + 0xc]
sar edi, 8
and edi, 0xff
movsxd rdi, edi
lea rsi, [0x1400f0b10]
movsx edi, byte [rsi + rdi]
and edi, 0xff
shl edi, 0x10
mov esi, dword [rsp + 0xc]
sar esi, 0x10
and esi, 0xff
movsxd rsi, esi
lea r8, [0x1400f0b10]
movsx esi, byte [r8 + rsi]
and esi, 0xff
shl esi, 0x18
xor esi, edi
mov edi, esi
xor edi, edx
mov edx, edi
xor edx, ecx
mov ecx, edx
xor ecx, eax
mov eax, ecx
mov ecx, 4
imul rcx, rcx, 0
mov rdx, qword [rsp + 0xd0]
mov ecx, dword [rdx + rcx + 0x418]
xor ecx, eax
mov eax, ecx
mov ecx, 4
imul rcx, rcx, 0
mov rdx, qword [rsp + 0xd0]
mov dword [rdx + rcx + 0x418], eax
cmp dword [rsp + 0x10], 8
je 0x1400132b0
mov dword [rsp + 4], 1
mov dword [rsp], 0
mov eax, dword [rsp + 0x10]
cmp dword [rsp + 4], eax
jge 0x1400132ab
movsxd rax, dword [rsp]
mov rcx, qword [rsp + 0xd0]
mov eax, dword [rcx + rax*4 + 0x418]
mov dword [rsp + 0x54], eax
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
movsxd rax, dword [rsp + 4]
mov rcx, qword [rsp + 0xd0]
mov edx, dword [rsp + 0x54]
mov eax, dword [rcx + rax*4 + 0x418]
xor eax, edx
movsxd rcx, dword [rsp + 4]
mov rdx, qword [rsp + 0xd0]
mov dword [rdx + rcx*4 + 0x418], eax
mov eax, dword [rsp + 4]
inc eax
mov dword [rsp + 4], eax
jmp 0x140013248
jmp 0x140013492
mov dword [rsp + 4], 1
mov dword [rsp], 0
mov eax, dword [rsp + 0x10]
cdq
sub eax, edx
sar eax, 1
cmp dword [rsp + 4], eax
jge 0x140013327
movsxd rax, dword [rsp]
mov rcx, qword [rsp + 0xd0]
mov eax, dword [rcx + rax*4 + 0x418]
mov dword [rsp + 0x58], eax
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
movsxd rax, dword [rsp + 4]
mov rcx, qword [rsp + 0xd0]
mov edx, dword [rsp + 0x58]
mov eax, dword [rcx + rax*4 + 0x418]
xor eax, edx
movsxd rcx, dword [rsp + 4]
mov rdx, qword [rsp + 0xd0]
mov dword [rdx + rcx*4 + 0x418], eax
mov eax, dword [rsp + 4]
inc eax
mov dword [rsp + 4], eax
jmp 0x1400132bf
mov eax, dword [rsp + 0x10]
cdq
sub eax, edx
sar eax, 1
dec eax
cdqe
mov rcx, qword [rsp + 0xd0]
mov eax, dword [rcx + rax*4 + 0x418]
mov dword [rsp + 0xc], eax
mov eax, dword [rsp + 0xc]
and eax, 0xff
cdqe
lea rcx, [0x1400f0b10]
movsx eax, byte [rcx + rax]
and eax, 0xff
mov ecx, dword [rsp + 0xc]
sar ecx, 8
and ecx, 0xff
movsxd rcx, ecx
lea rdx, [0x1400f0b10]
movsx ecx, byte [rdx + rcx]
and ecx, 0xff
shl ecx, 8
xor eax, ecx
mov ecx, dword [rsp + 0xc]
sar ecx, 0x10
and ecx, 0xff
movsxd rcx, ecx
lea rdx, [0x1400f0b10]
movsx ecx, byte [rdx + rcx]
and ecx, 0xff
shl ecx, 0x10
xor eax, ecx
mov ecx, dword [rsp + 0xc]
sar ecx, 0x18
and ecx, 0xff
movsxd rcx, ecx
lea rdx, [0x1400f0b10]
movsx ecx, byte [rdx + rcx]
and ecx, 0xff
shl ecx, 0x18
xor eax, ecx
mov dword [rsp + 0x5c], eax
mov eax, dword [rsp + 0x10]
cdq
sub eax, edx
sar eax, 1
cdqe
mov rcx, qword [rsp + 0xd0]
mov eax, dword [rcx + rax*4 + 0x418]
mov ecx, dword [rsp + 0x5c]
xor eax, ecx
mov dword [rsp + 0x60], eax
mov eax, dword [rsp + 0x10]
cdq
sub eax, edx
sar eax, 1
cdqe
mov rcx, qword [rsp + 0xd0]
mov edx, dword [rsp + 0x60]
mov dword [rcx + rax*4 + 0x418], edx
mov eax, dword [rsp + 0x10]
cdq
sub eax, edx
sar eax, 1
mov dword [rsp], eax
mov eax, dword [rsp]
inc eax
mov dword [rsp + 4], eax
mov eax, dword [rsp + 0x10]
cmp dword [rsp + 4], eax
jge 0x140013492
movsxd rax, dword [rsp]
mov rcx, qword [rsp + 0xd0]
mov eax, dword [rcx + rax*4 + 0x418]
mov dword [rsp + 0x64], eax
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
movsxd rax, dword [rsp + 4]
mov rcx, qword [rsp + 0xd0]
mov edx, dword [rsp + 0x64]
mov eax, dword [rcx + rax*4 + 0x418]
xor eax, edx
movsxd rcx, dword [rsp + 4]
mov rdx, qword [rsp + 0xd0]
mov dword [rdx + rcx*4 + 0x418], eax
mov eax, dword [rsp + 4]
inc eax
mov dword [rsp + 4], eax
jmp 0x14001342f
mov dword [rsp], 0
jmp 0x1400134ad
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
mov eax, dword [rsp + 8]
inc eax
mov dword [rsp + 8], eax
mov eax, dword [rsp + 0x10]
cmp dword [rsp], eax
jge 0x1400135a0
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 8], eax
jge 0x1400135a0
movsxd rax, dword [rsp]
mov qword [rsp + 0x90], rax
mov eax, dword [rsp + 8]
cdq
idiv dword [rsp + 0x14]
cdqe
imul rax, rax, 0x20
mov rcx, qword [rsp + 0xd0]
lea rax, [rcx + rax + 0xc]
mov qword [rsp + 0x98], rax
mov eax, dword [rsp + 8]
cdq
idiv dword [rsp + 0x14]
mov eax, edx
cdqe
mov rcx, qword [rsp + 0xd0]
mov rdx, qword [rsp + 0x90]
mov ecx, dword [rcx + rdx*4 + 0x418]
mov rdx, qword [rsp + 0x98]
mov dword [rdx + rax*4], ecx
movsxd rax, dword [rsp]
mov qword [rsp + 0xa0], rax
mov eax, dword [rsp + 8]
cdq
idiv dword [rsp + 0x14]
mov rcx, qword [rsp + 0xd0]
mov ecx, dword [rcx + 0x3d4]
sub ecx, eax
mov eax, ecx
cdqe
imul rax, rax, 0x20
mov rcx, qword [rsp + 0xd0]
lea rax, [rcx + rax + 0x1ec]
mov qword [rsp + 0xa8], rax
mov eax, dword [rsp + 8]
cdq
idiv dword [rsp + 0x14]
mov eax, edx
cdqe
mov rcx, qword [rsp + 0xd0]
mov rdx, qword [rsp + 0xa0]
mov ecx, dword [rcx + rdx*4 + 0x418]
mov rdx, qword [rsp + 0xa8]
mov dword [rdx + rax*4], ecx
jmp 0x14001349b
jmp 0x140013110
mov dword [rsp + 0x20], 1
jmp 0x1400135b9
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0xd0]
mov eax, dword [rax + 0x3d4]
cmp dword [rsp + 0x20], eax
jge 0x1400136a2
mov dword [rsp], 0
jmp 0x1400135e2
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
mov eax, dword [rsp + 0x14]
cmp dword [rsp], eax
jge 0x14001369d
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x20
mov rcx, qword [rsp + 0xd0]
lea rax, [rcx + rax + 0x1ec]
movsxd rcx, dword [rsp]
mov eax, dword [rax + rcx*4]
mov dword [rsp + 0xc], eax
mov eax, dword [rsp + 0xc]
sar eax, 0x18
and eax, 0xff
cdqe
lea rcx, [0x1400f2490]
mov edx, dword [rsp + 0xc]
sar edx, 0x10
and edx, 0xff
movsxd rdx, edx
lea rdi, [0x1400f0c10]
mov edx, dword [rdi + rdx*4]
mov eax, dword [rcx + rax*4]
xor eax, edx
mov ecx, dword [rsp + 0xc]
sar ecx, 8
and ecx, 0xff
movsxd rcx, ecx
lea rdx, [0x1400f1410]
xor eax, dword [rdx + rcx*4]
mov ecx, dword [rsp + 0xc]
and ecx, 0xff
movsxd rcx, ecx
lea rdx, [0x1400f2090]
xor eax, dword [rdx + rcx*4]
movsxd rcx, dword [rsp + 0x20]
imul rcx, rcx, 0x20
mov rdx, qword [rsp + 0xd0]
lea rcx, [rdx + rcx + 0x1ec]
movsxd rdx, dword [rsp]
mov dword [rcx + rdx*4], eax
jmp 0x1400135da
jmp 0x1400135af
mov rax, qword [rsp + 0xd0]
mov byte [rax + 8], 1
add rsp, 0xb8
pop rdi
pop rsi
ret