Function at 0x41caf0
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b0ff3
mov eax, dword fs:[0]
push eax
sub esp, 0x4c8
mov eax, dword [0x4e5a30]
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 dword [ebp - 0x10], esp
lea eax, [ebp - 0x440]
mov esi, ecx
xor edi, edi
push eax
mov dword [ebp - 0x498], esi
mov dword [ebp - 0x4ac], edi
call fcn.0043c230
add esp, 4
mov dword [ebp - 4], edi
cmp dword [ebp - 0x430], edi
je 0x41d317
mov dword [ebp - 0x4bc], edi
mov dword [ebp - 0x4b8], edi
mov dword [ebp - 0x4b4], edi
push 1
push 0x4c2680
lea ecx, [ebp - 0x440]
mov byte [ebp - 4], 1
call fcn.00401a0a
push 0xe
push 0x4c14cc
lea ecx, [ebp - 0x440]
call fcn.00401a0a
push 1
push 0x4c2680
lea ecx, [ebp - 0x440]
call fcn.00401a0a
push 0x12
push str.UpdateClientState
lea ecx, [ebp - 0x440]
call fcn.00401a0a
mov ebx, 7
xor ecx, ecx
mov dword [ebp - 0x448], ebx
mov dword [ebp - 0x44c], edi
mov word [ebp - 0x45c], cx
lea edx, [ebp - 0x440]
push edx
push str.GetTorchLastRun_attempt_to_open_key
mov byte [ebp - 4], 2
call fcn.00440290
mov ecx, eax
call fcn.00402d1a
cmp dword [ebp - 0x42c], 8
mov eax, dword [ebp - 0x440]
jae 0x41cbf8
lea eax, [ebp - 0x440]
push 0x20219
push eax
push VariantInit
lea ecx, [ebp - 0x4bc]
call fcn.00401bef
test eax, eax
je 0x41cce6
cmp dword [ebp - 0x42c], 8
mov eax, dword [ebp - 0x440]
jae 0x41cc2b
lea eax, [ebp - 0x440]
push 0x20119
push eax
push VariantInit
lea ecx, [ebp - 0x4bc]
call fcn.00401bef
test eax, eax
je 0x41cce6
cmp dword [ebp - 0x42c], 8
jb 0x41cc60
mov eax, dword [ebp - 0x440]
mov dword [ebp - 0x498], eax
jmp 0x41cc6c
lea ecx, [ebp - 0x440]
mov dword [ebp - 0x498], ecx
lea edx, [ebp - 0x498]
push edx
push str.GetTorchLastRun_cannot_open
call fcn.00440290
mov ecx, eax
call fcn.00402ae0
xor eax, eax
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], edi
mov word [esi], ax
cmp dword [ebp - 0x448], 8
jb 0x41cca7
mov ecx, dword [ebp - 0x45c]
push ecx
call fcn.00468992
add esp, 4
mov eax, dword [ebp - 0x4bc]
xor edx, edx
mov dword [ebp - 0x448], ebx
mov dword [ebp - 0x44c], edi
mov word [ebp - 0x45c], dx
cmp eax, edi
je 0x41cccd
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x42c], 8
jb 0x41d355
mov eax, dword [ebp - 0x440]
push eax
jmp 0x41d34d
mov esi, dword [ebp - 0x4bc]
mov ebx, 0x104
mov dword [ebp - 0x4c8], ebx
mov dword [ebp - 0x4a8], edi
lea ecx, [ecx]
lea ecx, [ebp - 0x4d0]
push ecx
mov ecx, dword [ebp - 0x4a8]
push edi
push edi
push edi
lea edx, [ebp - 0x4c8]
push edx
lea eax, [ebp - 0x424]
push eax
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x41d2d9
mov dword [ebp - 0x4a4], edi
mov dword [ebp - 0x4a0], edi
mov dword [ebp - 0x49c], edi
push 0xffffffffffffffff
push edi
lea edx, [ebp - 0x440]
push edx
lea ecx, [ebp - 0x45c]
mov byte [ebp - 4], 3
call fcn.004015a5
push 1
push 0x4c2680
lea ecx, [ebp - 0x45c]
call fcn.00401a0a
lea eax, [ebp - 0x424]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x41cd74
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x424]
push eax
lea ecx, [ebp - 0x45c]
call fcn.00401a0a
lea ecx, [ebp - 0x45c]
push ecx
push str.GetTorchLastRun_attempt_to_open_key
call fcn.00440290
mov ecx, eax
call fcn.00402d1a
cmp dword [ebp - 0x448], 8
mov eax, dword [ebp - 0x45c]
jae 0x41cdc3
lea eax, [ebp - 0x45c]
push 0x20219
push eax
push VariantInit
lea ecx, [ebp - 0x4a4]
call fcn.00401bef
test eax, eax
je 0x41ce3c
cmp dword [ebp - 0x448], 8
mov eax, dword [ebp - 0x45c]
jae 0x41cdf2
lea eax, [ebp - 0x45c]
push 0x20119
push eax
push VariantInit
lea ecx, [ebp - 0x4a4]
call fcn.00401bef
test eax, eax
je 0x41ce3c
mov eax, dword [ebp - 0x4a4]
mov byte [ebp - 4], 2
cmp eax, edi
je 0x41cee8
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x4a8]
mov dword [ebp - 0x4a4], edi
mov dword [ebp - 0x4a0], edi
jmp 0x41cd00
mov esi, dword [ebp - 0x4a4]
lea eax, [ebp - 0x4c0]
push eax
lea edx, [ebx + ebx]
lea ecx, [ebp - 0x21c]
push ecx
mov dword [ebp - 0x4c0], edx
lea edx, [ebp - 0x4ac]
push edx
push edi
push str.lastrun
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, edi
jne 0x41ce9d
mov eax, dword [ebp - 0x4ac]
cmp eax, 1
je 0x41ce81
cmp eax, 2
jne 0x41ce9d
mov eax, dword [ebp - 0x4c0]
cmp eax, edi
je 0x41cef9
test al, 1
jne 0x41ce9d
mov ecx, eax
shr ecx, 1
cmp word [ebp + ecx*2 - 0x21e], di
je 0x41cf02
lea eax, [ebp - 0x45c]
push eax
push str.GetTorchLastRun_cannot_query_lastrun_from
call fcn.00440290
mov ecx, eax
call fcn.00401118
cmp esi, edi
je 0x41cec2
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
mov ebx, 0x104
mov dword [ebp - 0x4c8], ebx
mov byte [ebp - 4], 2
cmp esi, edi
je 0x41cee2
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x4a4], edi
mov esi, dword [ebp - 0x4bc]
inc dword [ebp - 0x4a8]
mov dword [ebp - 0x4a0], edi
jmp 0x41cd00
xor edx, edx
mov word [ebp - 0x21c], dx
shr eax, 1
mov dword [ebp - 0x4ac], eax
mov esi, 7
xor eax, eax
mov dword [ebp - 0x480], esi
mov dword [ebp - 0x484], edi
mov word [ebp - 0x494], ax
lea ecx, [ebp - 0x21c]
push ecx
push str.GetTorchLastRun_read_lastrun_value
mov byte [ebp - 4], 4
call fcn.00440290
mov ecx, eax
call fcn.0040230b
xor edx, edx
lea eax, [ebp - 0x21c]
mov word [ebp - 0x478], dx
mov byte [ebp - 4], 5
mov dword [ebp - 0x464], esi
mov dword [ebp - 0x468], edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x41cf62
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x478]
call fcn.004024be
push 0xa
lea ecx, [ebp - 0x478]
push edi
push ecx
mov byte [ebp - 4], 6
call fcn.00401299
add esp, 0xc
cmp dword [ebp - 0x464], 8
mov esi, eax
mov ebx, edx
mov byte [ebp - 4], 5
jb 0x41cfba
mov edx, dword [ebp - 0x478]
push edx
call fcn.00468992
add esp, 4
mov eax, esi
or eax, ebx
jne 0x41d115
lea ecx, [ebp - 0x478]
push ecx
call fcn.0043c230
add esp, 4
push eax
lea ecx, [ebp - 0x440]
mov byte [ebp - 4], 7
call fcn.00402338
cmp dword [ebp - 0x464], 8
jb 0x41cffb
mov edx, dword [ebp - 0x478]
push edx
call fcn.00468992
add esp, 4
mov dword [ebp - 0x4d4], edi
mov dword [ebp - 0x4d0], edi
mov dword [ebp - 0x4cc], edi
push 1
push 0x4c2680
lea ecx, [ebp - 0x440]
mov byte [ebp - 4], 8
call fcn.00401a0a
push 0xe
push 0x4c14cc
lea ecx, [ebp - 0x440]
call fcn.00401a0a
call fcn.00440290
lea ecx, [ebp - 0x440]
push ecx
push str.GetTorchLastRun_attempt_to_open_key
mov ecx, eax
call fcn.00402d1a
cmp dword [ebp - 0x42c], 8
mov eax, dword [ebp - 0x440]
jae 0x41d062
lea eax, [ebp - 0x440]
push 0x20219
push eax
push VariantInit
lea ecx, [ebp - 0x4a4]
call fcn.00401bef
test eax, eax
je 0x41d0ab
cmp dword [ebp - 0x42c], 8
mov eax, dword [ebp - 0x440]
jae 0x41d091
lea eax, [ebp - 0x440]
push 0x20119
push eax
push VariantInit
lea ecx, [ebp - 0x4a4]
call fcn.00401bef
test eax, eax
jne 0x41d111
lea edx, [ebp - 0x4ac]
push edx
lea eax, [ebp - 0x21c]
push eax
push str.tlastrun
lea ecx, [ebp - 0x4d4]
call fcn.00401857
test eax, eax
jne 0x41d111
lea ecx, [ebp - 0x21c]
push ecx
lea ecx, [ebp - 0x478]
call fcn.00401dca
push 0xa
lea edx, [ebp - 0x478]
push edi
push edx
mov byte [ebp - 4], 9
call fcn.00401299
add esp, 0xc
cmp dword [ebp - 0x464], 8
mov esi, eax
mov ebx, edx
jb 0x41d111
mov eax, dword [ebp - 0x478]
push eax
call fcn.00468992
add esp, 4
mov byte [ebp - 4], 5
mov eax, esi
mov ecx, ebx
mov edi, ebx
shld ecx, eax, 2
add eax, eax
add eax, eax
add esi, eax
adc edi, ecx
mov eax, edi
shld eax, esi, 1
mov dword [ebp - 0x4ac], eax
lea eax, [ebp - 0x4c4]
push eax
add esi, esi
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov edi, dword [ebp - 0x4c0]
mov ebx, dword [ebp - 0x4c4]
push edi
push ebx
lea ecx, [ebp - 0x21c]
push str._I64d
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
call fcn.00440290
lea edx, [ebp - 0x21c]
push edx
push str.GetTorchLastRun_now_time_is
mov ecx, eax
call fcn.00402f13
push 0
sub ebx, esi
sbb edi, dword [ebp - 0x4ac]
push 0x989680
push edi
push ebx
call fcn.0046a8a0
push 0
push 0x15180
push edx
push eax
call fcn.0046a8a0
push edx
push eax
lea eax, [ebp - 0x21c]
push str._I64d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
call fcn.00440290
lea ecx, [ebp - 0x21c]
push ecx
push str.GetTorchLastRun_diff_result_is
mov ecx, eax
call fcn.00402969
lea eax, [ebp - 0x21c]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41d1e0
sub eax, edx
sar eax, 1
push eax
lea edx, [ebp - 0x21c]
push edx
lea ecx, [ebp - 0x494]
call fcn.004024be
mov dword [ebp - 4], 4
mov esi, dword [ebp - 0x498]
lea ecx, [ebp - 0x494]
mov edi, 7
xor ebx, ebx
xor eax, eax
push ecx
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], ebx
mov ecx, esi
mov word [esi], ax
call fcn.00402338
cmp dword [ebp - 0x480], 8
jb 0x41d247
mov edx, dword [ebp - 0x494]
push edx
call fcn.00468992
add esp, 4
xor eax, eax
mov dword [ebp - 0x480], edi
mov dword [ebp - 0x484], ebx
mov word [ebp - 0x494], ax
cmp dword [ebp - 0x4a4], ebx
je 0x41d271
mov ecx, dword [ebp - 0x4a4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x448], 8
jb 0x41d289
mov edx, dword [ebp - 0x45c]
push edx
call fcn.00468992
add esp, 4
xor eax, eax
mov dword [ebp - 0x448], edi
mov dword [ebp - 0x44c], ebx
mov word [ebp - 0x45c], ax
cmp dword [ebp - 0x4bc], ebx
je 0x41d2b3
mov ecx, dword [ebp - 0x4bc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x42c], 8
jb 0x41d355
mov edx, dword [ebp - 0x440]
push edx
jmp 0x41d34d
cmp dword [ebp - 0x448], 8
jb 0x41d2f1
mov ecx, dword [ebp - 0x45c]
push ecx
call fcn.00468992
add esp, 4
xor edx, edx
mov dword [ebp - 0x448], 7
mov dword [ebp - 0x44c], edi
mov word [ebp - 0x45c], dx
cmp esi, edi
je 0x41d328
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x41d328
push str.GetTorchLastRun_LogonSIDString_is_empty
call fcn.00440290
mov ecx, eax
call fcn.00402a9a
mov esi, dword [ebp - 0x498]
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], edi
mov word [esi], ax
cmp dword [ebp - 0x42c], 8
jb 0x41d355
mov ecx, dword [ebp - 0x440]
push ecx
call fcn.00468992
add esp, 4
mov eax, esi
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.00469ca2
mov esp, ebp
pop ebp
ret