Function at 0x404080
Capabilities:
Check if file exists
Copy file
Delete file
Query or enumerate registry value
Set registry value
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4118d6
mov eax, dword fs:[0]
push eax
sub esp, 0x458
mov eax, dword [0x41b00c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
call fcn.00401a70
mov ecx, eax
test ecx, ecx
je 0x404b3f
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x43c], eax
push str.RzSvcHost.exe
lea ecx, [ebp - 0x43c]
mov dword [ebp - 4], 0
call fcn.00401180
test al, al
jne 0x4040fb
push 0xd
push str.RzSvcHost.exe
lea ecx, [ebp - 0x43c]
call fcn.004014c0
mov dword [ebp - 4], 1
mov esi, dword [ebp - 0x43c]
push esi
push 0x20b
push str.c:workspacechromasdkRC3.36CoreSDKServiceChromaSDKService.cpp
push 4
call fcn.0040ba10
push eax
call fcn.0040bed0
mov eax, dword [esi - 0xc]
lea ecx, [ebp - 0x43c]
add esp, 0x14
add eax, 0xfffffffc
push eax
lea eax, [ebp - 0x454]
push eax
call fcn.00401060
mov byte [ebp - 4], 2
push dword [ebp - 0x454]
push 0x20e
push str.c:workspacechromasdkRC3.36CoreSDKServiceChromaSDKService.cpp
push 4
call fcn.0040ba10
push eax
call fcn.0040bed0
add esp, 0x14
call fcn.00401a70
mov ecx, eax
test ecx, ecx
je 0x404b49
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x440], eax
push edi
lea ecx, [ebp - 0x440]
mov byte [ebp - 4], 3
call fcn.00401180
test al, al
jne 0x4041bc
test edi, edi
jne 0x404199
xor ecx, ecx
jmp 0x4041af
mov ecx, edi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4041a0
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x440]
call fcn.004014c0
mov byte [ebp - 4], 4
mov edi, dword [ebp - 0x440]
push edi
push 0x211
push str.c:workspacechromasdkRC3.36CoreSDKServiceChromaSDKService.cpp
push 4
call fcn.0040ba10
push eax
call fcn.0040bed0
add esp, 0x14
call fcn.00401a70
mov ecx, eax
test ecx, ecx
je 0x404b53
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x42c], eax
push 0x4136c8
lea ecx, [ebp - 0x42c]
mov byte [ebp - 4], 5
call fcn.00401180
test al, al
jne 0x404228
push 0x19
push 0x4136c8
lea ecx, [ebp - 0x42c]
call fcn.004014c0
push str._services_rzsdkservice.exe_
lea edx, [ebp - 0x42c]
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x464]
call fcn.004069f0
add esp, 4
lea ecx, [ebp - 0x454]
mov byte [ebp - 4], 7
push ecx
mov edx, eax
lea ecx, [ebp - 0x460]
call fcn.00406bb0
add esp, 4
push 0x4136c4
mov edx, eax
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x45c]
call fcn.004069f0
add esp, 4
lea ecx, [ebp - 0x440]
mov byte [ebp - 4], 9
push ecx
mov edx, eax
lea ecx, [ebp - 0x450]
call fcn.00406bb0
add esp, 4
mov byte [ebp - 4], 0xb
or ebx, 0xffffffff
mov edx, dword [ebp - 0x45c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4042b8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xc
mov eax, ebx
mov edx, dword [ebp - 0x460]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4042d9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xd
mov eax, ebx
mov edx, dword [ebp - 0x464]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4042fa
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xe
mov eax, ebx
mov edx, dword [ebp - 0x42c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40431b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x450]
push 0x214
push str.c:workspacechromasdkRC3.36CoreSDKServiceChromaSDKService.cpp
push 4
call fcn.0040ba10
push eax
call fcn.0040bed0
add esp, 0x14
mov dword [ebp - 0x434], 0
lea eax, [ebp - 0x434]
push eax
push 0xf023f
push 0
push dword [ebp - 0x450]
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4046c4
mov byte [ebp - 0x42d], al
lea eax, [ebp - 0x42c]
push eax
lea eax, [ebp - 0x42d]
mov dword [ebp - 0x42c], 1
push eax
push 0
push 0
push str.State
push dword [ebp - 0x434]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4047c7
cmp byte [ebp - 0x42d], 2
je 0x404675
mov dword [ebp - 0x428], eax
lea eax, [ebp - 0x42c]
push eax
lea eax, [ebp - 0x428]
mov dword [ebp - 0x42c], 4
push eax
push 0
push 0
push 0x414d14
push dword [ebp - 0x434]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4047ab
push dword [ebp - 0x428]
push eax
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x438], eax
test eax, eax
je 0x40477c
push eax
push edi
push str._s_process_handle0x_08X
push 0x22c
push str.c:workspacechromasdkRC3.36CoreSDKServiceChromaSDKService.cpp
push 4
call fcn.0040ba10
push eax
call fcn.0040bed0
add esp, 0x1c
lea eax, [ebp - 0x424]
push 0x208
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x44c], 0x104
lea eax, [ebp - 0x44c]
push eax
lea eax, [ebp - 0x424]
push eax
push 0
push dword [ebp - 0x438]
call dword [sym.imp.KERNEL32.dll_QueryFullProcessImageNameW]
cmp eax, 1
jne 0x40475d
call fcn.00401a70
mov ecx, eax
test ecx, ecx
je 0x404b5d
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x444], eax
lea eax, [ebp - 0x424]
mov byte [ebp - 4], 0xf
push eax
lea ecx, [ebp - 0x444]
call fcn.00401180
test al, al
jne 0x4044d7
lea ecx, [ebp - 0x424]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4044b5
sub ecx, edx
lea eax, [ebp - 0x424]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x444]
call fcn.004014c0
mov byte [ebp - 4], 0x10
mov esi, dword [edi - 0xc]
test esi, esi
js 0x404b71
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, esi
or eax, ecx
jge 0x404509
push esi
lea ecx, [ebp - 0x440]
call fcn.00401450
mov edi, dword [ebp - 0x440]
lea eax, [esi + 1]
push eax
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsupr_s]
add esp, 8
cmp esi, dword [edi - 8]
jg 0x404b71
mov dword [edi - 0xc], esi
xor eax, eax
mov word [edi + esi*2], ax
mov esi, dword [ebp - 0x444]
mov edx, dword [esi - 0xc]
mov dword [ebp - 0x448], edx
test edx, edx
js 0x404b71
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x404569
push edx
lea ecx, [ebp - 0x444]
call fcn.00401450
mov esi, dword [ebp - 0x444]
mov edx, dword [ebp - 0x448]
lea eax, [edx + 1]
push eax
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsupr_s]
mov eax, dword [ebp - 0x448]
add esp, 8
cmp eax, dword [esi - 8]
jg 0x404b71
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp dword [esi - 0xc], ecx
jl 0x4045ff
push edi
push esi
call dword [sym.imp.VCRUNTIME140.dll_wcsstr]
add esp, 8
test eax, eax
je 0x4045ff
sub eax, esi
sar eax, 1
test eax, eax
jle 0x4045ff
push dword [ebp - 0x438]
push str.Calling_TerminateProcess_0x_08X__0_
push 0x237
push str.c:workspacechromasdkRC3.36CoreSDKServiceChromaSDKService.cpp
push 4
call fcn.0040ba10
push eax
call fcn.0040bed0
add esp, 0x18
push 0
push dword [ebp - 0x438]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp eax, 1
je 0x404654
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x23b
push ecx
call eax
push eax
call fcn.0040ba10
mov ecx, eax
call fcn.0040b350
jmp 0x404654
push dword [ebp - 0x428]
push dword [ebp - 0x438]
push str.This_process__0x_08X__with_PID___ld__was_not_what_we_wanted._Skipped_
push 0x240
push str.c:workspacechromasdkRC3.36CoreSDKServiceChromaSDKService.cpp
push 2
call fcn.0040ba10
push eax
call fcn.0040bed0
add esp, 0x1c
mov dword [ebp - 0x428], 0
lea eax, [ebp - 0x428]
push dword [ebp - 0x42c]
push eax
push 4
push 0x414d14
push dword [ebp - 0x434]
call dword [sym.imp.ADVAPI32.dll_RegSetValueW]
mov byte [ebp - 4], 0xe
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40466f
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x43c]
push 4
lea eax, [ebp - 0x458]
mov dword [ebp - 0x458], 0
push eax
push 4
push 0
push str.Retries
push dword [ebp - 0x434]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x4046b8
push 0x260
push str.c:workspacechromasdkRC3.36CoreSDKServiceChromaSDKService.cpp
push eax
call fcn.0040ba10
mov ecx, eax
call fcn.0040c410
push dword [ebp - 0x434]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x434]
push eax
push 0xf023f
push 0
push 0x4136c8
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x42c], eax
test eax, eax
jne 0x404aa2
push 0x208
push eax
lea eax, [ebp - 0x21c]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x458], 0x208
lea eax, [ebp - 0x458]
push eax
lea eax, [ebp - 0x21c]
push eax
push 0
push 0
push 0x415718
push dword [ebp - 0x434]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0x42c], eax
test eax, eax
jne 0x404a96
lea eax, [ebp - 0x428]
mov dword [ebp - 0x44c], eax
call fcn.00401a70
mov ecx, eax
test ecx, ecx
je 0x404b67
jmp 0x4047ce
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x248
push ecx
call eax
push eax
call fcn.0040ba10
mov ecx, eax
call fcn.0040b350
jmp 0x404675
push dword [ebp - 0x42c]
lea eax, [ebp - 0x428]
mov dword [ebp - 0x428], 0
push eax
push 4
push 0x414d14
push dword [ebp - 0x434]
call dword [sym.imp.ADVAPI32.dll_RegSetValueW]
jmp 0x404675
push 0x253
push str.c:workspacechromasdkRC3.36CoreSDKServiceChromaSDKService.cpp
push eax
call fcn.0040ba10
mov ecx, eax
call fcn.0040c410
jmp 0x404675
push 0x259
jmp 0x4047b0
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x428], eax
lea eax, [ebp - 0x21c]
mov byte [ebp - 4], 0x11
push eax
lea ecx, [ebp - 0x428]
call fcn.00401180
test al, al
jne 0x404822
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404800
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x428]
call fcn.004014c0
mov byte [ebp - 4], 0x12
mov edx, 1
mov eax, dword [ebp - 0x428]
mov ecx, dword [eax - 8]
sub edx, dword [eax - 4]
sub ecx, 0x104
or ecx, edx
jge 0x404857
push 0x104
lea ecx, [ebp - 0x428]
call fcn.00401450
mov eax, dword [ebp - 0x428]
push str._bin_
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov eax, dword [ebp - 0x428]
test eax, eax
jne 0x404871
xor ecx, ecx
jmp 0x40488e
push dword [eax - 8]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsnlen]
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x404b71
mov eax, dword [ebp - 0x428]
cmp ecx, dword [eax - 8]
jg 0x404b71
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebp - 0x428]
mov word [eax + ecx*2], dx
mov edx, 1
mov eax, dword [ebp - 0x428]
mov ecx, dword [eax - 8]
sub edx, dword [eax - 4]
sub ecx, 0x104
or ecx, edx
jge 0x4048d7
push 0x104
lea ecx, [ebp - 0x428]
call fcn.00401450
mov eax, dword [ebp - 0x428]
push edi
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov eax, dword [ebp - 0x428]
test eax, eax
jne 0x4048ed
xor ecx, ecx
jmp 0x40490a
push dword [eax - 8]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsnlen]
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x404b71
mov eax, dword [ebp - 0x428]
cmp ecx, dword [eax - 8]
jg 0x404b71
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebp - 0x428]
mov word [eax + ecx*2], dx
push dword [ebp - 0x428]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40493e
push dword [ebp - 0x428]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
call fcn.00401a70
mov ecx, eax
test ecx, ecx
je 0x404b7b
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x438], eax
lea eax, [ebp - 0x21c]
mov byte [ebp - 4], 0x13
push eax
lea ecx, [ebp - 0x438]
call fcn.00401180
test al, al
jne 0x4049a2
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404980
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x438]
call fcn.004014c0
push str._bin_
lea edx, [ebp - 0x438]
mov byte [ebp - 4], 0x14
lea ecx, [ebp - 0x44c]
call fcn.004069f0
add esp, 4
lea ecx, [ebp - 0x43c]
mov byte [ebp - 4], 0x15
push ecx
mov edx, eax
lea ecx, [ebp - 0x448]
call fcn.00406bb0
add esp, 4
mov byte [ebp - 4], 0x17
mov eax, ebx
mov edx, dword [ebp - 0x44c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4049fb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x18
mov eax, ebx
mov edx, dword [ebp - 0x438]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404a1c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0
push dword [ebp - 0x428]
push dword [ebp - 0x448]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
cmp eax, 1
je 0x404a54
push 0x27e
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040ba10
mov ecx, eax
call fcn.0040b350
mov dword [ebp - 0x42c], eax
mov byte [ebp - 4], 0x12
mov eax, ebx
mov edx, dword [ebp - 0x448]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404a75
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xe
mov eax, ebx
mov edx, dword [ebp - 0x428]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404a96
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x434]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 4
mov eax, ebx
mov edx, dword [ebp - 0x450]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404ac3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x404ade
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov eax, ebx
mov edx, dword [ebp - 0x454]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404aff
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x404b1b
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x42c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004102d8
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.00401b70
push 0x80004005
call fcn.00401b70
push 0x80004005
call fcn.00401b70
push 0x80004005
call fcn.00401b70
push 0x80004005
call fcn.00401b70
push 0x80070057
call fcn.00401b70
push 0x80004005
call fcn.00401b70
int3