Function at 0x140021af0
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, 0x98
cmp qword [rsp + 0xb8], 0
jne 0x140021b1d
jmp 0x140022529
cmp dword [rsp + 0xc8], 0x10
je 0x140021b40
cmp dword [rsp + 0xc8], 0x18
je 0x140021b40
cmp dword [rsp + 0xc8], 0x20
je 0x140021b40
jmp 0x140022529
cmp dword [rsp + 0xd0], 0x10
je 0x140021b63
cmp dword [rsp + 0xd0], 0x18
je 0x140021b63
cmp dword [rsp + 0xd0], 0x20
je 0x140021b63
jmp 0x140022529
mov rax, qword [rsp + 0xb0]
mov ecx, dword [rsp + 0xc8]
mov dword [rax + 0x3cc], ecx
mov rax, qword [rsp + 0xb0]
mov ecx, dword [rsp + 0xd0]
mov dword [rax + 0x3d0], ecx
mov rax, qword [rsp + 0xb0]
movsxd rax, dword [rax + 0x3d0]
mov rcx, qword [rsp + 0xb0]
add rcx, 0x3d8
mov rdi, rcx
mov rsi, qword [rsp + 0xc0]
mov rcx, rax
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0xb0]
movsxd rax, dword [rax + 0x3d0]
mov rcx, qword [rsp + 0xb0]
add rcx, 0x3f8
mov rdi, rcx
mov rsi, qword [rsp + 0xc0]
mov rcx, rax
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x3cc]
mov dword [rsp + 0x38], eax
cmp dword [rsp + 0x38], 0x10
je 0x140021c0e
cmp dword [rsp + 0x38], 0x18
je 0x140021c68
jmp 0x140021c9f
mov rax, qword [rsp + 0xb0]
cmp dword [rax + 0x3d0], 0x10
jne 0x140021c29
mov dword [rsp + 0x40], 0xa
jmp 0x140021c54
mov rax, qword [rsp + 0xb0]
cmp dword [rax + 0x3d0], 0x18
jne 0x140021c44
mov dword [rsp + 0x3c], reloc.WS2_32.dll_inet_ntoa
jmp 0x140021c4c
mov dword [rsp + 0x3c], reloc.libcurl_x64.dll_Ordinal_14
mov eax, dword [rsp + 0x3c]
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0xb0]
mov ecx, dword [rsp + 0x40]
mov dword [rax + 0x3d4], ecx
jmp 0x140021cb1
mov rax, qword [rsp + 0xb0]
cmp dword [rax + 0x3d0], 0x20
je 0x140021c83
mov dword [rsp + 0x44], reloc.WS2_32.dll_inet_ntoa
jmp 0x140021c8b
mov dword [rsp + 0x44], reloc.libcurl_x64.dll_Ordinal_14
mov rax, qword [rsp + 0xb0]
mov ecx, dword [rsp + 0x44]
mov dword [rax + 0x3d4], ecx
jmp 0x140021cb1
mov rax, qword [rsp + 0xb0]
mov dword [rax + 0x3d4], reloc.libcurl_x64.dll_Ordinal_14
mov rax, qword [rsp + 0xb0]
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 0x140021ce0
mov eax, dword [rsp + 4]
inc eax
mov dword [rsp + 4], eax
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x3d4]
cmp dword [rsp + 4], eax
jg 0x140021d33
mov dword [rsp], 0
jmp 0x140021d05
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
mov eax, dword [rsp + 0x14]
cmp dword [rsp], eax
jge 0x140021d31
movsxd rax, dword [rsp + 4]
imul rax, rax, 0x20
mov rcx, qword [rsp + 0xb0]
lea rax, [rcx + rax + 0xc]
movsxd rcx, dword [rsp]
mov dword [rax + rcx*4], 0
jmp 0x140021cfd
jmp 0x140021cd6
mov dword [rsp + 4], 0
jmp 0x140021d47
mov eax, dword [rsp + 4]
inc eax
mov dword [rsp + 4], eax
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x3d4]
cmp dword [rsp + 4], eax
jg 0x140021d9d
mov dword [rsp], 0
jmp 0x140021d6c
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
mov eax, dword [rsp + 0x14]
cmp dword [rsp], eax
jge 0x140021d9b
movsxd rax, dword [rsp + 4]
imul rax, rax, 0x20
mov rcx, qword [rsp + 0xb0]
lea rax, [rcx + rax + 0x1ec]
movsxd rcx, dword [rsp]
mov dword [rax + rcx*4], 0
jmp 0x140021d64
jmp 0x140021d3d
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x3d4]
inc eax
imul eax, dword [rsp + 0x14]
mov dword [rsp + 0x34], eax
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x3cc]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [rsp + 0x10], eax
mov rax, qword [rsp + 0xb0]
add rax, 0x418
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0xb8]
mov qword [rsp + 0x18], rax
mov dword [rsp + 4], 0
jmp 0x140021e05
mov eax, dword [rsp + 4]
inc eax
mov dword [rsp + 4], eax
mov eax, dword [rsp + 0x10]
cmp dword [rsp + 4], eax
jge 0x140021ec0
mov rax, qword [rsp + 0x18]
movzx eax, byte [rax]
shl eax, 0x18
mov rcx, qword [rsp + 0x28]
mov dword [rcx], eax
mov rax, qword [rsp + 0x18]
inc rax
mov qword [rsp + 0x18], rax
mov rax, qword [rsp + 0x18]
movzx eax, byte [rax]
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]
inc rax
mov qword [rsp + 0x18], rax
mov rax, qword [rsp + 0x18]
movzx eax, byte [rax]
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]
inc rax
mov qword [rsp + 0x18], rax
mov rax, qword [rsp + 0x18]
movzx eax, byte [rax]
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]
inc rax
mov qword [rsp + 0x18], rax
mov rax, qword [rsp + 0x28]
add rax, 4
mov qword [rsp + 0x28], rax
jmp 0x140021dfb
mov dword [rsp + 8], 0
mov dword [rsp], 0
jmp 0x140021ee3
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 0x140021fbe
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 8], eax
jge 0x140021fbe
movsxd rax, dword [rsp]
mov qword [rsp + 0x50], rax
mov eax, dword [rsp + 8]
cdq
idiv dword [rsp + 0x14]
cdqe
imul rax, rax, 0x20
mov rcx, qword [rsp + 0xb0]
lea rax, [rcx + rax + 0xc]
mov qword [rsp + 0x58], rax
mov eax, dword [rsp + 8]
cdq
idiv dword [rsp + 0x14]
mov eax, edx
cdqe
mov rcx, qword [rsp + 0xb0]
mov rdx, qword [rsp + 0x50]
mov ecx, dword [rcx + rdx*4 + 0x418]
mov rdx, qword [rsp + 0x58]
mov dword [rdx + rax*4], ecx
movsxd rax, dword [rsp]
mov qword [rsp + 0x60], rax
mov eax, dword [rsp + 8]
cdq
idiv dword [rsp + 0x14]
mov rcx, qword [rsp + 0xb0]
mov ecx, dword [rcx + 0x3d4]
sub ecx, eax
mov eax, ecx
cdqe
imul rax, rax, 0x20
mov rcx, qword [rsp + 0xb0]
lea rax, [rcx + rax + 0x1ec]
mov qword [rsp + 0x68], rax
mov eax, dword [rsp + 8]
cdq
idiv dword [rsp + 0x14]
mov eax, edx
cdqe
mov rcx, qword [rsp + 0xb0]
mov rdx, qword [rsp + 0x60]
mov ecx, dword [rcx + rdx*4 + 0x418]
mov rdx, qword [rsp + 0x68]
mov dword [rdx + rax*4], ecx
jmp 0x140021ed1
mov dword [rsp + 0x30], 0
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 8], eax
jge 0x140022420
mov eax, dword [rsp + 0x10]
dec eax
cdqe
mov rcx, qword [rsp + 0xb0]
mov eax, dword [rcx + rax*4 + 0x418]
mov dword [rsp + 0xc], eax
mov eax, 4
imul rax, rax, 0
mov ecx, dword [rsp + 0xc]
sar ecx, 0x10
and ecx, 0xff
movsxd rcx, ecx
lea rdx, [0x1402a7870]
movsx ecx, byte [rdx + rcx]
and ecx, 0xff
shl ecx, 0x18
mov edx, dword [rsp + 0xc]
sar edx, 8
and edx, 0xff
movsxd rdx, edx
lea rdi, [0x1402a7870]
movsx edx, byte [rdi + rdx]
and edx, 0xff
shl edx, 0x10
xor ecx, edx
mov edx, dword [rsp + 0xc]
and edx, 0xff
movsxd rdx, edx
lea rdi, [0x1402a7870]
movsx edx, byte [rdi + rdx]
and edx, 0xff
shl edx, 8
xor ecx, edx
mov edx, dword [rsp + 0xc]
sar edx, 0x18
and edx, 0xff
movsxd rdx, edx
lea rdi, [0x1402a7870]
movsx edx, byte [rdi + rdx]
and edx, 0xff
xor ecx, edx
movsxd rdx, dword [rsp + 0x30]
lea rdi, [0x1402a85d0]
movsx edx, byte [rdi + rdx]
and edx, 0xff
shl edx, 0x18
xor ecx, edx
mov rdx, qword [rsp + 0xb0]
mov eax, dword [rdx + rax + 0x418]
xor eax, ecx
mov ecx, 4
imul rcx, rcx, 0
mov rdx, qword [rsp + 0xb0]
mov dword [rdx + rcx + 0x418], eax
mov eax, dword [rsp + 0x30]
inc eax
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x10], 8
je 0x14002214c
mov dword [rsp + 4], 1
mov dword [rsp], 0
mov eax, dword [rsp + 0x10]
cmp dword [rsp + 4], eax
jge 0x140022147
movsxd rax, dword [rsp + 4]
movsxd rcx, dword [rsp]
mov rdx, qword [rsp + 0xb0]
mov rdi, qword [rsp + 0xb0]
mov ecx, dword [rdi + rcx*4 + 0x418]
mov eax, dword [rdx + rax*4 + 0x418]
xor eax, ecx
movsxd rcx, dword [rsp + 4]
mov rdx, qword [rsp + 0xb0]
mov dword [rdx + rcx*4 + 0x418], eax
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
mov eax, dword [rsp + 4]
inc eax
mov dword [rsp + 4], eax
jmp 0x1400220ec
jmp 0x140022319
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 0x1400221bb
movsxd rax, dword [rsp + 4]
movsxd rcx, dword [rsp]
mov rdx, qword [rsp + 0xb0]
mov rdi, qword [rsp + 0xb0]
mov ecx, dword [rdi + rcx*4 + 0x418]
mov eax, dword [rdx + rax*4 + 0x418]
xor eax, ecx
movsxd rcx, dword [rsp + 4]
mov rdx, qword [rsp + 0xb0]
mov dword [rdx + rcx*4 + 0x418], eax
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
mov eax, dword [rsp + 4]
inc eax
mov dword [rsp + 4], eax
jmp 0x14002215b
mov eax, dword [rsp + 0x10]
cdq
sub eax, edx
sar eax, 1
dec eax
cdqe
mov rcx, qword [rsp + 0xb0]
mov eax, dword [rcx + rax*4 + 0x418]
mov dword [rsp + 0xc], eax
mov eax, dword [rsp + 0x10]
cdq
sub eax, edx
sar eax, 1
cdqe
mov ecx, dword [rsp + 0xc]
and ecx, 0xff
movsxd rcx, ecx
lea rdx, [0x1402a7870]
movsx ecx, byte [rdx + rcx]
and ecx, 0xff
mov edx, dword [rsp + 0xc]
sar edx, 8
and edx, 0xff
movsxd rdx, edx
lea rdi, [0x1402a7870]
movsx edx, byte [rdi + rdx]
and edx, 0xff
shl edx, 8
xor ecx, edx
mov edx, dword [rsp + 0xc]
sar edx, 0x10
and edx, 0xff
movsxd rdx, edx
lea rdi, [0x1402a7870]
movsx edx, byte [rdi + rdx]
and edx, 0xff
shl edx, 0x10
xor ecx, edx
mov edx, dword [rsp + 0xc]
sar edx, 0x18
and edx, 0xff
movsxd rdx, edx
lea rdi, [0x1402a7870]
movsx edx, byte [rdi + rdx]
and edx, 0xff
shl edx, 0x18
xor ecx, edx
mov rdx, qword [rsp + 0xb0]
mov eax, dword [rdx + rax*4 + 0x418]
xor eax, ecx
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x10]
cdq
sub eax, edx
sar eax, 1
cdqe
mov rcx, qword [rsp + 0xb0]
mov edx, dword [rsp + 0x48]
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 0x140022319
movsxd rax, dword [rsp + 4]
movsxd rcx, dword [rsp]
mov rdx, qword [rsp + 0xb0]
mov rdi, qword [rsp + 0xb0]
mov ecx, dword [rdi + rcx*4 + 0x418]
mov eax, dword [rdx + rax*4 + 0x418]
xor eax, ecx
movsxd rcx, dword [rsp + 4]
mov rdx, qword [rsp + 0xb0]
mov dword [rdx + rcx*4 + 0x418], eax
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
mov eax, dword [rsp + 4]
inc eax
mov dword [rsp + 4], eax
jmp 0x1400222be
mov dword [rsp], 0
jmp 0x140022334
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 0x14002241b
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 8], eax
jge 0x14002241b
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 + 0xb0]
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 + 0xb0]
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 + 0xb0]
mov ecx, dword [rcx + 0x3d4]
sub ecx, eax
mov eax, ecx
cdqe
imul rax, rax, 0x20
mov rcx, qword [rsp + 0xb0]
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 + 0xb0]
mov rdx, qword [rsp + 0x80]
mov ecx, dword [rcx + rdx*4 + 0x418]
mov rdx, qword [rsp + 0x88]
mov dword [rdx + rax*4], ecx
jmp 0x140022322
jmp 0x140021fc6
mov dword [rsp + 0x20], 1
jmp 0x140022434
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0xb0]
mov eax, dword [rax + 0x3d4]
cmp dword [rsp + 0x20], eax
jge 0x14002251d
mov dword [rsp], 0
jmp 0x14002245d
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
mov eax, dword [rsp + 0x14]
cmp dword [rsp], eax
jge 0x140022518
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x20
mov rcx, qword [rsp + 0xb0]
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, [0x1402a89f0]
mov edx, dword [rsp + 0xc]
sar edx, 0x10
and edx, 0xff
movsxd rdx, edx
lea rdi, [0x1402a7970]
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, [0x1402a8170]
xor eax, dword [rdx + rcx*4]
mov ecx, dword [rsp + 0xc]
and ecx, 0xff
movsxd rcx, ecx
lea rdx, [0x1402a85f0]
xor eax, dword [rdx + rcx*4]
movsxd rcx, dword [rsp + 0x20]
imul rcx, rcx, 0x20
mov rdx, qword [rsp + 0xb0]
lea rcx, [rdx + rcx + 0x1ec]
movsxd rdx, dword [rsp]
mov dword [rcx + rdx*4], eax
jmp 0x140022455
jmp 0x14002242a
mov rax, qword [rsp + 0xb0]
mov byte [rax + 8], 1
add rsp, 0x98
pop rdi
pop rsi
ret