Function at 0x403840
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x596c60]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0xff
xor ebx, ebx
lea eax, [ebp - 0x1cb]
push ebx
push eax
mov byte [ebp - 0x1cc], 0
call fcn.0050c510
add esp, 0xc
cmp esi, ebx
je 0x4038ee
cmp dword [esi], 0x53464348
jne 0x4038ee
cmp dword [esi + 0x958], 0x10
jl 0x4038ee
push 0x59fd40
call fcn.00410be0
add esp, 4
test eax, eax
je 0x4038ee
push esi
push str.args__p_
call fcn.0040feb0
push str.ts_generate_client_id
push str._s_ENTER
lea ecx, [ebp - 0xcc]
push 0xc8
push ecx
mov edi, eax
call fcn.00410530
push edi
push 0x6e
push str.D:BUILD_478059BUILDTS_SDKTS_SDK_SRC_source_ts_ts_handle.c
lea edx, [ebp - 0xcc]
push edx
push 0x200
push 0x10
push esi
call fcn.0040fee0
push 0x59fd40
call fcn.00410c00
add esp, 0x38
lea eax, [ebp - 0x228]
push eax
push 0x20119
push ebx
push str.SOFTWAREMicrosoftCryptography
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x22c], 0x100
mov dword [ebp - 0x228], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x403a8b
cmp esi, ebx
je 0x4039f3
cmp dword [esi], 0x53464348
jne 0x4039f3
cmp dword [esi + 0x958], 0xf
jl 0x4039f3
push 0x59fd40
call fcn.00410be0
add esp, 4
test eax, eax
je 0x4039f3
push str.RegOpenKeyEx_failed_in_ts_generate_client_id
call fcn.0040feb0
or ecx, 0xffffffff
add esp, 4
cmp ecx, str.ts_generate_client_id
mov edi, eax
jne 0x403999
push str.ts_generate_client_id
push str._s_ENTER
lea edx, [ebp - 0xcc]
push 0xc8
push edx
call fcn.00410530
add esp, 0x10
lea eax, [ebp - 0xcc]
jmp 0x4039d0
mov eax, 0xfffffffe
cmp eax, str.ts_generate_client_id
jne 0x4039cb
push str.ts_generate_client_id
push str._s_EXIT
lea ecx, [ebp - 0xcc]
push 0xc8
push ecx
call fcn.00410530
add esp, 0x10
lea eax, [ebp - 0xcc]
jmp 0x4039d0
mov eax, str.ts_generate_client_id
push edi
push 0x76
push str.D:BUILD_478059BUILDTS_SDKTS_SDK_SRC_source_ts_ts_handle.c
push eax
push 0x200
push 0xf
push esi
call fcn.0040fee0
push 0x59fd40
call fcn.00410c00
add esp, 0x20
push esi
call fcn.00403660
add esp, 4
mov edi, eax
test esi, esi
je 0x403a78
cmp dword [esi], 0x53464348
jne 0x403a78
cmp dword [esi + 0x958], 0x10
jl 0x403a78
push 0x59fd40
call fcn.00410be0
add esp, 4
test eax, eax
je 0x403a78
push edi
push str.Returning__d
call fcn.0040feb0
push str.ts_generate_client_id
push str._s_EXIT
mov ebx, eax
lea eax, [ebp - 0xcc]
push 0xc8
push eax
call fcn.00410530
push ebx
push 0xbb
push str.D:BUILD_478059BUILDTS_SDKTS_SDK_SRC_source_ts_ts_handle.c
lea ecx, [ebp - 0xcc]
push ecx
push 0x200
push 0x10
push esi
call fcn.0040fee0
push 0x59fd40
call fcn.00410c00
add esp, 0x38
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005072fd
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x228]
lea edx, [ebp - 0x22c]
push edx
lea eax, [ebp - 0x1cc]
push eax
push ebx
push ebx
push str.MachineGuid
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x403abf
mov edi, dword [ebp - 0x22c]
add edi, 0xffffffff
jmp 0x403b95
cmp esi, ebx
je 0x403b93
cmp dword [esi], 0x53464348
jne 0x403b93
cmp dword [esi + 0x958], 0xf
jl 0x403b93
push 0x59fd40
call fcn.00410be0
add esp, 4
test eax, eax
je 0x403b93
push str.RegQueryValueEx_failed_in_ts_generate_client_id
call fcn.0040feb0
or edx, 0xffffffff
add esp, 4
cmp edx, str.ts_generate_client_id
mov edi, eax
jne 0x403b35
push str.ts_generate_client_id
push str._s_ENTER
lea eax, [ebp - 0xcc]
push 0xc8
push eax
call fcn.00410530
add esp, 0x10
lea eax, [ebp - 0xcc]
jmp 0x403b6d
mov ecx, 0xfffffffe
cmp ecx, str.ts_generate_client_id
jne 0x403b68
push str.ts_generate_client_id
push str._s_EXIT
lea edx, [ebp - 0xcc]
push 0xc8
push edx
call fcn.00410530
add esp, 0x10
lea eax, [ebp - 0xcc]
jmp 0x403b6d
mov eax, str.ts_generate_client_id
push edi
push 0x81
push str.D:BUILD_478059BUILDTS_SDKTS_SDK_SRC_source_ts_ts_handle.c
push eax
push 0x200
push 0xf
push esi
call fcn.0040fee0
push 0x59fd40
call fcn.00410c00
add esp, 0x20
xor edi, edi
mov eax, dword [ebp - 0x228]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, ebx
je 0x4039f3
lea ecx, [ebp - 0x224]
push ecx
call fcn.00411580
push edi
lea edx, [ebp - 0x1cc]
push edx
lea eax, [ebp - 0x224]
push eax
call fcn.00411d00
lea ecx, [ebp - 0x224]
push ecx
lea edx, [ebp - 0x1cc]
push edx
call fcn.00411e10
lea eax, [esi + 0x100ab0]
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
add esp, 0x18
mov dword [eax + 0x20], ecx
mov dword [eax + 0x24], ecx
xor edi, edi
mov dword [ebp - 0x228], eax
lea ecx, [ecx]
movzx eax, byte [ebp + ebx - 0x1cc]
mov edx, dword [ebp - 0x228]
push eax
mov ecx, 0x28
push 0x550bc4
sub ecx, edi
push ecx
push edx
call fcn.00410530
add dword [ebp - 0x228], 2
add edi, 2
add esp, 0x10
add ebx, 1
cmp edi, 0x20
jb 0x403c10
xor edi, edi
jmp 0x4039fe