Function at 0x512570
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x52d483
push eax
mov eax, 0x6064
mov dword fs:[0], esp
call fcn.0051cdb0
mov eax, dword [esp + 0x6074]
push ebx
push ebp
push esi
mov ecx, dword [eax + 8]
push edi
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
sete al
test al, al
je 0x5125b6
xor al, al
jmp 0x5131c5
mov ebx, dword [esp + 0x608c]
mov ax, word [ebx + 6]
and ax, 0x20
je 0x5125d1
xor ecx, ecx
mov cx, word [ebx + 0x4c]
mov ebp, ecx
jmp 0x5125db
xor ecx, ecx
mov cx, word [ebx + 0x4c]
mov ebp, ecx
shr ebp, 1
test ax, ax
je 0x5125f4
lea edx, [esp + 0x74]
lea eax, [ebx + 0x50]
push edx
push ecx
push eax
call fcn.00512020
add esp, 0xc
jmp 0x512610
mov edx, ecx
lea esi, [ebx + 0x50]
lea edi, [esp + 0x74]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov word [esp + ebp*2 + 0x74], 0
lea eax, [esp + 0x74]
push eax
call fcn.0051d1ab
add esp, 4
cmp eax, ebp
je 0x512772
test ebp, ebp
jbe 0x51263e
lea eax, [esp + 0x74]
cmp word [eax], 0
jne 0x512638
mov word [eax], 0x2a
add eax, 2
dec ebp
jne 0x51262d
mov esi, dword [esp + 0x6098]
mov ecx, dword [esi + 0x28000]
lea edx, [esi + ecx*2]
push edx
call fcn.0051d1ab
mov ecx, dword [esi + 0x28000]
mov edi, eax
add eax, ecx
push 0x532458
lea ecx, [esi + eax*2]
push ecx
call fcn.0051d20b
mov edx, dword [esi + 0x28000]
lea eax, [esi + edx*2]
push eax
call fcn.0051d1ab
lea ecx, [esp + 0x84]
push ecx
mov ecx, dword [esi + 0x28000]
add eax, ecx
lea edx, [esi + eax*2]
push edx
call fcn.0051d20b
xor ebp, ebp
push 0xc
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x50], ebp
call fcn.0051d1d3
add esp, 0x1c
mov dword [esp + 0x20], eax
cmp eax, ebp
mov dword [esp + 0x607c], ebp
je 0x5126c1
push esi
mov ecx, eax
call fcn.0050ac20
jmp 0x5126c3
xor eax, eax
cmp eax, ebp
mov dword [esp + 0x607c], 0xffffffff
mov dword [esp + 0x28], eax
jne 0x5126e0
push 0x8007000e
call fcn.0052c3e0
push str.HKLM_
lea ecx, [esp + 0x18]
mov dword [esp + 0x6080], 1
call fcn.0050c7b0
lea ecx, [esp + 0x28]
lea edx, [esp + 0x10]
push ecx
push edx
mov ecx, eax
mov byte [esp + 0x6084], 2
call fcn.0050aa30
mov eax, dword [eax]
mov byte [esp + 0x607c], 3
cmp eax, ebp
je 0x512724
mov eax, dword [eax]
jmp 0x512726
xor eax, eax
mov ecx, dword [ebx + 0xc]
mov edx, dword [ebx + 8]
push ebp
push str.Key_name_contains_embedded_nulls___
push ecx
lea ecx, [esp + 0x3c]
push edx
push ecx
mov ecx, dword [esp + 0x6098]
push eax
push 2
call fcn.00513ca0
lea ecx, [esp + 0x10]
call fcn.0050abd0
lea ecx, [esp + 0x14]
call fcn.0050abd0
lea ecx, [esp + 0x28]
call fcn.0050abd0
add edi, dword [esi + 0x28000]
mov word [esi + edi*2], bp
jmp 0x5131c3
mov ebx, dword [esp + 0x6098]
xor ebp, ebp
mov dword [esp + 0x24], ebp
mov edx, dword [ebx + 0x28000]
lea eax, [ebx + edx*2]
push eax
call fcn.0051d1ab
mov esi, eax
mov eax, dword [ebx + 0x28000]
mov ecx, esi
push 0x537720
add ecx, eax
lea edx, [ebx + ecx*2]
push edx
call fcn.0051d20b
mov eax, dword [esp + 0x60a0]
add esp, 0xc
cmp eax, ebp
mov dword [esp + 0x28], esi
jne 0x5127de
mov ecx, dword [esp + 0x6090]
lea eax, [esp + 0x24]
push eax
push 0x20019
push 4
push ebp
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [esp + 0x2c], eax
jmp 0x5129e1
mov edi, dword [esp + 0x6090]
lea edx, [esp + 0x24]
push edx
push 0x20019
lea eax, [esp + 0x7c]
push 4
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, 5
mov dword [esp + 0x2c], eax
jne 0x512860
lea ecx, [esp + 0x74]
push ecx
call fcn.0051d1ab
lea eax, [eax + eax + 6]
push eax
mov dword [esp + 0x30], eax
call fcn.0051e145
mov esi, eax
lea edx, [esp + 0x7c]
push edx
lea eax, [esi + 4]
mov dword [esi], edi
push eax
call fcn.0051d20b
mov eax, dword [esp + 0x38]
add esp, 0x10
lea ecx, [esp + 0x28]
lea edx, [esp + 0x24]
push ebp
push ecx
mov ecx, dword [0x538bcc]
push 4
push edx
push eax
push esi
push 0x84000000
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x512860
mov dword [esp + 0x2c], ebp
mov edx, dword [ebx + 0x28000]
lea eax, [ebx + edx*2]
push eax
call fcn.0051d1ab
mov edx, dword [ebx + 0x28000]
mov esi, eax
mov ecx, esi
push 0x532458
add ecx, edx
lea edx, [ebx + ecx*2]
push edx
call fcn.0051d20b
mov eax, dword [ebx + 0x28000]
mov dword [esp + 0x34], esi
lea ecx, [ebx + eax*2]
push ecx
call fcn.0051d1ab
mov esi, dword [ebx + 0x28000]
lea edx, [esp + 0x84]
add eax, esi
push edx
lea eax, [ebx + eax*2]
push eax
call fcn.0051d20b
mov eax, dword [esp + 0x44]
add esp, 0x18
cmp eax, ebp
jne 0x5129e1
mov eax, dword [esp + 0x60a0]
cmp eax, ebp
je 0x5129e1
mov edx, dword [esp + 0x609c]
push 0x511f40
push 4
push eax
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x80]
push edx
push eax
mov dword [esp + 0x24], ecx
call fcn.0051e60d
add esp, 0x14
test eax, eax
jne 0x5129e1
push 0xc
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
call fcn.0051d1d3
add esp, 4
mov dword [esp + 0x20], eax
cmp eax, ebp
mov dword [esp + 0x607c], 4
je 0x512932
push ebx
mov ecx, eax
call fcn.0050ac20
jmp 0x512934
xor eax, eax
or esi, 0xffffffff
cmp eax, ebp
mov dword [esp + 0x607c], esi
mov dword [esp + 0x1c], eax
jne 0x512950
push 0x8007000e
call fcn.0052c3e0
push str.HKLM_
lea ecx, [esp + 0x34]
mov dword [esp + 0x6080], 5
call fcn.0050c7b0
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x14]
push ecx
push edx
mov ecx, eax
mov byte [esp + 0x6084], 6
call fcn.0050aa30
mov eax, dword [eax]
mov byte [esp + 0x607c], 7
cmp eax, ebp
je 0x512994
mov eax, dword [eax]
jmp 0x512996
xor eax, eax
mov ecx, dword [esp + 0x608c]
push ebp
push str.Hidden_from_Windows_API.
mov edx, dword [ecx + 0xc]
mov ecx, dword [ecx + 8]
push edx
lea edx, [esp + 0x44]
push ecx
mov ecx, dword [esp + 0x6094]
push edx
push eax
push 2
call fcn.00513ca0
lea ecx, [esp + 0x14]
call fcn.0050abd0
lea ecx, [esp + 0x30]
call fcn.0050abd0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x607c], esi
call fcn.0050abd0
push 0xc
call fcn.0051d1d3
mov esi, eax
add esp, 4
mov dword [esp + 0x20], esi
mov edi, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
cmp esi, ebp
mov dword [esp + 0x607c], 8
je 0x512a29
push ebx
mov dword [esi + 4], ebp
mov dword [esi + 8], 1
call edi
cmp eax, ebp
mov dword [esi], eax
jne 0x512a2b
cmp ebx, ebp
je 0x512a2b
push 0x8007000e
call fcn.0052c3e0
jmp 0x512a2b
xor esi, esi
cmp esi, ebp
mov dword [esp + 0x607c], 0xffffffff
mov dword [esp + 0x10], esi
jne 0x512a48
push 0x8007000e
call fcn.0052c3e0
push 0xc
mov dword [esp + 0x6080], 9
call fcn.0051d1d3
mov esi, eax
add esp, 4
mov dword [esp + 0x20], esi
cmp esi, ebp
mov byte [esp + 0x607c], 0xa
je 0x512a9b
push str.Scanning_HKLM_
mov dword [esi + 4], ebp
mov dword [esi + 8], 1
call edi
cmp eax, ebp
mov dword [esi], eax
jne 0x512a9d
mov eax, str.Scanning_HKLM_
test eax, eax
je 0x512a9d
push 0x8007000e
call fcn.0052c3e0
jmp 0x512a9d
xor esi, esi
cmp esi, ebp
mov byte [esp + 0x607c], 9
mov dword [esp + 0x1c], esi
jne 0x512ab7
push 0x8007000e
call fcn.0052c3e0
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push ecx
push edx
lea ecx, [esp + 0x24]
mov byte [esp + 0x6084], 0xb
call fcn.0050aa30
mov eax, dword [eax]
mov byte [esp + 0x607c], 0xc
cmp eax, ebp
je 0x512ae4
mov edi, dword [eax]
jmp 0x512ae6
xor edi, edi
mov eax, dword [esp + 0x6084]
lea esi, [eax + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esp + 0x6084]
call fcn.0050abd0
push 0xc
call fcn.0051d1d3
add esp, 4
mov dword [esp + 0x20], eax
cmp eax, ebp
mov byte [esp + 0x607c], 0xd
je 0x512b27
push edi
mov ecx, eax
call fcn.0050ac20
jmp 0x512b29
xor eax, eax
mov ecx, dword [esp + 0x6084]
push esi
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x14]
cmp ecx, ebp
je 0x512b4a
call fcn.0050ace0
mov dword [esp + 0x14], ebp
mov ecx, dword [esp + 0x1c]
cmp ecx, ebp
je 0x512b5b
call fcn.0050ace0
mov dword [esp + 0x1c], ebp
mov eax, dword [esp + 0x10]
or edi, 0xffffffff
cmp eax, ebp
mov dword [esp + 0x607c], edi
je 0x512b8a
mov esi, eax
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x512b8a
cmp esi, ebp
je 0x512b8a
push 1
mov ecx, esi
call fcn.0050b8e0
mov eax, dword [esp + 0x2c]
cmp eax, ebp
je 0x512d51
cmp eax, 5
jne 0x512c78
push 0xc
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
call fcn.0051d1d3
add esp, 4
mov dword [esp + 0x20], eax
cmp eax, ebp
mov dword [esp + 0x607c], 0xe
je 0x512bce
push ebx
mov ecx, eax
call fcn.0050ac20
jmp 0x512bd0
xor eax, eax
cmp eax, ebp
mov dword [esp + 0x607c], edi
mov dword [esp + 0x10], eax
jne 0x512be9
push 0x8007000e
call fcn.0052c3e0
push str.HKLM_
lea ecx, [esp + 0x18]
mov dword [esp + 0x6080], 0xf
call fcn.0050c7b0
lea edx, [esp + 0x10]
lea ecx, [esp + 0x30]
push edx
push ecx
mov ecx, eax
mov byte [esp + 0x6084], 0x10
call fcn.0050aa30
mov eax, dword [eax]
mov byte [esp + 0x607c], 0x11
cmp eax, ebp
je 0x512c2d
mov eax, dword [eax]
jmp 0x512c2f
xor eax, eax
mov ecx, dword [esp + 0x608c]
push ebp
push str.Access_is_denied.
mov edx, dword [ecx + 0xc]
mov ecx, dword [ecx + 8]
push edx
lea edx, [esp + 0x44]
push ecx
mov ecx, dword [esp + 0x6094]
push edx
push eax
push 2
call fcn.00513ca0
lea ecx, [esp + 0x30]
call fcn.0050abd0
lea ecx, [esp + 0x14]
call fcn.0050abd0
lea ecx, [esp + 0x10]
call fcn.0050abd0
jmp 0x5131b3
push 0xc
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
call fcn.0051d1d3
add esp, 4
mov dword [esp + 0x20], eax
cmp eax, ebp
mov dword [esp + 0x607c], 0x12
je 0x512ca7
push ebx
mov ecx, eax
call fcn.0050ac20
jmp 0x512ca9
xor eax, eax
cmp eax, ebp
mov dword [esp + 0x607c], edi
mov dword [esp + 0x10], eax
jne 0x512cc2
push 0x8007000e
call fcn.0052c3e0
push str.HKLM_
lea ecx, [esp + 0x18]
mov dword [esp + 0x6080], 0x13
call fcn.0050c7b0
lea ecx, [esp + 0x10]
lea edx, [esp + 0x30]
push ecx
push edx
mov ecx, eax
mov byte [esp + 0x6084], 0x14
call fcn.0050aa30
mov eax, dword [eax]
mov byte [esp + 0x607c], 0x15
cmp eax, ebp
je 0x512d06
mov eax, dword [eax]
jmp 0x512d08
xor eax, eax
mov ecx, dword [esp + 0x608c]
push ebp
push str.Hidden_from_Windows_API.
mov edx, dword [ecx + 0xc]
mov ecx, dword [ecx + 8]
push edx
lea edx, [esp + 0x44]
push ecx
mov ecx, dword [esp + 0x6094]
push edx
push eax
push 2
call fcn.00513ca0
lea ecx, [esp + 0x30]
call fcn.0050abd0
lea ecx, [esp + 0x14]
call fcn.0050abd0
lea ecx, [esp + 0x10]
call fcn.0050abd0
jmp 0x5131b3
mov eax, dword [esp + 0x608c]
mov edx, dword [eax + 0x34]
cmp edx, edi
je 0x512d9a
mov ecx, dword [esp + 0x608c]
mov esi, dword [esp + 0x6088]
xor eax, eax
lea edi, [esp + 0x2074]
mov ax, word [ecx + 0x4e]
lea esi, [edx + esi + 4]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
shr eax, 1
rep movsb byte es:[edi], byte [esi]
mov word [esp + eax*2 + 0x2074], bp
jmp 0x512da2
mov word [esp + 0x2074], bp
mov esi, dword [esp + 0x608c]
mov edi, dword [esp + 0x6088]
mov eax, dword [esi + 0x30]
add eax, edi
lea edi, [eax + 0x18]
push edi
call dword [sym.imp.ADVAPI32.dll_IsValidSecurityDescriptor]
test eax, eax
jne 0x512dc5
xor edi, edi
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x40]
push eax
lea edx, [esp + 0x5c]
push ecx
lea eax, [esp + 0x68]
push edx
lea ecx, [esp + 0x60]
push eax
lea edx, [esp + 0x6c]
push ecx
lea eax, [esp + 0x7c]
push edx
lea ecx, [esp + 0x7c]
push eax
push ecx
mov ecx, dword [esp + 0x44]
lea edx, [esp + 0x68]
push ebp
lea eax, [esp + 0x4098]
push edx
push eax
push ecx
mov dword [esp + 0x78], 0x1000
mov byte [esp + 0x4b], 0
mov byte [esp + 0x4a], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
cmp eax, ebp
jne 0x512f76
lea edx, [esp + 0x4074]
lea eax, [esp + 0x2074]
push edx
push eax
call fcn.0051d946
add esp, 8
test eax, eax
je 0x512f23
push 0xc
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
call fcn.0051d1d3
add esp, 4
mov dword [esp + 0x20], eax
cmp eax, ebp
mov dword [esp + 0x607c], 0x16
je 0x512e6f
push ebx
mov ecx, eax
call fcn.0050ac20
jmp 0x512e71
xor eax, eax
cmp eax, ebp
mov dword [esp + 0x607c], 0xffffffff
mov dword [esp + 0x10], eax
jne 0x512e8e
push 0x8007000e
call fcn.0052c3e0
push str.HKLM_
lea ecx, [esp + 0x18]
mov dword [esp + 0x6080], 0x17
call fcn.0050c7b0
lea ecx, [esp + 0x10]
lea edx, [esp + 0x30]
push ecx
push edx
mov ecx, eax
mov byte [esp + 0x6084], 0x18
call fcn.0050aa30
mov eax, dword [eax]
mov byte [esp + 0x607c], 0x19
cmp eax, ebp
je 0x512ed2
mov eax, dword [eax]
jmp 0x512ed4
xor eax, eax
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 8]
push ebp
push str.Class_mismatch.
push ecx
push edx
mov edx, dword [esp + 0x6094]
lea ecx, [esp + 0x48]
push ecx
push eax
mov eax, dword [edx + 4]
push 2
push eax
call fcn.00516050
add esp, 0x20
lea ecx, [esp + 0x30]
call fcn.0050abd0
lea ecx, [esp + 0x14]
call fcn.0050abd0
lea ecx, [esp + 0x10]
mov dword [esp + 0x607c], 0xffffffff
call fcn.0050abd0
mov ecx, dword [esp + 0x40]
push ecx
call fcn.0051d1d3
add esp, 4
lea edx, [esp + 0x40]
mov esi, eax
mov eax, dword [esp + 0x24]
push edx
push esi
push 7
push eax
call dword [sym.imp.ADVAPI32.dll_RegGetKeySecurity]
cmp edi, 0xb06218
jne 0x512f53
call dword [sym.imp.KERNEL32.dll_DebugBreak]
push esi
push edi
call fcn.00511ed0
add esp, 8
test al, al
jne 0x512f66
mov byte [esp + 0x1a], 1
push esi
call fcn.0051d1c8
mov esi, dword [esp + 0x6090]
add esp, 4
cmp dword [esi + 0x28], ebp
jbe 0x513046
mov ecx, dword [esp + 0x608c]
mov eax, dword [esp + 0x24]
mov ebp, dword [esp + 0x6088]
lea edx, [esp + 0x1c]
mov edi, dword [ecx + 0x2c]
push edx
push eax
add edi, ebp
call fcn.00511f60
mov ecx, dword [esp + 0x6094]
mov ebp, eax
add esp, 8
xor esi, esi
mov eax, dword [ecx + 0x28]
test eax, eax
jbe 0x51300c
mov edx, ecx
add edi, 4
lea ebx, [edx + 8]
mov edx, dword [esp + 0x1c]
mov eax, dword [edi]
mov ecx, dword [esp + 0x6088]
push edx
mov edx, dword [esp + 0x609c]
push ebp
push edx
mov edx, dword [esp + 0x30]
add eax, ecx
push edx
push eax
mov eax, dword [esp + 0x6098]
push ebx
push ecx
push eax
call fcn.00512060
mov ecx, dword [esp + 0x60ac]
add esp, 0x20
mov byte [esp + 0x1b], al
inc esi
mov eax, dword [ecx + 0x28]
add edi, 4
cmp esi, eax
jb 0x512fbe
mov ebx, dword [esp + 0x6098]
mov eax, dword [esp + 0x1c]
xor edi, edi
test eax, eax
jbe 0x51302f
mov esi, ebp
mov edx, dword [esi]
push edx
call fcn.0051d97b
mov eax, dword [esp + 0x20]
add esp, 4
inc edi
add esi, 4
cmp edi, eax
jb 0x513018
push ebp
call fcn.0051d97b
mov al, byte [esp + 0x1f]
add esp, 4
test al, al
jne 0x51316a
xor ebp, ebp
mov al, byte [esp + 0x1a]
test al, al
je 0x51316c
push 0xc
mov dword [esp + 0x50], ebp
mov dword [esp + 0x54], ebp
call fcn.0051d1d3
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, ebp
mov dword [esp + 0x607c], 0x1a
je 0x513081
push ebx
mov ecx, eax
call fcn.0050ac20
jmp 0x513083
xor eax, eax
or esi, 0xffffffff
cmp eax, ebp
mov dword [esp + 0x607c], esi
mov dword [esp + 0x44], eax
jne 0x51309f
push 0x8007000e
call fcn.0052c3e0
push 0xc
mov dword [esp + 0x6080], 0x1b
call fcn.0051d1d3
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, ebp
mov byte [esp + 0x607c], 0x1c
je 0x5130d2
push str.HKLM_
mov ecx, eax
call fcn.0050ac20
jmp 0x5130d4
xor eax, eax
cmp eax, ebp
mov byte [esp + 0x607c], 0x1b
mov dword [esp + 0x2c], eax
jne 0x5130ee
push 0x8007000e
call fcn.0052c3e0
lea eax, [esp + 0x44]
lea ecx, [esp + 0x20]
push eax
push ecx
lea ecx, [esp + 0x34]
mov byte [esp + 0x6084], 0x1d
call fcn.0050aa30
mov eax, dword [eax]
mov byte [esp + 0x607c], 0x1e
cmp eax, ebp
je 0x51311b
mov eax, dword [eax]
jmp 0x51311d
xor eax, eax
mov ecx, dword [esp + 0x608c]
push ebp
push str.Security_mismatch.
mov edx, dword [ecx + 0xc]
mov ecx, dword [ecx + 8]
push edx
lea edx, [esp + 0x58]
push ecx
mov ecx, dword [esp + 0x6094]
push edx
push eax
push 2
call fcn.00513ca0
lea ecx, [esp + 0x20]
call fcn.0050abd0
lea ecx, [esp + 0x2c]
call fcn.0050abd0
lea ecx, [esp + 0x44]
mov dword [esp + 0x607c], esi
call fcn.0050abd0
jmp 0x51316c
xor ebp, ebp
mov ecx, dword [esp + 0x608c]
mov eax, dword [ecx + 0x18]
cmp eax, ebp
jbe 0x5131a8
mov edx, dword [esp + 0x6094]
mov ecx, dword [ecx + 0x20]
inc edx
push ebx
push edx
mov edx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x6090]
push eax
mov eax, dword [esp + 0x6098]
add ecx, eax
push ecx
push eax
push edx
call fcn.005123d0
add esp, 0x1c
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x28]
mov ecx, dword [ebx + 0x28000]
add eax, ecx
mov word [ebx + eax*2], bp
mov al, 1
mov ecx, dword [esp + 0x6074]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x6070
ret