Function at 0x10016600
Capabilities:
Check for software breakpoints
Persist via appinit_dlls registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x254
mov eax, dword [0x1007a00c]
mov edi, edx
mov esi, ecx
xor eax, ebp
mov dword [ebp - 0x10], eax
push str.detoured.dll
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
test eax, eax
jne 0x10016b75
push str._etoured.dll
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
test eax, eax
jne 0x10016b75
push str.nvd3d9wrap.dll
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
test eax, eax
jne 0x10016b75
push str.nvdxgiwrap.dll
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
test eax, eax
jne 0x10016b75
push str.user32.dll
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
test eax, eax
je 0x10016892
xor eax, eax
xor ebx, ebx
test edi, edi
je 0x10016b5e
test al, al
jne 0x10016b5e
lea ebx, [ebp - 0x2c]
mov ecx, esi
mov edx, ebx
push edi
call fcn.10016ba0
add esp, 4
lea edi, [ebp - 0x22c]
mov ecx, ebx
mov edx, edi
push 0xfffffffffffffffb
push 7
call fcn.10016300
add esp, 8
xor ebx, ebx
cmp dword [edi + 0x3c], 0
je 0x10016b0e
cmp byte [ebp - 0x1fc], 0
je 0x10016b0e
mov eax, dword [ebp - 0x228]
mov ecx, dword [ebp - 0x220]
mov bh, byte [ecx + eax]
mov bl, byte [ecx + eax + 2]
mov dh, byte [ecx + eax + 3]
mov dl, byte [ecx + eax + 4]
cmp bh, 0xcc
je 0x100166f5
cmp bh, 0x90
jne 0x10016b0c
mov bh, byte [eax + ecx + 1]
cmp bh, 0x90
je 0x10016707
cmp bh, 0xcc
jne 0x10016b0c
cmp bl, 0xcc
je 0x10016715
cmp bl, 0x90
jne 0x10016b0c
cmp dh, 0xcc
je 0x10016723
cmp dh, 0x90
jne 0x10016b0c
cmp dl, 0xcc
je 0x10016731
cmp dl, 0x90
jne 0x10016b0c
movzx eax, word [eax + ecx + 5]
and eax, 0xfffffffd
cmp ax, 0xff89
jne 0x10016b0c
lea ecx, [ebp - 0x218]
mov eax, dword [ecx + 4]
cmp eax, dword [ecx + 8]
je 0x1001699c
mov ecx, dword [ebp - 0x218]
xor ebx, ebx
mov byte [ecx + eax], 0xe9
mov edx, dword [ebp - 0x220]
mov ecx, dword [ebp - 0x214]
lea eax, [ecx + 1]
mov edi, edx
inc edx
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x220], edx
cmp byte [ebp - 0x1fc], 0
je 0x10016b0e
cmp dword [ebp - 0x1f0], 0
je 0x10016b0e
mov ebx, edi
add ecx, 5
not ebx
add ebx, dword [ebp + 8]
sub ebx, dword [ebp - 0x228]
cmp ecx, dword [ebp - 0x210]
ja 0x100169bd
mov edi, dword [ebp - 0x218]
add ebx, 0xfffffffc
mov ecx, ebx
mov edx, ebx
shr ecx, 0x10
shr edx, 0x18
mov byte [edi + eax], bl
mov byte [edi + eax + 1], bh
mov byte [edi + eax + 2], cl
mov byte [edi + eax + 3], dl
xor ebx, ebx
mov ecx, dword [ebp - 0x214]
mov edx, dword [ebp - 0x220]
add ecx, 4
lea eax, [edx + 4]
mov dword [ebp - 0x214], ecx
mov dword [ebp - 0x220], eax
cmp byte [ebp - 0x1fc], 0
je 0x10016b0e
cmp dword [ebp - 0x1f0], 0
je 0x10016b0e
mov eax, dword [ebp - 0x228]
mov edi, dword [ebp + 0xc]
test ecx, ecx
lea edx, [edx + eax + 6]
mov dword [edi], edx
je 0x100169e0
add eax, dword [ebp - 0x21c]
push ecx
push dword [ebp - 0x218]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
call dword [sym.imp.kernel32.dll_GetCurrentProcess]
xor edi, edi
push edi
push edi
push eax
call dword [sym.imp.kernel32.dll_FlushInstructionCache]
mov ecx, dword [ebp - 0x21c]
mov eax, dword [ebp - 0x228]
add ecx, dword [ebp - 0x214]
mov dword [ebp - 0x21c], ecx
mov dword [ebp - 0x214], edi
mov word [eax + ecx], 0xf9eb
call dword [sym.imp.kernel32.dll_GetCurrentProcess]
xor ecx, ecx
push ecx
push ecx
push eax
call dword [sym.imp.kernel32.dll_FlushInstructionCache]
add dword [ebp - 0x21c], 2
mov bl, 1
jmp 0x10016b0e
xor ebx, ebx
lea eax, [ebp - 0x248]
mov dword [eax], ebx
push eax
push 1
push ebx
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionWindows
push 0x80000002
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
mov cl, 1
test eax, eax
mov dword [ebp - 0x25c], ecx
je 0x100168c9
mov eax, dword [ebp - 0x25c]
xor al, 1
jmp 0x1001667b
lea eax, [ebp - 0x24c]
movsd xmm0, qword [0x1006bb80]
movsd xmm2, qword [0x1006bb78]
movsd xmm1, qword [str.AppInit_DLLs]
mov ecx, dword [ebp - 0x248]
lea edx, [ebp - 0x2c]
mov dword [eax], ebx
movzx eax, word [0x1006bb88]
movsd qword [edx + 0x10], xmm0
movsd qword [edx + 8], xmm2
movsd qword [edx], xmm1
mov word [edx + 0x18], ax
lea eax, [ebp - 0x24c]
push eax
push ebx
push ebx
push ebx
push edx
mov dword [ebp - 0x254], ecx
push ecx
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
test eax, eax
je 0x10016941
cmp dword [ebp - 0x254], 0
je 0x100168bc
push dword [ebp - 0x254]
call dword [sym.imp.advapi32.dll_RegCloseKey]
jmp 0x100168bc
mov ebx, dword [ebp - 0x24c]
inc ebx
and ebx, 0xfffffffe
push ebx
call sym.mozglue.dll_moz_xmalloc
add esp, 4
xor ecx, ecx
push ebx
push ecx
mov ebx, eax
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x24c]
push eax
mov dword [ebp - 0x258], ebx
push ebx
mov eax, 0
push eax
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x248]
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
test eax, eax
je 0x100169eb
push dword [ebp - 0x258]
call sym.mozglue.dll__aligned_free
add esp, 4
jmp 0x10016927
xor edx, edx
lea ecx, [ebp - 0x218]
inc edx
call fcn.10014930
test al, al
je 0x10016b05
mov eax, dword [ebp - 0x214]
jmp 0x10016755
lea ecx, [ebp - 0x218]
mov edx, 4
call fcn.10014930
test al, al
je 0x10016b05
mov eax, dword [ebp - 0x214]
jmp 0x100167b5
mov ecx, dword [ebp - 0x21c]
jmp 0x1001686d
movzx eax, word [0x1006bb8e]
lea ecx, [ebp - 0x244]
mov word [ecx + 4], ax
mov eax, dword [0x1006bb8a]
mov dword [ecx], eax
lea eax, [ebp - 0x250]
mov dword [eax], 0
push eax
push ecx
push dword [ebp - 0x258]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcstok_s]
add esp, 0xc
test eax, eax
mov dword [ebp - 0x260], eax
je 0x1001698c
xor ebx, ebx
push 0x200
push ebx
lea eax, [ebp - 0x22c]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push ebx
push ebx
push 0x100
lea eax, [ebp - 0x22c]
push eax
push ebx
push ebx
push ebx
push ebx
push dword [ebp - 0x260]
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wsplitpath_s]
add esp, 0x24
test eax, eax
jne 0x10016aa7
movsd xmm0, qword [0x1006bb96]
movsd xmm1, qword [0x1006bb90]
movsd qword [ebp - 0x236], xmm0
movsd qword [ebp - 0x23c], xmm1
push 7
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x10016ad3
lea eax, [ebp - 0x250]
push eax
lea eax, [ebp - 0x244]
push eax
push 0
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcstok_s]
add esp, 0xc
test eax, eax
mov dword [ebp - 0x260], eax
jne 0x10016a30
jmp 0x1001698c
push dword [ebp - 0x258]
call sym.mozglue.dll__aligned_free
add esp, 4
cmp dword [ebp - 0x254], 0
je 0x10016af6
push dword [ebp - 0x254]
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [ebp - 0x25c], 0
jmp 0x100168bc
mov byte [ebp - 0x1fc], 0
xor ebx, ebx
lea edi, [ebp - 0x1f8]
mov ecx, edi
call fcn.100146f0
mov eax, dword [edi + 4]
lea ecx, [ebp - 0x1e8]
cmp eax, ecx
jne 0x10016b79
lea ecx, [ebp - 0x20c]
mov eax, dword [ecx - 0xc]
cmp eax, ecx
jne 0x10016b85
test bl, bl
je 0x10016b75
mov eax, dword [esi + 0x14]
mov edi, dword [ebp - 0x28]
cmp eax, dword [esi + 0x18]
jne 0x10016b53
lea ecx, [esi + 0x10]
call fcn.10016c50
test al, al
je 0x10016b75
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 0x10]
mov bl, 1
mov dword [ecx + eax*4], edi
inc dword [esi + 0x14]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10069260
mov eax, ebx
add esp, 0x254
pop esi
pop edi
pop ebx
pop ebp
ret
xor ebx, ebx
jmp 0x10016b5e
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
jmp 0x10016b28
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
jmp 0x10016b35