Function at 0x1004597
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x13c
mov eax, dword [0x100a018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push ebx
xor ebx, ebx
push edi
push eax
mov dword [ebp - 0x138], eax
mov dword [ebp - 0x13c], ecx
mov dword [ebp - 0x128], ebx
mov dword [ebp - 0x11c], ebx
mov dword [ebp - 0x134], ebx
mov dword [ebp - 0x130], ebx
call fcn.01008f6b
mov edi, eax
cmp edi, ebx
jne 0x1004f71
call fcn.01006fdf
mov edi, eax
cmp edi, ebx
jne 0x1004f71
mov eax, dword [0x100aac0]
mov dword [ebp - 0x118], ebx
mov dword [ebp - 0x10c], ebx
mov dword [ebp - 0x108], ebx
cmp eax, ebx
je 0x1004f71
mov ecx, dword [eax + 4]
jmp 0x100464e
inc dword [ebp - 0x118]
inc dword [ebp - 0x108]
je 0x100475a
mov edx, dword [ecx + 4]
jmp 0x1004648
inc dword [ebp - 0x10c]
inc dword [ebp - 0x108]
je 0x100475a
mov edx, dword [edx]
cmp edx, ebx
jne 0x1004634
mov ecx, dword [ecx]
cmp ecx, ebx
jne 0x100461d
mov eax, dword [eax]
cmp eax, ebx
jne 0x1004618
cmp dword [ebp - 0x108], ebx
je 0x1004f71
mov eax, dword [ebp - 0x108]
push 2
pop ecx
mul ecx
mov ecx, edx
sar ecx, 0x1f
test edx, edx
ja 0x100475a
mov dword [ebp - 0x108], eax
call fcn.01005daf
mov edi, eax
cmp edi, ebx
jne 0x1004f71
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x11c]
push eax
push 0x2001f
push ebx
push dword [0x100a02c]
push 0x80000002
call esi
mov edi, eax
cmp edi, ebx
jne 0x1004812
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x118]
push eax
push ebx
push dword [0x100a060]
mov dword [ebp - 0x118], ebx
push dword [ebp - 0x11c]
mov dword [ebp - 0x10c], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
cmp edi, ebx
jne 0x1004800
cmp dword [ebp - 0x118], 4
jne 0x1004752
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x12c]
push eax
lea eax, [ebp - 0x118]
push eax
push ebx
push dword [0x100a068]
mov dword [ebp - 0x118], ebx
push dword [ebp - 0x11c]
mov dword [ebp - 0x10c], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
cmp edi, ebx
jne 0x1004800
cmp dword [ebp - 0x118], 4
je 0x1004764
push 0xd
pop edi
jmp 0x1004800
mov edi, 0x216
jmp 0x1004f71
mov edx, dword [ebp - 0x110]
mov edi, dword [ebp - 0x12c]
lea eax, [edx + 1]
cmp eax, edi
jne 0x10047fb
mov eax, dword [ebp - 0x108]
lea ecx, [edx + eax]
cmp edx, ecx
jae 0x10047fb
add eax, edi
cmp edi, eax
jae 0x10047fb
push 4
mov dword [ebp - 0x12c], eax
lea eax, [ebp - 0x110]
push eax
push 4
push ebx
push dword [0x100a060]
mov dword [ebp - 0x110], ecx
push dword [ebp - 0x11c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
cmp edi, ebx
jne 0x10047de
push 4
lea eax, [ebp - 0x12c]
push eax
push 4
push ebx
push dword [0x100a068]
push dword [ebp - 0x11c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
mov eax, dword [ebp - 0x110]
mov dword [ebp - 0x12c], eax
push 2
pop eax
sub eax, dword [ebp - 0x108]
add dword [ebp - 0x110], eax
jmp 0x1004800
mov edi, 0x216
push dword [ebp - 0x11c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x11c], ebx
call fcn.01006050
cmp edi, ebx
jne 0x1004f70
lea eax, [ebp - 0x128]
push eax
push 0x2001f
push ebx
push dword [0x100a030]
push 0x80000002
call esi
mov edi, eax
cmp edi, ebx
je 0x10048a2
lea eax, [ebp - 0x11c]
push eax
push 0x2001f
push ebx
push dword [0x100a02c]
push 0x80000002
call esi
mov edi, eax
cmp edi, ebx
jne 0x1004f70
lea eax, [ebp - 0x134]
push eax
lea eax, [ebp - 0x128]
push eax
push ebx
push 0x2001f
push ebx
push ebx
push ebx
push dword [0x100a034]
push dword [ebp - 0x11c]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push dword [ebp - 0x11c]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, ebx
jne 0x1004f70
mov esi, dword [0x100aac0]
mov dword [ebp - 0x118], ebx
mov dword [ebp - 0x124], esi
cmp edi, ebx
jne 0x1004f70
jmp 0x10048c4
mov esi, dword [ebp - 0x124]
cmp esi, ebx
je 0x1004f70
call fcn.01005daf
mov edi, eax
cmp edi, ebx
jne 0x1004f4e
push 0x80
lea eax, [ebp - 0x84]
push ebx
push eax
call sub.msvcrt.dll_memset
movzx eax, byte [esi + 0x17]
push eax
movzx eax, byte [esi + 0x16]
push eax
movzx eax, byte [esi + 0x15]
push eax
movzx eax, byte [esi + 0x14]
push eax
movzx eax, byte [esi + 0x13]
push eax
movzx eax, byte [esi + 0x12]
push eax
movzx eax, byte [esi + 0x11]
push eax
movzx eax, byte [esi + 0x10]
push eax
movzx eax, word [esi + 0xe]
push eax
movzx eax, word [esi + 0xc]
push eax
push dword [esi + 8]
lea eax, [ebp - 0x84]
push 0x10015e0
push 0x40
push eax
call fcn.01003ee9
add esp, 0x44
lea eax, [ebp - 0x134]
push eax
lea eax, [ebp - 0x120]
push eax
push ebx
push 0x2001f
push ebx
push ebx
push ebx
lea eax, [ebp - 0x84]
push eax
push dword [ebp - 0x128]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, eax
cmp edi, ebx
jne 0x100499e
cmp dword [ebp - 0x134], 1
je 0x10049a9
push esi
push dword [ebp - 0x120]
call fcn.010075fb
push dword [ebp - 0x120]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x120], ebx
cmp edi, ebx
jne 0x1004f14
jmp 0x1004f1c
mov dword [ebp - 0x120], ebx
jmp 0x1004f14
mov eax, dword [esi + 0x20]
mov eax, dword [eax + 8]
push 4
mov dword [ebp - 0x10c], eax
lea eax, [ebp - 0x10c]
push eax
push 4
push ebx
push dword [0x100a03c]
push dword [ebp - 0x120]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
cmp edi, ebx
jne 0x1004e7a
mov edi, dword [ebp - 0x124]
mov eax, dword [edi + 0x1c]
cmp eax, ebx
je 0x1004a3f
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
inc eax
cdq
push 2
push edx
push eax
call fcn.01005660
mov ecx, edx
sar ecx, 0x1f
test edx, edx
jbe 0x1004a10
mov edi, 0x216
jmp 0x1004e7a
push eax
mov dword [ebp - 0x10c], eax
push dword [edi + 0x1c]
push 1
push ebx
push dword [0x100a038]
push dword [ebp - 0x120]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
cmp edi, ebx
jne 0x1004e7a
mov edi, dword [ebp - 0x124]
push dword [ebp - 0x13c]
push dword [edi + 0x18]
push dword [ebp - 0x138]
call fcn.010043c1
mov esi, eax
cmp esi, ebx
jne 0x1004a5c
mov esi, dword [edi + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
inc eax
cdq
push 2
push edx
push eax
call fcn.01005660
mov ecx, edx
sar ecx, 0x1f
test edx, edx
jbe 0x1004a7f
mov edi, 0x216
jmp 0x1004a9e
push eax
push esi
push 2
push ebx
push dword [0x100a040]
mov dword [ebp - 0x10c], eax
push dword [ebp - 0x120]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
cmp esi, ebx
je 0x1004abc
mov eax, dword [ebp - 0x124]
cmp esi, dword [eax + 0x18]
je 0x1004abc
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp edi, ebx
jne 0x1004e7a
mov eax, dword [ebp - 0x124]
mov esi, dword [eax + 4]
cmp esi, ebx
je 0x1004e7a
mov eax, dword [ebp - 0x12c]
cmp dword [ebp - 0x110], eax
ja 0x1004e77
push 0x80
lea eax, [ebp - 0x104]
push ebx
push eax
call sub.msvcrt.dll_memset
movzx eax, byte [esi + 0x17]
push eax
movzx eax, byte [esi + 0x16]
push eax
movzx eax, byte [esi + 0x15]
push eax
movzx eax, byte [esi + 0x14]
push eax
movzx eax, byte [esi + 0x13]
push eax
movzx eax, byte [esi + 0x12]
push eax
movzx eax, byte [esi + 0x11]
push eax
movzx eax, byte [esi + 0x10]
push eax
movzx eax, word [esi + 0xe]
push eax
movzx eax, word [esi + 0xc]
push eax
push dword [esi + 8]
lea eax, [ebp - 0x104]
push 0x10015e0
push 0x40
push eax
call fcn.01003ee9
add esp, 0x44
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x84]
push eax
push dword [ebp - 0x128]
call fcn.01007441
mov edi, eax
cmp edi, 0xb7
jne 0x1004b70
mov esi, dword [esi]
xor edi, edi
jmp 0x1004acd
cmp edi, ebx
jne 0x1004e7a
lea eax, [ebp - 0x134]
push eax
lea eax, [ebp - 0x114]
push eax
push ebx
push 0x2001f
push ebx
push ebx
push ebx
lea eax, [ebp - 0x104]
push eax
push dword [ebp - 0x120]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, eax
cmp edi, ebx
jne 0x1004bc2
cmp dword [ebp - 0x134], 1
je 0x1004bc8
push dword [ebp - 0x114]
mov edi, 0xb7
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x114], ebx
cmp edi, ebx
jne 0x1004e7a
push 4
lea eax, [esi + 0x24]
push eax
push 4
push ebx
push dword [0x100a044]
push dword [ebp - 0x114]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
cmp edi, ebx
jne 0x1004e7a
push 4
lea eax, [esi + 0x28]
push eax
push 4
push ebx
push dword [0x100a048]
push dword [ebp - 0x114]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
cmp edi, ebx
jne 0x1004e7a
mov eax, dword [esi + 0x1c]
mov eax, dword [eax + 8]
push 4
mov dword [ebp - 0x10c], eax
lea eax, [ebp - 0x10c]
push eax
push 4
push ebx
push dword [0x100a04c]
push dword [ebp - 0x114]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
cmp edi, ebx
jne 0x1004e7a
push 4
lea eax, [ebp - 0x110]
push eax
push 4
push ebx
push dword [0x100a05c]
push dword [ebp - 0x114]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
cmp edi, ebx
jne 0x1004e7a
mov eax, dword [esi + 0x20]
cmp eax, ebx
je 0x1004cbe
mov eax, dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x1004cbe
mov ecx, dword [0x100aac8]
lea ecx, [ecx + eax*2]
mov eax, ecx
lea edx, [eax + 2]
mov di, word [eax]
inc eax
inc eax
cmp di, bx
jne 0x1004c93
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push ecx
push 1
push ebx
push dword [0x100a06c]
push dword [ebp - 0x114]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
cmp edi, ebx
jne 0x1004e7a
mov dword [ebp - 0x108], ebx
mov eax, dword [esi + 4]
jmp 0x1004cf6
inc dword [ebp - 0x108]
add dword [ebp - 0x110], 2
cmp dword [ebp - 0x108], ebx
je 0x1004d4d
mov ecx, dword [ebp - 0x110]
cmp ecx, dword [ebp - 0x12c]
ja 0x1004d54
mov eax, dword [eax]
cmp eax, ebx
jne 0x1004cd1
push 4
lea eax, [ebp - 0x110]
push eax
push 4
push ebx
push dword [0x100a060]
push dword [ebp - 0x114]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
add dword [ebp - 0x110], 2
cmp edi, ebx
jne 0x1004e4e
mov eax, dword [ebp - 0x108]
push 0x38
pop ecx
mul ecx
mov dword [ebp - 0x10c], eax
mov eax, edx
sar eax, 0x1f
test edx, edx
jbe 0x1004d59
mov edi, 0x216
jmp 0x1004e4e
mov edi, 0x216
jmp 0x1004d1a
push 0xd
pop edi
jmp 0x1004d1a
cmp dword [ebp - 0x130], ebx
je 0x1004d75
push dword [ebp - 0x130]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 0x10c]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, eax
mov dword [ebp - 0x130], ecx
cmp ecx, ebx
jne 0x1004d9e
push 0xe
pop edi
jmp 0x1004e4e
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x1004e07
add ecx, 8
mov edx, dword [eax + 0x20]
mov dword [ecx - 8], edx
mov edx, dword [eax + 8]
mov edx, dword [edx + 8]
mov dword [ecx - 4], edx
mov edx, dword [eax + 0x18]
mov dword [ecx], edx
mov edx, dword [eax + 0x1c]
mov dword [ecx + 4], edx
mov edx, dword [eax + 0xc]
mov edx, dword [edx + 8]
mov dword [ecx + 8], edx
mov edx, dword [eax + 0x30]
mov dword [ecx + 0xc], edx
mov edx, dword [eax + 0x28]
mov dword [ecx + 0x10], edx
mov edx, dword [eax + 0x2c]
mov dword [ecx + 0x14], edx
mov edx, dword [eax + 0x10]
mov edx, dword [edx + 8]
mov dword [ecx + 0x18], edx
mov edx, dword [eax + 0x34]
mov dword [ecx + 0x1c], edx
mov edx, dword [eax + 0x38]
mov dword [ecx + 0x20], edx
mov edx, dword [eax + 0x40]
mov dword [ecx + 0x28], edx
mov edx, dword [eax + 0x3c]
mov dword [ecx + 0x24], edx
mov eax, dword [eax]
add ecx, 0x38
cmp eax, ebx
jne 0x1004da8
push dword [ebp - 0x10c]
push dword [ebp - 0x130]
push 3
push ebx
push dword [0x100a054]
push dword [ebp - 0x114]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
cmp edi, ebx
jne 0x1004e4e
push 4
lea eax, [ebp - 0x108]
push eax
push 4
push ebx
push dword [0x100a050]
push dword [ebp - 0x114]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
cmp dword [ebp - 0x114], ebx
je 0x1004e6b
cmp dword [ebp - 0x114], 0xffffffff
je 0x1004e6b
push dword [ebp - 0x114]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [esi]
cmp edi, ebx
je 0x1004acd
jmp 0x1004e7a
push 0xd
pop edi
cmp dword [ebp - 0x120], ebx
je 0x1004f14
push dword [ebp - 0x120]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, ebx
je 0x1004eaa
lea eax, [ebp - 0x84]
push eax
push dword [ebp - 0x128]
call fcn.010079fb
jmp 0x1004f14
cmp dword [0x100a14c], ebx
je 0x1004f39
mov al, byte [0x100a150]
cmp al, 4
jae 0x1004ec3
cmp al, bl
jne 0x1004f39
mov ecx, dword [0x100a13c]
mov edx, 0x80000000
and ecx, edx
xor eax, eax
or eax, ecx
je 0x1004f39
mov ecx, dword [0x100a144]
mov eax, ecx
and eax, edx
cmp ebx, dword [0x100a140]
jne 0x1004f39
cmp eax, ecx
jne 0x1004f39
mov eax, dword [ebp - 0x124]
push ebx
push ebx
push dword [eax + 0x1c]
lea eax, [ebp - 0x84]
push eax
push 0x10012d8
push dword [0x100a124]
push dword [0x100a120]
call fcn.01003727
cmp edi, 0xb7
jne 0x1004f39
push dword [ebp - 0x138]
lea eax, [ebp - 0x84]
push eax
push ebx
push 0x25b
call fcn.01005bde
add esp, 0x10
xor edi, edi
call fcn.01006050
mov eax, dword [ebp - 0x124]
mov eax, dword [eax]
mov dword [ebp - 0x124], eax
jmp 0x1004f68
cmp dword [ebp - 0x118], 0xa
jae 0x1004f70
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [ebp - 0x118]
cmp edi, ebx
je 0x10048be
pop esi
cmp dword [ebp - 0x128], ebx
je 0x1004f8e
cmp dword [ebp - 0x128], 0xffffffff
je 0x1004f8e
push dword [ebp - 0x128]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x130], ebx
je 0x1004faa
push dword [ebp - 0x130]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
call fcn.01006e35
call fcn.01006066
cmp edi, ebx
jne 0x1004fce
push dword [ebp - 0x138]
push ebx
push 0x259
call fcn.01005bde
add esp, 0xc
jmp 0x1004fe4
push edi
push dword [ebp - 0x138]
push 2
push 0x25a
call fcn.01005bde
add esp, 0x10
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop ebx
call fcn.010055b7
leave
ret 8