Function at 0x407106
Capabilities:
Link many functions at runtime

Disassembly:
mov eax, 0x421c6b
call fcn.00418558
sub esp, 0xd8
push ebx
push esi
push edi
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
push str.AllocateAndInitializeSid
push edi
call esi
push str.SetEntriesInAclA
push edi
mov dword [ebp - 0x10], eax
call esi
push str.InitializeSecurityDescriptor
push edi
mov dword [ebp - 0x14], eax
call esi
push str.SetSecurityDescriptorDacl
push edi
mov dword [ebp - 0x34], eax
call esi
push str.SetFileSecurityA
push edi
mov dword [ebp - 0x30], eax
call esi
push str.RegSetKeySecurity
push edi
mov dword [ebp - 0x1c], eax
call esi
push str.FreeSid
push edi
mov dword [ebp - 0x2c], eax
call esi
xor ebx, ebx
cmp dword [ebp - 0x10], ebx
mov dword [ebp - 0x54], eax
je 0x40744d
cmp dword [ebp - 0x14], ebx
je 0x40744d
cmp dword [ebp - 0x34], ebx
je 0x40744d
cmp dword [ebp - 0x30], ebx
je 0x40744d
cmp dword [ebp - 0x1c], ebx
je 0x40744d
cmp dword [ebp - 0x2c], ebx
je 0x40744d
cmp eax, ebx
je 0x40744d
lea eax, [ebp - 0x28]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
xor edi, edi
inc edi
push edi
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x28], ebx
mov byte [ebp - 0x24], bl
mov byte [ebp - 0x23], bl
mov byte [ebp - 0x22], bl
mov byte [ebp - 0x21], bl
mov byte [ebp - 0x20], bl
mov byte [ebp - 0x1f], 1
call dword [ebp - 0x10]
test eax, eax
je 0x40744d
push 0x20
lea eax, [ebp - 0x90]
push ebx
push eax
call fcn.00416610
mov eax, dword [ebp - 0x28]
add esp, 0xc
mov dword [ebp - 0x74], eax
lea eax, [ebp - 0x10]
push eax
push ebx
lea eax, [ebp - 0x90]
push eax
push edi
mov dword [ebp - 0x90], 0x1fffff
mov dword [ebp - 0x8c], 2
mov dword [ebp - 0x88], 3
mov dword [ebp - 0x7c], ebx
mov dword [ebp - 0x78], 5
mov dword [ebp - 0x10], ebx
call dword [ebp - 0x14]
test eax, eax
jne 0x407447
push 0x14
call fcn.004151f4
pop ecx
push edi
push eax
mov dword [ebp - 0x18], eax
call dword [ebp - 0x34]
test eax, eax
je 0x407435
push ebx
push dword [ebp - 0x10]
push edi
push dword [ebp - 0x18]
call dword [ebp - 0x30]
test eax, eax
je 0x407435
mov eax, dword [0x42beb0]
cmp eax, ebx
jne 0x407281
xor esi, esi
jmp 0x407283
mov esi, dword [eax]
cmp esi, eax
je 0x407376
lea eax, [esi + 8]
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.00404b1d
pop ecx
pop ecx
mov ecx, dword [ebp - 0x3c]
cmp ecx, ebx
mov dword [ebp - 4], ebx
jbe 0x407346
cmp dword [ebp - 0x38], 0x10
mov eax, dword [ebp - 0x4c]
jae 0x4072b4
lea eax, [ebp - 0x4c]
mov al, byte [eax + ecx - 1]
cmp al, 0x5c
je 0x407311
cmp al, 0x2f
je 0x407311
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0xac]
push eax
call fcn.004128f0
push eax
mov byte [ebp - 4], 2
call fcn.00412250
add esp, 0xc
push edi
lea ecx, [ebp - 0xac]
mov byte [ebp - 4], bl
call fcn.004017f4
cmp dword [ebp - 0x38], 0x10
mov eax, dword [ebp - 0x4c]
jae 0x4072f8
lea eax, [ebp - 0x4c]
push 0x425050
push eax
call fcn.00417201
cmp eax, ebx
pop ecx
pop ecx
je 0x407346
push eax
call fcn.00417763
jmp 0x407345
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.004125e0
pop ecx
pop ecx
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 1
call fcn.004016ad
push edi
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], bl
call fcn.004017f4
lea eax, [ebp - 0x50]
push eax
call fcn.00412250
pop ecx
cmp dword [ebp - 0x38], 0x10
mov esi, dword [esi]
mov eax, dword [ebp - 0x4c]
jae 0x407354
lea eax, [ebp - 0x4c]
push dword [ebp - 0x18]
push 4
push eax
call dword [ebp - 0x1c]
or dword [ebp - 4], 0xffffffff
push edi
lea ecx, [ebp - 0x50]
call fcn.004017f4
cmp esi, dword [0x42beb0]
jne 0x40728b
mov eax, dword [0x42bebc]
cmp eax, ebx
jne 0x407383
xor esi, esi
jmp 0x407385
mov esi, dword [eax]
cmp esi, eax
je 0x407435
lea eax, [esi + 8]
push eax
lea eax, [ebp - 0xac]
push eax
call fcn.00404b1d
pop ecx
pop ecx
push ebx
lea ecx, [ebp - 0x70]
mov dword [ebp - 4], 3
mov dword [ebp - 0x58], 0xf
call fcn.00401985
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xac]
push eax
mov byte [ebp - 4], 4
call fcn.0040650b
add esp, 0xc
test al, al
je 0x40745e
cmp dword [ebp - 0x58], 0x10
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x14], ebx
jae 0x4073e8
lea eax, [ebp - 0x6c]
lea ecx, [ebp - 0x14]
push ecx
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40740e
push dword [ebp - 0x18]
push 4
push dword [ebp - 0x14]
call dword [ebp - 0x2c]
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [esi]
push edi
lea ecx, [ebp - 0x70]
call fcn.004017f4
or dword [ebp - 4], 0xffffffff
push edi
lea ecx, [ebp - 0xac]
call fcn.004017f4
cmp esi, dword [0x42bebc]
jne 0x40738d
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x18]
call fcn.0040112e
pop ecx
push dword [ebp - 0x28]
call dword [ebp - 0x54]
mov al, 1
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
lea eax, [ebp - 0xac]
push eax
lea eax, [ebp - 0xe4]
push str.Invalid_Key_
push eax
call fcn.004048d5
push 0x42559c
push eax
lea eax, [ebp - 0xc8]
push eax
mov byte [ebp - 4], 5
call fcn.00404889
push eax
mov byte [ebp - 4], 6
call fcn.004050e5
add esp, 0x1c
push edi
lea ecx, [ebp - 0xc8]
call fcn.004017f4
push edi
lea ecx, [ebp - 0xe4]
call fcn.004017f4
push edi
lea ecx, [ebp - 0x70]
call fcn.004017f4
push edi
lea ecx, [ebp - 0xac]
call fcn.004017f4
xor al, al
jmp 0x40744f