Function at 0x14003f0f0
Capabilities:
Check if file exists
Get common file path
Get hostname
Query or enumerate registry value
Set registry value

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x828]
sub rsp, 0x900
mov qword [rbp - 0x80], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x140121ef0]
xor rax, rsp
mov qword [rbp + 0x7f8], rax
mov r14, rcx
mov dword [rsp + 0x44], reloc.WS2_32.dll_recv
xor r12d, r12d
mov word [rbp + 0x7d8], r12w
xor eax, eax
mov qword [rbp + 0x7da], rax
mov qword [rbp + 0x7e2], rax
mov qword [rbp + 0x7ea], rax
mov dword [rbp + 0x7f2], eax
mov word [rbp + 0x7f6], ax
lea rdx, [rsp + 0x44]
lea rcx, [rbp + 0x7d8]
call qword [sym.imp.KERNEL32.dll_GetComputerNameW]
mov r15d, eax
lea edx, [r12 + 0x10]
lea rcx, [rbp + 0x7d8]
call qword [sym.imp.MSVCR110.dll__wcslwr_s]
mov dword [rsp + 0x44], r12d
mov qword [rbp - 0x60], 7
mov qword [rbp - 0x68], r12
mov word [rbp - 0x78], r12w
xor r8d, r8d
lea rdx, [0x1400d7400]
lea rcx, [rbp - 0x78]
call fcn.140003310
nop
lea r8, [rsp + 0x44]
xor edx, edx
lea ecx, [rdx + 3]
call qword [sym.imp.KERNEL32.dll_GetComputerNameExW]
or rsi, 0xffffffffffffffff
test eax, eax
jne 0x14003f26f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x14003f26f
mov eax, dword [rsp + 0x44]
test eax, eax
je 0x14003f26f
lea ecx, [rax + 1]
mov eax, 2
mul rcx
cmovo rax, rsi
mov rcx, rax
call sub.mfc110u.dll_Ordinal_265
mov rbx, rax
mov ecx, dword [rsp + 0x44]
inc ecx
add rcx, rcx
mov rdi, rax
xor eax, eax
rep stosb byte [rdi], al
lea r8, [rsp + 0x44]
mov rdx, rbx
lea ecx, [rsi + 4]
call qword [sym.imp.KERNEL32.dll_GetComputerNameExW]
test eax, eax
je 0x14003f267
mov edx, dword [rsp + 0x44]
inc edx
mov rcx, rbx
call qword [sym.imp.MSVCR110.dll__wcslwr_s]
cmp word [rbx], r12w
jne 0x14003f247
mov r8d, r12d
jmp 0x14003f25b
mov r8, rsi
nop word [rax + rax]
inc r8
cmp word [rbx + r8*2], 0
jne 0x14003f250
mov rdx, rbx
lea rcx, [rbp - 0x78]
call fcn.140004d20
mov rcx, rbx
call sub.mfc110u.dll_Ordinal_266
test r15d, r15d
je 0x14003f35b
lea rcx, [r14 + 0x6498]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [rbp + 0x7c0], eax
lea rdx, [rbp + 0x7d8]
lea rcx, [rbp + 0x7c8]
call qword [sym.imp.mfc110u.dll_Ordinal_286]
nop
lea rdx, [rbp + 0x7c0]
lea rcx, [r14 + 0x14e8]
call fcn.140030380
lea r9, [rax + 0x20]
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rsp + 0x58]
lea rcx, [r14 + 0x14e8]
call fcn.140030960
nop
lea rcx, [rbp + 0x7c8]
call qword [sym.imp.mfc110u.dll_Ordinal_1027]
cmp qword [rbp - 0x68], 0
je 0x14003f34c
lea rdx, [rbp - 0x78]
cmp qword [rbp - 0x60], 8
cmovae rdx, qword [rbp - 0x78]
mov dword [rbp + 0x7c0], r12d
lea rcx, [rbp + 0x7c8]
call qword [sym.imp.mfc110u.dll_Ordinal_286]
nop
lea rdx, [rbp + 0x7c0]
lea rcx, [r14 + 0x14e8]
call fcn.140030380
lea r9, [rax + 0x20]
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, [rsp + 0x58]
lea rcx, [r14 + 0x14e8]
call fcn.140030960
nop
lea rcx, [rbp + 0x7c8]
call qword [sym.imp.mfc110u.dll_Ordinal_1027]
lea rcx, [r14 + 0x6488]
mov rax, qword [rcx]
call qword [rax + gethostname]
jmp 0x14003f36a
lea rdx, str.The_local_HostName_can_not_be_found
mov rcx, r14
call fcn.14004c390
mov qword [rsp + 0x50], r12
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.SoftwareSIEMENSAUTSWGlobal
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x14003f3d4
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rax, str.SharedPathKeyNotFound
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x30]
lea rcx, [rbp + 0x7c0]
call qword [sym.imp.MSVCR110.dll_public:_void___cdecl_std::exception::constructor_char_const__const___ptr64_const____ptr64____ptr64]
lea rdx, [0x14011cb80]
lea rcx, [rbp + 0x7c0]
call fcn.1400bb178
int3
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x3c]
xor r8d, r8d
lea rdx, str.SharedPath
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x14003f43b
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rax, str.SharedPathKeyNotFound
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x30]
lea rcx, [rbp + 0x7c0]
call qword [sym.imp.MSVCR110.dll_public:_void___cdecl_std::exception::constructor_char_const__const___ptr64_const____ptr64____ptr64]
lea rdx, [0x14011cb80]
lea rcx, [rbp + 0x7c0]
call fcn.1400bb178
int3
lea r15, [r14 + 6]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x3c]
xor r8d, r8d
lea rdx, str.SharedPath
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x14003f4b3
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea rax, str.SharedPathKeyNotFound
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x30]
lea rcx, [rbp + 0x7c0]
call qword [sym.imp.MSVCR110.dll_public:_void___cdecl_std::exception::constructor_char_const__const___ptr64_const____ptr64____ptr64]
lea rdx, [0x14011cb80]
lea rcx, [rbp + 0x7c0]
call fcn.1400bb178
int3
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 0x20219
xor r8d, r8d
lea rdx, str.SoftwareSIEMENSAUTSWGlobal
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14003f54c
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x3c]
xor r8d, r8d
lea rdx, str.SharedPath
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14003f54c
lea rbx, [r14 + 0x210]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x3c]
xor r8d, r8d
lea rdx, str.SharedPath
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x14003f564
lea rbx, [r14 + 0x210]
mov r8, r15
mov edx, Ordinal_265
mov rcx, rbx
call qword [sym.imp.MSVCR110.dll_wcscpy_s]
lea rdx, [0x1400ddd78]
mov rcx, r15
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
jne 0x14003f5aa
lea rax, str.PathAppendFailed
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x30]
lea rcx, [rbp + 0x7c0]
call qword [sym.imp.MSVCR110.dll_public:_void___cdecl_std::exception::constructor_char_const__const___ptr64_const____ptr64____ptr64]
lea rdx, [0x14011cb80]
lea rcx, [rbp + 0x7c0]
call fcn.1400bb178
int3
mov rcx, r15
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x14003f5e9
lea rax, str.SharedPathNotFound
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x30]
lea rcx, [rbp + 0x7c0]
call qword [sym.imp.MSVCR110.dll_public:_void___cdecl_std::exception::constructor_char_const__const___ptr64_const____ptr64____ptr64]
lea rdx, [0x14011cb80]
lea rcx, [rbp + 0x7c0]
call fcn.1400bb178
int3
lea rdx, [0x1400ddd78]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
jne 0x14003f62f
lea rax, str.PathAppendWOWFailed
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x30]
lea rcx, [rbp + 0x7c0]
call qword [sym.imp.MSVCR110.dll_public:_void___cdecl_std::exception::constructor_char_const__const___ptr64_const____ptr64____ptr64]
lea rdx, [0x14011cb80]
lea rcx, [rbp + 0x7c0]
call fcn.1400bb178
int3
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ecx, r12d
test eax, eax
setne cl
test ecx, ecx
jne 0x14003f676
lea rax, str.SharedPathWOWNotFound
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x30]
lea rcx, [rbp + 0x7c0]
call qword [sym.imp.MSVCR110.dll_public:_void___cdecl_std::exception::constructor_char_const__const___ptr64_const____ptr64____ptr64]
lea rdx, [0x14011cb80]
lea rcx, [rbp + 0x7c0]
call fcn.1400bb178
int3
xor r9d, r9d
lea r8d, [r9 + 0x23]
lea rdx, [r14 + 0x41a]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea r8, [r14 + 0x41a]
mov edx, Ordinal_265
lea rcx, [r14 + 0x624]
call qword [sym.imp.MSVCR110.dll_wcscpy_s]
lea rdx, str.SiemensAutomationAutomation_License_Manager
lea rcx, [r14 + 0x41a]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
lea rdx, str.SiemensAutomationSWS
lea rcx, [r14 + 0x624]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
mov qword [rsp + 0x48], r12
mov dword [rsp + 0x38], r12d
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, str.SOFTWARESiemensSWSCommonData
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14003fb7a
mov qword [rsp + 0x30], r12
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov r9d, 0x2001f
xor r8d, r8d
lea rdx, str.NetWork
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14003fb41
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x3c]
xor r8d, r8d
lea rdx, str.ClientOnly
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14003f7b4
cmp dword [rsp + 0x3c], 4
jne 0x14003f7b4
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x3c]
xor r8d, r8d
lea rdx, str.ClientOnly
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea rdi, [r14 + 0x14f8]
mov eax, r12d
cmp dword [rsp + 0x38], eax
setne al
mov dword [rdi], eax
mov dword [rsp + 0x38], r12d
jmp 0x14003f7e3
lea rdi, [r14 + 0x14f8]
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rdi
mov r9d, 4
xor r8d, r8d
lea rdx, str.ClientOnly
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rdi
mov r9d, 4
xor r8d, r8d
lea rdx, str.ClientOnlyActive
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
xor dil, dil
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x3c]
xor r8d, r8d
lea rdx, str.TCPPort
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14003f879
cmp dword [rsp + 0x3c], 4
jne 0x14003f879
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x3c]
xor r8d, r8d
lea rdx, str.TCPPort
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dil, 1
mov ecx, dword [rsp + 0x38]
jmp 0x14003f880
mov ecx, r12d
mov dword [rsp + 0x38], ecx
mov eax, ecx
shr eax, 0x10
test ax, ax
jne 0x14003f892
test ecx, ecx
jne 0x14003f933
mov dword [rsp + 0x38], 0x113a
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.TCPPort
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x14003f90f
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rax, str.Registry_is_corrupted__TCPPort_
mov qword [rsp + 0x58], rax
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x68]
call qword [sym.imp.MSVCR110.dll_public:_void___cdecl_std::exception::constructor_char_const__const___ptr64_const____ptr64____ptr64]
lea rdx, [0x14011cb80]
lea rcx, [rsp + 0x68]
call fcn.1400bb178
int3
test dil, dil
je 0x14003f933
mov edx, 2
mov rcx, qword [0x140122018]
add rcx, 0xc0
lea r8, str.Registry_is_corrupted__TCPPort___Port_reset_to_default_4410.
call fcn.14006a5c0
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.TCPPortActive
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x14003f9a8
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rax, str.Registry_couldnt_be_updated__TCPPort_
mov qword [rsp + 0x58], rax
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x68]
call qword [sym.imp.MSVCR110.dll_public:_void___cdecl_std::exception::constructor_char_const__const___ptr64_const____ptr64____ptr64]
lea rdx, [0x14011cb80]
lea rcx, [rsp + 0x68]
call fcn.1400bb178
int3
mov r9d, 0xa
lea r8d, [r9 - 4]
lea rdx, [rbp + 0x7c0]
mov ecx, dword [rsp + 0x38]
call qword [sym.imp.MSVCR110.dll__ultow_s]
lea rcx, [rbp + 0x7d8]
mov rax, rsi
nop dword [rax]
inc rax
cmp word [rcx + rax*2], 0
jne 0x14003f9d0
cmp rax, 0x401
jae 0x14003fa2e
lea rcx, [rbp + 0x7c0]
mov rax, rsi
nop dword [rax]
inc rax
cmp word [rcx + rax*2], 0
jne 0x14003f9f0
cmp rax, 6
jae 0x14003fa2e
lea r8, [rbp + 0x7d8]
mov edx, Ordinal_1027
lea rcx, [rbp - 0x50]
call qword [sym.imp.MSVCR110.dll_wcscpy_s]
mov edx, Ordinal_1027
lea rcx, [rbp - 0x50]
call qword [sym.imp.MSVCR110.dll__wcslwr_s]
lea r8, [rbp + 0x7c0]
jmp 0x14003fa3a
mov word [rbp - 0x50], r12w
lea r8, [0x1400d4f98]
mov edx, 6
lea rcx, [rbp + 0x7b2]
call qword [sym.imp.MSVCR110.dll_wcscpy_s]
lea rdi, [r14 + 0xcd8]
lea rax, [rbp - 0x50]
cmp rax, rdi
je 0x14003fa9e
lea rax, [rbp - 0x50]
inc rsi
cmp word [rax + rsi*2], 0
jne 0x14003fa60
cmp rsi, 0x401
jae 0x14003fa9e
lea r8, [rbp - 0x50]
mov edx, Ordinal_1027
mov rcx, rdi
call qword [sym.imp.MSVCR110.dll_wcscpy_s]
lea rcx, [rdi + 0x802]
lea r8, [rbp + 0x7b2]
mov edx, 6
call qword [sym.imp.MSVCR110.dll_wcscpy_s]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x3c]
xor r8d, r8d
lea rdx, str.ProductionServer
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14003fb17
cmp dword [rsp + 0x3c], 4
jne 0x14003fb17
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x3c]
xor r8d, r8d
lea rdx, str.ProductionServer
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp dword [rsp + 0x38], 0
setne al
mov byte [r14 + 4], al
lea rcx, [r14 + 0xc38]
call fcn.14005d780
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
cmp qword [rbp - 0x60], 8
jb 0x14003fba8
mov rcx, qword [rbp - 0x78]
call sub.mfc110u.dll_Ordinal_1482
jmp 0x14003fba8
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rax, str.Registry_is_corrupted__TCPPort_
mov qword [rsp + 0x58], rax
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x68]
call qword [sym.imp.MSVCR110.dll_public:_void___cdecl_std::exception::constructor_char_const__const___ptr64_const____ptr64____ptr64]
lea rdx, [0x14011cb80]
lea rcx, [rsp + 0x68]
call fcn.1400bb178
int3
lea rax, str.Registry_is_corrupted__CommonData_
mov qword [rsp + 0x58], rax
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x68]
call qword [sym.imp.MSVCR110.dll_public:_void___cdecl_std::exception::constructor_char_const__const___ptr64_const____ptr64____ptr64]
lea rdx, [0x14011cb80]
lea rcx, [rsp + 0x68]
call fcn.1400bb178
nop
mov rcx, qword [rbp + 0x7f8]
xor rcx, rsp
call fcn.1400bb310
lea r11, [rsp + 0x900]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret