Function at 0x10008504
Capabilities:
Accept command line arguments

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xe4
mov eax, dword [0x1000e008]
xor eax, esp
mov dword [esp + 0xe0], eax
push ebx
push esi
push edi
lea eax, [esp + 0x28]
push eax
push 0x10001f54
mov ebx, edx
mov esi, ecx
xor edi, edi
push ebx
push esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [0x1000f860], edi
call dword [sym.imp.SETUPAPI.dll_SetupFindFirstLineW]
test eax, eax
jne 0x10008577
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
mov dword [0x1000f858], edi
call fcn.10009788
push eax
push 0x10001f70
call fcn.10009770
pop ecx
pop ecx
jmp 0x10008866
mov eax, 0x1000e3bc
mov dword [esp + 0x18], eax
mov edi, eax
jmp 0x10008588
mov esi, dword [esp + 0x24]
lea ecx, [esp + 0x10]
push ecx
push 0x100
lea eax, [edi + 0xc]
push eax
push 1
lea eax, [esp + 0x38]
push eax
mov dword [0x1000f858], 1
call dword [sym.imp.SETUPAPI.dll_SetupGetStringFieldW]
test eax, eax
je 0x1000883c
lea eax, [esp + 0x10]
push eax
push 0x50
lea eax, [esp + 0x50]
push eax
push 2
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetStringFieldW]
test eax, eax
je 0x1000883c
cmp dword [esp + 0x10], reloc.SETUPAPI.dll_CM_Set_DevNode_Problem_Ex
ja 0x1000881e
lea eax, [esp + 0x38]
push eax
push 0x10002174
lea eax, [esp + 0x50]
push eax
push esi
call dword [sym.imp.SETUPAPI.dll_SetupFindFirstLineW]
test eax, eax
je 0x10008808
xor esi, esi
push esi
push 0x1000
push 0x1000fc78
push 1
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetStringFieldW]
test eax, eax
je 0x100087e4
mov ecx, 0x1000fc78
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x1000862c
sub ecx, edx
sar ecx, 1
cmp ecx, 2
jb 0x100087d5
lea eax, [esp + 0x14]
push eax
push 0x1000fc78
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov esi, eax
mov dword [esp + 0x1c], esi
test esi, esi
je 0x100087b4
cmp dword [esp + 0x14], 0
je 0x100087b4
cmp dword [esp + 0x14], 1
jle 0x10008687
push 0x100023d8
call fcn.10009770
pop ecx
mov dword [esp + 0x14], 1
mov edx, dword [esi]
push edi
call fcn.1000a502
mov esi, eax
xor eax, eax
test esi, esi
sete al
mov dword [esp + 0x14], eax
test esi, esi
jne 0x100087c7
mov dword [edi - 4], eax
test eax, eax
je 0x100087b4
push 1
mov ecx, edi
mov edx, reloc.ADVAPI32.dll_EventUnregister
call fcn.1000b48b
test eax, eax
js 0x100086eb
push dword [edi + 4]
lea eax, [edi + 0xc]
push dword [edi]
push eax
push 0x10002508
call fcn.10009770
mov eax, dword [esp + 0x30]
add esp, 0x10
inc eax
mov dword [esp + 0x20], eax
add edi, 0x210
mov dword [0x1000f860], eax
lea eax, [esp + 0x28]
push eax
push 0x10001f54
push eax
call dword [sym.imp.SETUPAPI.dll_SetupFindNextMatchLineW]
test eax, eax
jne 0x10008584
mov edx, dword [0x1000f860]
test edx, edx
jne 0x10008720
push 0x100025c8
call fcn.10009770
pop ecx
push 0xd
jmp 0x100087c1
xor ecx, ecx
mov dword [esp + 0x10], ecx
test edx, edx
je 0x10008857
mov edi, dword [0x1000e05c]
mov ebx, dword [reloc.ADVAPI32.dll_EventUnregister]
mov eax, 0x1000e3bc
cmp ebx, dword [eax]
je 0x10008753
mov edx, dword [esp + 0x18]
mov eax, ebx
sub eax, dword [edx]
mov edx, dword [0x1000f860]
jmp 0x1000876b
cmp edi, dword [eax + 4]
je 0x10008769
mov ebx, dword [esp + 0x18]
mov eax, edi
sub eax, dword [ebx + 4]
mov ebx, dword [reloc.ADVAPI32.dll_EventUnregister]
jmp 0x1000876b
xor eax, eax
test eax, eax
js 0x1000878a
mov eax, dword [esp + 0x18]
inc ecx
add eax, 0x210
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], eax
cmp ecx, edx
jb 0x1000873f
jmp 0x10008857
imul ecx, ecx, 0x210
lea eax, reloc.SETUPAPI.dll_CM_Set_DevNode_Problem_Ex
push eax
push dword [ecx + 0x1000e3c0]
push dword [ecx + 0x1000e3bc]
push edi
push ebx
push 0x100026f0
call fcn.10009770
add esp, 0x18
jmp 0x100087bf
push 0x10002348
call fcn.10009770
pop ecx
push 0x57
pop esi
jmp 0x10008857
push esi
call fcn.10009788
push eax
push 0x10002488
jmp 0x10008850
push 0xd
pop esi
push 0x1000fc78
push 0x100022b0
jmp 0x10008850
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
call fcn.10009788
push eax
push 0x10002174
push ebx
push 0x10002230
call fcn.10009770
add esp, 0x10
jmp 0x10008857
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
call fcn.10009788
push eax
push 0x100021a0
jmp 0x10008850
push 0xd
pop esi
push esi
call fcn.10009788
push eax
push 0x1000
push 0x100020e0
call fcn.10009770
add esp, 0xc
jmp 0x10008857
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
call fcn.10009788
push eax
push 0x10002070
call fcn.10009770
pop ecx
pop ecx
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x10008866
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0xec]
pop edi
mov eax, esi
pop esi
pop ebx
xor ecx, esp
call fcn.1000cace
mov esp, ebp
pop ebp
ret