Function at 0x140103494
Capabilities:
Encrypt data using aes
Reference aes constants

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, 0x108
cmp qword [rsp + 0x128], 0
jne 0x1401034e4
lea rdx, str.Empty_key
lea rcx, [rsp + 0xb0]
call fcn.14004e760
lea rdx, [0x140194d40]
lea rcx, [rsp + 0xb0]
call fcn.1400907dc
cmp dword [rsp + 0x138], 0x10
je 0x14010352a
cmp dword [rsp + 0x138], 0x18
je 0x14010352a
cmp dword [rsp + 0x138], 0x20
je 0x14010352a
lea rdx, str.Incorrect_key_length
lea rcx, [rsp + 0xc8]
call fcn.14004e760
lea rdx, [0x140194d40]
lea rcx, [rsp + 0xc8]
call fcn.1400907dc
cmp dword [rsp + 0x140], 0x10
je 0x140103570
cmp dword [rsp + 0x140], 0x18
je 0x140103570
cmp dword [rsp + 0x140], 0x20
je 0x140103570
lea rdx, str.Incorrect_block_length
lea rcx, [rsp + 0xe0]
call fcn.14004e760
lea rdx, [0x140194d40]
lea rcx, [rsp + 0xe0]
call fcn.1400907dc
mov rax, qword [rsp + 0x120]
mov ecx, dword [rsp + 0x138]
mov dword [rax + 0x3cc], ecx
mov rax, qword [rsp + 0x120]
mov ecx, dword [rsp + 0x140]
mov dword [rax + 0x3d0], ecx
mov rax, qword [rsp + 0x120]
movsxd rax, dword [rax + 0x3d0]
mov rcx, qword [rsp + 0x120]
add rcx, 0x3d8
mov rdi, rcx
mov rsi, qword [rsp + 0x130]
mov rcx, rax
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x120]
movsxd rax, dword [rax + 0x3d0]
mov rcx, qword [rsp + 0x120]
add rcx, 0x3f8
mov rdi, rcx
mov rsi, qword [rsp + 0x130]
mov rcx, rax
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x120]
mov eax, dword [rax + 0x3cc]
mov dword [rsp + 0x58], eax
cmp dword [rsp + 0x58], 0x10
je 0x14010361b
cmp dword [rsp + 0x58], 0x18
je 0x140103675
jmp 0x1401036ac
mov rax, qword [rsp + 0x120]
cmp dword [rax + 0x3d0], 0x10
jne 0x140103636
mov dword [rsp + 0x60], 0xa
jmp 0x140103661
mov rax, qword [rsp + 0x120]
cmp dword [rax + 0x3d0], 0x18
jne 0x140103651
mov dword [rsp + 0x5c], send
jmp 0x140103659
mov dword [rsp + 0x5c], reloc.WS2_32.dll_ntohl
mov eax, dword [rsp + 0x5c]
mov dword [rsp + 0x60], eax
mov rax, qword [rsp + 0x120]
mov ecx, dword [rsp + 0x60]
mov dword [rax + 0x3d4], ecx
jmp 0x1401036be
mov rax, qword [rsp + 0x120]
cmp dword [rax + 0x3d0], 0x20
je 0x140103690
mov dword [rsp + 0x64], send
jmp 0x140103698
mov dword [rsp + 0x64], reloc.WS2_32.dll_ntohl
mov rax, qword [rsp + 0x120]
mov ecx, dword [rsp + 0x64]
mov dword [rax + 0x3d4], ecx
jmp 0x1401036be
mov rax, qword [rsp + 0x120]
mov dword [rax + 0x3d4], reloc.WS2_32.dll_ntohl
mov rax, qword [rsp + 0x120]
mov eax, dword [rax + 0x3d0]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [rsp + 0x34], eax
mov dword [rsp + 0x24], 0
jmp 0x1401036ed
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
mov rax, qword [rsp + 0x120]
mov eax, dword [rax + 0x3d4]
cmp dword [rsp + 0x24], eax
jg 0x140103745
mov dword [rsp + 0x20], 0
jmp 0x140103715
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 0x20], eax
jge 0x140103743
movsxd rax, dword [rsp + 0x24]
imul rax, rax, 0x20
mov rcx, qword [rsp + 0x120]
lea rax, [rcx + rax + 0xc]
movsxd rcx, dword [rsp + 0x20]
mov dword [rax + rcx*4], 0
jmp 0x14010370b
jmp 0x1401036e3
mov dword [rsp + 0x24], 0
jmp 0x140103759
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
mov rax, qword [rsp + 0x120]
mov eax, dword [rax + 0x3d4]
cmp dword [rsp + 0x24], eax
jg 0x1401037b4
mov dword [rsp + 0x20], 0
jmp 0x140103781
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 0x20], eax
jge 0x1401037b2
movsxd rax, dword [rsp + 0x24]
imul rax, rax, 0x20
mov rcx, qword [rsp + 0x120]
lea rax, [rcx + rax + 0x1ec]
movsxd rcx, dword [rsp + 0x20]
mov dword [rax + rcx*4], 0
jmp 0x140103777
jmp 0x14010374f
mov rax, qword [rsp + 0x120]
mov eax, dword [rax + 0x3d4]
inc eax
imul eax, dword [rsp + 0x34]
mov dword [rsp + 0x54], eax
mov rax, qword [rsp + 0x120]
mov eax, dword [rax + 0x3cc]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x120]
add rax, 0x418
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x128]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x24], 0
jmp 0x14010381c
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x24], eax
jge 0x1401038d7
mov rax, qword [rsp + 0x38]
movzx eax, byte [rax]
shl eax, 0x18
mov rcx, qword [rsp + 0x48]
mov dword [rcx], eax
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx eax, byte [rax]
shl eax, 0x10
mov rcx, qword [rsp + 0x48]
mov ecx, dword [rcx]
or ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x48]
mov dword [rcx], eax
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx eax, byte [rax]
shl eax, 8
mov rcx, qword [rsp + 0x48]
mov ecx, dword [rcx]
or ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x48]
mov dword [rcx], eax
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
movzx eax, byte [rax]
mov rcx, qword [rsp + 0x48]
mov ecx, dword [rcx]
or ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0x48]
mov dword [rcx], eax
mov rax, qword [rsp + 0x38]
inc rax
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x48]
add rax, 4
mov qword [rsp + 0x48], rax
jmp 0x140103812
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
jmp 0x1401038fd
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x28]
inc eax
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x20], eax
jge 0x1401039e7
mov eax, dword [rsp + 0x54]
cmp dword [rsp + 0x28], eax
jge 0x1401039e7
movsxd rax, dword [rsp + 0x20]
mov qword [rsp + 0x70], rax
mov eax, dword [rsp + 0x28]
cdq
idiv dword [rsp + 0x34]
cdqe
imul rax, rax, 0x20
mov rcx, qword [rsp + 0x120]
lea rax, [rcx + rax + 0xc]
mov qword [rsp + 0x78], rax
mov eax, dword [rsp + 0x28]
cdq
idiv dword [rsp + 0x34]
mov eax, edx
cdqe
mov rcx, qword [rsp + 0x120]
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 + 0x20]
mov qword [rsp + 0x80], rax
mov eax, dword [rsp + 0x28]
cdq
idiv dword [rsp + 0x34]
mov rcx, qword [rsp + 0x120]
mov ecx, dword [rcx + 0x3d4]
sub ecx, eax
mov eax, ecx
cdqe
imul rax, rax, 0x20
mov rcx, qword [rsp + 0x120]
lea rax, [rcx + rax + 0x1ec]
mov qword [rsp + 0x88], rax
mov eax, dword [rsp + 0x28]
cdq
idiv dword [rsp + 0x34]
mov eax, edx
cdqe
mov rcx, qword [rsp + 0x120]
mov rdx, qword [rsp + 0x80]
mov ecx, dword [rcx + rdx*4 + 0x418]
mov rdx, qword [rsp + 0x88]
mov dword [rdx + rax*4], ecx
jmp 0x1401038e9
mov dword [rsp + 0x50], 0
mov eax, dword [rsp + 0x54]
cmp dword [rsp + 0x28], eax
jge 0x140103e68
mov eax, dword [rsp + 0x30]
dec eax
cdqe
mov rcx, qword [rsp + 0x120]
mov eax, dword [rcx + rax*4 + 0x418]
mov dword [rsp + 0x2c], eax
mov eax, 4
imul rax, rax, 0
mov ecx, dword [rsp + 0x2c]
sar ecx, 0x10
and ecx, 0xff
movsxd rcx, ecx
lea rdx, str.cw
movsx ecx, byte [rdx + rcx]
and ecx, 0xff
shl ecx, 0x18
mov edx, dword [rsp + 0x2c]
sar edx, 8
and edx, 0xff
movsxd rdx, edx
lea rdi, str.cw
movsx edx, byte [rdi + rdx]
and edx, 0xff
shl edx, 0x10
xor ecx, edx
mov edx, dword [rsp + 0x2c]
and edx, 0xff
movsxd rdx, edx
lea rdi, str.cw
movsx edx, byte [rdi + rdx]
and edx, 0xff
shl edx, 8
xor ecx, edx
mov edx, dword [rsp + 0x2c]
sar edx, 0x18
and edx, 0xff
movsxd rdx, edx
lea rdi, str.cw
movsx edx, byte [rdi + rdx]
and edx, 0xff
xor ecx, edx
movsxd rdx, dword [rsp + 0x50]
lea rdi, [0x14014b610]
movsx edx, byte [rdi + rdx]
and edx, 0xff
shl edx, 0x18
xor ecx, edx
mov rdx, qword [rsp + 0x120]
mov eax, dword [rdx + rax + 0x418]
xor eax, ecx
mov ecx, 4
imul rcx, rcx, 0
mov rdx, qword [rsp + 0x120]
mov dword [rdx + rcx + 0x418], eax
mov eax, dword [rsp + 0x50]
inc eax
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x30], 8
je 0x140103b79
mov dword [rsp + 0x24], 1
mov dword [rsp + 0x20], 0
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x24], eax
jge 0x140103b74
movsxd rax, dword [rsp + 0x24]
movsxd rcx, dword [rsp + 0x20]
mov rdx, qword [rsp + 0x120]
mov rdi, qword [rsp + 0x120]
mov ecx, dword [rdi + rcx*4 + 0x418]
mov eax, dword [rdx + rax*4 + 0x418]
xor eax, ecx
movsxd rcx, dword [rsp + 0x24]
mov rdx, qword [rsp + 0x120]
mov dword [rdx + rcx*4 + 0x418], eax
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
jmp 0x140103b16
jmp 0x140103d4f
mov dword [rsp + 0x24], 1
mov dword [rsp + 0x20], 0
mov eax, dword [rsp + 0x30]
cdq
sub eax, edx
sar eax, 1
cmp dword [rsp + 0x24], eax
jge 0x140103bec
movsxd rax, dword [rsp + 0x24]
movsxd rcx, dword [rsp + 0x20]
mov rdx, qword [rsp + 0x120]
mov rdi, qword [rsp + 0x120]
mov ecx, dword [rdi + rcx*4 + 0x418]
mov eax, dword [rdx + rax*4 + 0x418]
xor eax, ecx
movsxd rcx, dword [rsp + 0x24]
mov rdx, qword [rsp + 0x120]
mov dword [rdx + rcx*4 + 0x418], eax
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
jmp 0x140103b89
mov eax, dword [rsp + 0x30]
cdq
sub eax, edx
sar eax, 1
dec eax
cdqe
mov rcx, qword [rsp + 0x120]
mov eax, dword [rcx + rax*4 + 0x418]
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x30]
cdq
sub eax, edx
sar eax, 1
cdqe
mov ecx, dword [rsp + 0x2c]
and ecx, 0xff
movsxd rcx, ecx
lea rdx, str.cw
movsx ecx, byte [rdx + rcx]
and ecx, 0xff
mov edx, dword [rsp + 0x2c]
sar edx, 8
and edx, 0xff
movsxd rdx, edx
lea rdi, str.cw
movsx edx, byte [rdi + rdx]
and edx, 0xff
shl edx, 8
xor ecx, edx
mov edx, dword [rsp + 0x2c]
sar edx, 0x10
and edx, 0xff
movsxd rdx, edx
lea rdi, str.cw
movsx edx, byte [rdi + rdx]
and edx, 0xff
shl edx, 0x10
xor ecx, edx
mov edx, dword [rsp + 0x2c]
sar edx, 0x18
and edx, 0xff
movsxd rdx, edx
lea rdi, str.cw
movsx edx, byte [rdi + rdx]
and edx, 0xff
shl edx, 0x18
xor ecx, edx
mov rdx, qword [rsp + 0x120]
mov eax, dword [rdx + rax*4 + 0x418]
xor eax, ecx
mov dword [rsp + 0x68], eax
mov eax, dword [rsp + 0x30]
cdq
sub eax, edx
sar eax, 1
cdqe
mov rcx, qword [rsp + 0x120]
mov edx, dword [rsp + 0x68]
mov dword [rcx + rax*4 + 0x418], edx
mov eax, dword [rsp + 0x30]
cdq
sub eax, edx
sar eax, 1
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x24], eax
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x24], eax
jge 0x140103d4f
movsxd rax, dword [rsp + 0x24]
movsxd rcx, dword [rsp + 0x20]
mov rdx, qword [rsp + 0x120]
mov rdi, qword [rsp + 0x120]
mov ecx, dword [rdi + rcx*4 + 0x418]
mov eax, dword [rdx + rax*4 + 0x418]
xor eax, ecx
movsxd rcx, dword [rsp + 0x24]
mov rdx, qword [rsp + 0x120]
mov dword [rdx + rcx*4 + 0x418], eax
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
jmp 0x140103cf1
mov dword [rsp + 0x20], 0
jmp 0x140103d6d
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x28]
inc eax
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x20], eax
jge 0x140103e63
mov eax, dword [rsp + 0x54]
cmp dword [rsp + 0x28], eax
jge 0x140103e63
movsxd rax, dword [rsp + 0x20]
mov qword [rsp + 0x90], rax
mov eax, dword [rsp + 0x28]
cdq
idiv dword [rsp + 0x34]
cdqe
imul rax, rax, 0x20
mov rcx, qword [rsp + 0x120]
lea rax, [rcx + rax + 0xc]
mov qword [rsp + 0x98], rax
mov eax, dword [rsp + 0x28]
cdq
idiv dword [rsp + 0x34]
mov eax, edx
cdqe
mov rcx, qword [rsp + 0x120]
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 + 0x20]
mov qword [rsp + 0xa0], rax
mov eax, dword [rsp + 0x28]
cdq
idiv dword [rsp + 0x34]
mov rcx, qword [rsp + 0x120]
mov ecx, dword [rcx + 0x3d4]
sub ecx, eax
mov eax, ecx
cdqe
imul rax, rax, 0x20
mov rcx, qword [rsp + 0x120]
lea rax, [rcx + rax + 0x1ec]
mov qword [rsp + 0xa8], rax
mov eax, dword [rsp + 0x28]
cdq
idiv dword [rsp + 0x34]
mov eax, edx
cdqe
mov rcx, qword [rsp + 0x120]
mov rdx, qword [rsp + 0xa0]
mov ecx, dword [rcx + rdx*4 + 0x418]
mov rdx, qword [rsp + 0xa8]
mov dword [rdx + rax*4], ecx
jmp 0x140103d59
jmp 0x1401039ef
mov dword [rsp + 0x40], 1
jmp 0x140103e7c
mov eax, dword [rsp + 0x40]
inc eax
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x120]
mov eax, dword [rax + 0x3d4]
cmp dword [rsp + 0x40], eax
jge 0x140103f6b
mov dword [rsp + 0x20], 0
jmp 0x140103ea8
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 0x20], eax
jge 0x140103f66
movsxd rax, dword [rsp + 0x40]
imul rax, rax, 0x20
mov rcx, qword [rsp + 0x120]
lea rax, [rcx + rax + 0x1ec]
movsxd rcx, dword [rsp + 0x20]
mov eax, dword [rax + rcx*4]
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x2c]
sar eax, 0x18
and eax, 0xff
cdqe
lea rcx, [0x14014a610]
mov edx, dword [rsp + 0x2c]
sar edx, 0x10
and edx, 0xff
movsxd rdx, edx
lea rdi, [0x14014aa10]
mov edx, dword [rdi + rdx*4]
mov eax, dword [rcx + rax*4]
xor eax, edx
mov ecx, dword [rsp + 0x2c]
sar ecx, 8
and ecx, 0xff
movsxd rcx, ecx
lea rdx, [0x14014ae10]
xor eax, dword [rdx + rcx*4]
mov ecx, dword [rsp + 0x2c]
and ecx, 0xff
movsxd rcx, ecx
lea rdx, [0x14014b210]
xor eax, dword [rdx + rcx*4]
movsxd rcx, dword [rsp + 0x40]
imul rcx, rcx, 0x20
mov rdx, qword [rsp + 0x120]
lea rcx, [rdx + rcx + 0x1ec]
movsxd rdx, dword [rsp + 0x20]
mov dword [rcx + rdx*4], eax
jmp 0x140103e9e
jmp 0x140103e72
mov rax, qword [rsp + 0x120]
mov byte [rax + 8], 1
add rsp, 0x108
pop rdi
pop rsi
ret