Function at 0x1400049e0
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 0x140004a0d
jmp 0x140005419
cmp dword [rsp + 0xc8], 0x10
je 0x140004a30
cmp dword [rsp + 0xc8], 0x18
je 0x140004a30
cmp dword [rsp + 0xc8], 0x20
je 0x140004a30
jmp 0x140005419
cmp dword [rsp + 0xd0], 0x10
je 0x140004a53
cmp dword [rsp + 0xd0], 0x18
je 0x140004a53
cmp dword [rsp + 0xd0], 0x20
je 0x140004a53
jmp 0x140005419
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 0x140004afe
cmp dword [rsp + 0x38], 0x18
je 0x140004b58
jmp 0x140004b8f
mov rax, qword [rsp + 0xb0]
cmp dword [rax + 0x3d0], 0x10
jne 0x140004b19
mov dword [rsp + 0x40], 0xa
jmp 0x140004b44
mov rax, qword [rsp + 0xb0]
cmp dword [rax + 0x3d0], 0x18
jne 0x140004b34
mov dword [rsp + 0x3c], recv
jmp 0x140004b3c
mov dword [rsp + 0x3c], recv
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 0x140004ba1
mov rax, qword [rsp + 0xb0]
cmp dword [rax + 0x3d0], 0x20
je 0x140004b73
mov dword [rsp + 0x44], recv
jmp 0x140004b7b
mov dword [rsp + 0x44], recv
mov rax, qword [rsp + 0xb0]
mov ecx, dword [rsp + 0x44]
mov dword [rax + 0x3d4], ecx
jmp 0x140004ba1
mov rax, qword [rsp + 0xb0]
mov dword [rax + 0x3d4], recv
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 0x140004bd0
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 0x140004c23
mov dword [rsp], 0
jmp 0x140004bf5
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
mov eax, dword [rsp + 0x14]
cmp dword [rsp], eax
jge 0x140004c21
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 0x140004bed
jmp 0x140004bc6
mov dword [rsp + 4], 0
jmp 0x140004c37
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 0x140004c8d
mov dword [rsp], 0
jmp 0x140004c5c
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
mov eax, dword [rsp + 0x14]
cmp dword [rsp], eax
jge 0x140004c8b
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 0x140004c54
jmp 0x140004c2d
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 0x140004cf5
mov eax, dword [rsp + 4]
inc eax
mov dword [rsp + 4], eax
mov eax, dword [rsp + 0x10]
cmp dword [rsp + 4], eax
jge 0x140004db0
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 0x140004ceb
mov dword [rsp + 8], 0
mov dword [rsp], 0
jmp 0x140004dd3
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 0x140004eae
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 8], eax
jge 0x140004eae
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 0x140004dc1
mov dword [rsp + 0x30], 0
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 8], eax
jge 0x140005310
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, str.cw
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, str.cw
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, str.cw
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, str.cw
movsx edx, byte [rdi + rdx]
and edx, 0xff
xor ecx, edx
movsxd rdx, dword [rsp + 0x30]
lea rdi, [0x14002ef10]
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 0x14000503c
mov dword [rsp + 4], 1
mov dword [rsp], 0
mov eax, dword [rsp + 0x10]
cmp dword [rsp + 4], eax
jge 0x140005037
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 0x140004fdc
jmp 0x140005209
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 0x1400050ab
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 0x14000504b
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, str.cw
movsx ecx, byte [rdx + rcx]
and ecx, 0xff
mov edx, dword [rsp + 0xc]
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 + 0xc]
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 + 0xc]
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 + 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 0x140005209
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 0x1400051ae
mov dword [rsp], 0
jmp 0x140005224
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 0x14000530b
mov eax, dword [rsp + 0x34]
cmp dword [rsp + 8], eax
jge 0x14000530b
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 0x140005212
jmp 0x140004eb6
mov dword [rsp + 0x20], 1
jmp 0x140005324
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 0x14000540d
mov dword [rsp], 0
jmp 0x14000534d
mov eax, dword [rsp]
inc eax
mov dword [rsp], eax
mov eax, dword [rsp + 0x14]
cmp dword [rsp], eax
jge 0x140005408
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, [0x14002df10]
mov edx, dword [rsp + 0xc]
sar edx, 0x10
and edx, 0xff
movsxd rdx, edx
lea rdi, [0x14002e310]
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, [0x14002e710]
xor eax, dword [rdx + rcx*4]
mov ecx, dword [rsp + 0xc]
and ecx, 0xff
movsxd rcx, ecx
lea rdx, [0x14002eb10]
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 0x140005345
jmp 0x14000531a
mov rax, qword [rsp + 0xb0]
mov byte [rax + 8], 1
add rsp, 0x98
pop rdi
pop rsi
ret