Function at 0x1800019f0
Capabilities:
Set environment variable

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0xb98]
sub rsp, 0xc80
mov qword [rsp + 0x28], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
mov rax, qword [0x180135070]
xor rax, rsp
mov qword [rbp + 0xb70], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rbx, rax
test rax, rax
jne 0x180001a5f
lea r9d, [rax + 0x10]
lea r8, str.AFWIN
lea rdx, str.GetCurrentProcess___Call_Fail_
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
jmp 0x180001f1a
xor r15d, r15d
mov word [rsp + 0x70], r15w
xor edx, edx
mov r8d, 0x3fe
lea rcx, [rsp + 0x72]
call fcn.18000abd0
mov r9d, 0x400
lea r8, [rsp + 0x70]
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_K32GetModuleFileNameExW]
mov qword [rsp + 0x48], 7
mov qword [rsp + 0x40], r15
mov word [rsp + 0x30], r15w
or r12, 0xffffffffffffffff
cmp word [rsp + 0x70], r15w
jne 0x180001ab5
mov r8d, r15d
jmp 0x180001aca
lea rax, [rsp + 0x70]
mov r8, r12
nop dword [rax]
inc r8
cmp word [rax + r8*2], r15w
jne 0x180001ac0
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x30]
call fcn.1800049f0
nop
mov r14d, dword [rsp + 0x40]
mov eax, 0x5c
mov word [rsp + 0x20], ax
mov rcx, qword [rsp + 0x40]
cmp rcx, 1
jb 0x180001b86
dec rcx
cmp rcx, 0xffffffffffffffff
cmova rcx, r12
lea rax, [rsp + 0x30]
mov rdi, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x48]
cmp rsi, 8
cmovae rax, rdi
lea rbx, [rax + rcx*2]
nop
cmp word [rbx], 0x5c
jne 0x180001b5c
mov ecx, 1
lea rdx, [rsp + 0x20]
mov r8, rbx
movzx eax, word [rdx]
cmp word [r8], ax
jne 0x180001b4b
add r8, 2
add rdx, 2
dec rcx
je 0x180001b71
jmp 0x180001b33
mov ecx, 1
cmp word [r8], ax
cmovb ecx, r12d
test ecx, ecx
je 0x180001b71
lea rcx, [rsp + 0x30]
call fcn.1800044b0
cmp rbx, rax
je 0x180001b86
sub rbx, 2
jmp 0x180001b20
lea rax, [rsp + 0x30]
cmp rsi, 8
cmovae rax, rdi
sub rbx, rax
sar rbx, 1
jmp 0x180001b89
mov rbx, r12
lea eax, [rbx + 1]
movsxd rsi, eax
mov r9, rsi
xor r8d, r8d
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x30]
call fcn.1800042c0
mov rdi, rax
lea r12, [0x180157f78]
cmp r12, rax
je 0x180001bee
cmp qword [reloc.WSOCK32.dll_getsockopt], 8
jb 0x180001bc9
mov rcx, qword [0x180157f78]
call fcn.180005840
mov qword [reloc.WSOCK32.dll_getsockopt], 7
mov qword [0x180157f88], r15
mov word [0x180157f78], r15w
mov rdx, rdi
mov rcx, r12
call fcn.180004440
cmp qword [rsp + 0x68], 8
jb 0x180001c00
mov rcx, qword [rsp + 0x50]
call fcn.180005840
sub r14d, ebx
dec r14d
movsxd r9, r14d
mov r8, rsi
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x30]
call fcn.1800042c0
mov rbx, rax
lea rsi, [0x180157fb8]
cmp rsi, rax
je 0x180001c65
cmp qword [reloc.WSOCK32.dll_getsockopt], 8
jb 0x180001c40
mov rcx, qword [0x180157fb8]
call fcn.180005840
mov qword [reloc.WSOCK32.dll_getsockopt], 7
mov qword [0x180157fc8], r15
mov word [0x180157fb8], r15w
mov rdx, rbx
mov rcx, rsi
call fcn.180004440
cmp qword [rsp + 0x68], 8
jb 0x180001c77
mov rcx, qword [rsp + 0x50]
call fcn.180005840
mov r14, rsi
mov r8, qword [0x180157fb8]
mov rdx, qword [reloc.WSOCK32.dll_getsockopt]
cmp rdx, 8
cmovae r14, r8
mov rcx, rsi
cmovae rcx, r8
mov rax, qword [0x180157fc8]
lea rbx, [rcx + rax*2]
mov rdi, rsi
cmovae rdi, r8
cmp rdi, rbx
je 0x180001cc7
sub r14, rdi
movzx ecx, word [rdi]
call fcn.180006dc0
mov word [r14 + rdi], ax
add rdi, 2
cmp rdi, rbx
jne 0x180001cb1
lea r8, str.license.lic
lea rcx, [rsp + 0x50]
call fcn.1800056a0
mov rdi, rax
lea rbx, [0x180157f98]
cmp rbx, rax
je 0x180001d22
cmp qword [reloc.WSOCK32.dll_getsockopt], 8
jb 0x180001cfd
mov rcx, qword [0x180157f98]
call fcn.180005840
mov qword [reloc.WSOCK32.dll_getsockopt], 7
mov qword [0x180157fa8], r15
mov word [0x180157f98], r15w
mov rdx, rdi
mov rcx, rbx
call fcn.180004440
cmp qword [rsp + 0x68], 8
jb 0x180001d34
mov rcx, qword [rsp + 0x50]
call fcn.180005840
mov rdx, rbx
cmp qword [reloc.WSOCK32.dll_getsockopt], 8
cmovae rdx, qword [0x180157f98]
lea rcx, str.AFPLUSLMD_LICENSE_FILE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x180001d77
lea r9d, [rax + 0x10]
lea r8, str.AFWIN
lea rdx, str.Envirnoment_variable__AFPLUSLMD_LICENSE_FILE__define_failed_
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x180001f05
cmp qword [reloc.WSOCK32.dll_getsockopt], 8
cmovae rbx, qword [0x180157f98]
mov rdx, rbx
lea rcx, str.AFRLM_LICENSE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x180001dba
lea r9d, [rax + 0x10]
lea r8, str.AFWIN
lea rdx, str.Envirnoment_variable__AFRLM_LICENSE__define_failed_
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x180001f05
call fcn.180001f50
mov dword [0x180156af4], eax
xor ecx, ecx
cmp eax, 0xffffffff
jne 0x180001de9
lea r9d, [rax + 0x11]
lea r8, str.AFWIN
lea rdx, [0x180120ac8]
call qword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x180001f05
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
call fcn.180015fa0
mov qword [0x180239590], rax
call fcn.180016250
call fcn.180018780
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
call fcn.180018cb0
cmp qword [0x180239590], 0
je 0x180001e33
lea rdx, [0x1800020f0]
lea rcx, [0x180239590]
call fcn.180017d70
call fcn.180018800
mov rdi, qword [0x180157fc8]
cmp qword [reloc.WSOCK32.dll_getsockopt], 8
cmovae rsi, qword [0x180157fb8]
mov eax, edi
inc eax
movsxd rcx, eax
call fcn.180006414
mov rbx, rax
lea ecx, [rdi + 1]
movsxd r8, ecx
xor edx, edx
mov rcx, rax
call fcn.18000abd0
test edi, edi
jle 0x180001e92
mov rcx, rbx
mov edx, edi
nop word [rax + rax]
movzx eax, byte [rsi]
mov byte [rcx], al
lea rsi, [rsi + 2]
lea rcx, [rcx + 1]
dec rdx
jne 0x180001e80
movsxd rax, edi
mov byte [rax + rbx], 0
xor r8d, r8d
mov rdx, rbx
lea rcx, [0x180120860]
call fcn.18001a3f0
mov qword [0x180239a38], rax
mov rcx, rax
call fcn.180021f40
mov edi, eax
mov rcx, rbx
call fcn.1800068a8
test edi, edi
je 0x180001eff
lea r8, str.Steup
lea rcx, [rbp + 0x370]
call fcn.180001450
mov r9d, setsockopt
lea r8, str.CatiaV5_RLM_License_Error
lea rdx, [rbp + 0x370]
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
mov ecx, edi
call fcn.1800077f4
int3
mov r15d, 1
cmp qword [rsp + 0x48], 8
jb 0x180001f17
mov rcx, qword [rsp + 0x30]
call fcn.180005840
mov eax, r15d
mov rcx, qword [rbp + 0xb70]
xor rcx, rsp
call fcn.180005860
lea r11, [rsp + 0xc80]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
sub rsp, 0x28
cmp edx, 1
jne 0x180003758
call qword [sym.imp.KERNEL32.dll_DisableThreadLibraryCalls]
add rsp, 0x28
jmp 0x1800019f0
test edx, edx
jne 0x180003761
call fcn.180003540
mov eax, 1
add rsp, 0x28
ret