Function at 0x40a5e0
Capabilities:
Check for peb beingdebugged flag
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4547ff
mov eax, dword fs:[0]
push eax
sub esp, 0x170
mov eax, dword [0x466eb0]
xor eax, esp
mov dword [esp + 0x168], eax
push ebx
push esi
push edi
mov eax, dword [0x466eb0]
xor eax, esp
push eax
lea eax, [esp + 0x180]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov edi, ecx
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0xe0]
mov dword [esp + 0x24], edi
xor ebx, ebx
mov word [esp + 0x18], 1
call fcn.00411a00
mov dword [esp + 0x188], ebx
mov eax, 0xfffffe00
and dword [esp + 0x8c], eax
mov dword [esp + 0x90], ebx
and dword [esp + 0x6c], eax
mov dword [esp + 0x70], ebx
and dword [esp + 0x3c], eax
mov dword [esp + 0x40], ebx
and dword [esp + 0x4c], eax
mov dword [esp + 0x50], ebx
and dword [esp + 0x2c], eax
mov dword [esp + 0x30], ebx
mov byte [esp + 0x188], 0xa
xor ecx, ecx
mov eax, esi
mov word [esp + 0xa4], cx
mov dword [esp + 0xb8], 7
mov dword [esp + 0xb4], ebx
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, 2
cmp dx, bx
jne 0x40a6a6
sub eax, ecx
sar eax, 1
push eax
push esi
lea ecx, [esp + 0xac]
call fcn.00404dc0
lea edx, [esp + 0xa4]
push edx
lea eax, [esp + 0xc4]
push eax
mov byte [esp + 0x190], 0xb
call fcn.0040ec10
add esp, 8
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x118]
mov byte [esp + 0x194], 0xc
call fcn.004039e0
cmp dword [esp + 0x120], 0x10
mov ebx, dword [esp + 0x10c]
jae 0x40a713
lea ebx, [esp + 0x10c]
mov ecx, dword [esp + 0x11c]
push 1
lea edx, [esp + 0xe0]
push edx
add ecx, ebx
lea edx, [esp + 0x8c]
call fcn.00411b50
test al, al
sete bl
cmp dword [esp + 0xd4], 0x10
jb 0x40a751
mov eax, dword [esp + 0xc0]
push eax
call fcn.00438e41
add esp, 4
mov byte [esp + 0x188], 0xa
cmp dword [esp + 0xb8], 8
mov dword [esp + 0xd4], 0xf
mov dword [esp + 0xd0], 0
mov byte [esp + 0xc0], 0
jb 0x40a791
mov ecx, dword [esp + 0xa4]
push ecx
call fcn.00438e41
add esp, 4
test bl, bl
je 0x40a7fe
lea ecx, [esp + 0x24]
mov byte [esp + 0x188], 8
call fcn.0040f870
lea ecx, [esp + 0x44]
mov byte [esp + 0x188], 6
call fcn.0040f870
lea ecx, [esp + 0x34]
mov byte [esp + 0x188], 4
call fcn.0040f870
lea ecx, [esp + 0x64]
mov byte [esp + 0x188], 2
call fcn.0040f870
lea ecx, [esp + 0x84]
mov byte [esp + 0x188], 0
call fcn.0040f870
lea ecx, [esp + 0xdc]
call fcn.0040b070
jmp 0x40afff
push str.drivers
lea edx, [esp + 0x88]
push edx
call fcn.0040fe10
lea esi, [esp + 0x64]
call fcn.0040f910
xor esi, esi
mov dword [esp + 0x18], esi
nop
movsx eax, byte [esp + 0x6c]
cmp eax, 7
ja case.0x40a82e.0
jmp dword [eax*4 + 0x40b028]
mov eax, dword [esp + 0x64]
cmp dword [eax + 8], 0
je case.0x40a82e.0
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
call fcn.00410c20
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 0x14]
inc eax
jmp 0x40a864
mov edx, dword [esp + 0x64]
mov eax, dword [edx + 8]
cmp esi, eax
jae case.0x40a82e.0
lea eax, [esp + 0xa4]
push eax
push ecx
push esi
lea ecx, [esp + 0x70]
push ecx
call fcn.0040fb80
add esp, 4
mov ecx, eax
call fcn.0040f990
mov byte [esp + 0x188], 0xd
cmp dword [eax + 0x14], 0x10
jb 0x40a89c
mov esi, dword [eax]
jmp 0x40a89e
mov esi, eax
mov edx, dword [0x466c18]
mov eax, dword [edx + 0xc]
mov ecx, 0x466c18
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0x188], 0xe
test esi, esi
je 0x40a8e8
test esi, 0xffff0000
jne 0x40a8e8
movzx esi, si
push 0
push esi
call fcn.004099e0
add esp, 8
test eax, eax
je 0x40a8f2
push esi
push eax
lea ecx, [esp + 0x1c]
call fcn.0040a140
jmp 0x40a8f2
push esi
lea ecx, [esp + 0x18]
call fcn.0040b210
lea esi, [edi + 0xc]
lea ebx, [esp + 0x14]
mov byte [esp + 0x188], 0xf
call fcn.0040b110
mov byte [esp + 0x188], 0xd
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a92e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x188], 0xa
cmp dword [esp + 0xb8], 0x10
jb 0x40a950
mov ecx, dword [esp + 0xa4]
push ecx
call fcn.00438e41
add esp, 4
inc dword [esp + 0x18]
mov esi, dword [esp + 0x18]
jmp 0x40a820
push str.vidpids
lea edx, [esp + 0x88]
push edx
call fcn.0040fe10
push eax
lea ecx, [esp + 0x58]
call fcn.0040f710
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x5c]
mov ebx, dword [esp + 0x54]
movsx eax, dl
xor eax, ecx
and eax, 0xff
movzx esi, cl
xor ecx, eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x54], eax
and edx, 0xffffff00
or edx, esi
mov esi, dword [esp + 0x38]
mov eax, edx
shl eax, 0x17
sar eax, 0x1f
mov dword [esp + 0x34], ebx
mov ebx, dword [esp + 0x58]
mov dword [esp + 0x58], esi
shl eax, 8
xor eax, ecx
mov esi, edx
xor esi, ecx
and eax, 0x100
xor ecx, eax
and esi, 0x100
xor edx, esi
mov dword [esp + 0x5c], ecx
lea ecx, [esp + 0x54]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], edx
call fcn.0040f870
lea edx, [esp + 0xa4]
lea ecx, [esp + 0x34]
mov dword [edi + 4], 0
call fcn.0040fff0
mov byte [esp + 0x188], 0x10
mov eax, dword [esp + 0xa4]
mov dword [esp + 0x18], eax
cmp eax, dword [esp + 0xa8]
je 0x40ae52
mov eax, dword [esp + 0x18]
cmp dword [eax + 0x14], 0x10
jb 0x40aa2c
mov eax, dword [eax]
push eax
lea eax, [esp + 0x38]
push eax
call fcn.0040fe10
push eax
lea ecx, [esp + 0x98]
call fcn.0040f710
mov ebx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x9c]
mov esi, dword [esp + 0x94]
mov edi, dword [esp + 0x98]
movsx eax, bl
xor eax, ecx
and eax, 0xff
movzx edx, cl
xor ecx, eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x94], eax
and ebx, 0xffffff00
or ebx, edx
mov edx, dword [esp + 0x48]
mov eax, ebx
shl eax, 0x17
sar eax, 0x1f
mov dword [esp + 0x98], edx
shl eax, 8
xor eax, ecx
mov edx, ebx
xor edx, ecx
and eax, 0x100
xor ecx, eax
and edx, 0x100
xor ebx, edx
mov dword [esp + 0x9c], ecx
lea ecx, [esp + 0x94]
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], ebx
call fcn.0040f870
movsx eax, bl
cmp eax, 7
ja case.0x40aad1.0
jmp dword [eax*4 + 0x40b048]
cmp dword [esi + 8], 0
je case.0x40aad1.0
mov eax, dword [esi + 4]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
call fcn.00410c20
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 0x14]
inc eax
mov dword [esp + 0x14], eax
jmp 0x40ab0d
mov edx, dword [esi + 8]
mov dword [esp + 0x14], edx
jmp 0x40ab0d
mov dword [esp + 0x14], 0
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 4]
mov edx, dword [esp + 0x14]
mov ebx, dword [ecx + 8]
lea esi, [eax + edx]
add esi, esi
add eax, eax
add eax, eax
add esi, esi
mov dword [esp + 0x1c], eax
cmp esi, eax
ja 0x40ab32
mov edi, ebx
jmp 0x40ab69
push esi
call fcn.00437584
mov edi, eax
add esp, 4
test edi, edi
je 0x40ab69
push esi
push 0
push edi
call fcn.004391a0
add esp, 0xc
test ebx, ebx
je 0x40ab69
mov eax, dword [esp + 0x1c]
push eax
push ebx
push edi
call fcn.00439c00
add esp, 0xc
push ebx
call fcn.0043921a
add esp, 4
mov ecx, dword [esp + 0x20]
mov dword [ecx + 8], edi
lea edx, [esp + 0xc0]
lea ecx, [esp + 0x44]
call fcn.0040fff0
mov byte [esp + 0x188], 0x11
mov edi, dword [esp + 0xc0]
mov esi, dword [esp + 0xc4]
mov dword [esp + 0x1c], 0
cmp edi, esi
je 0x40add4
jmp 0x40abb0
push 0x34
mov ebx, 8
call fcn.00439a65
add esp, 4
lea edx, [esp + 0x15c]
push edi
push edx
mov esi, eax
call fcn.0040ecf0
add esp, 8
cmp dword [eax + 0x14], ebx
jb 0x40abd9
mov eax, dword [eax]
push eax
push 5
push esi
call fcn.004395f9
add esp, 0xc
cmp dword [esp + 0x170], ebx
jb 0x40abfe
mov eax, dword [esp + 0x15c]
push eax
call fcn.00438e41
add esp, 4
mov ecx, dword [esp + 0x18]
push ecx
lea edx, [esp + 0x160]
push edx
call fcn.0040ecf0
add esp, 8
cmp dword [eax + 0x14], ebx
jb 0x40ac1a
mov eax, dword [eax]
push eax
lea eax, [esi + 0xa]
push 5
push eax
call fcn.004395f9
add esp, 0xc
cmp dword [esp + 0x170], ebx
jb 0x40ac42
mov ecx, dword [esp + 0x15c]
push ecx
call fcn.00438e41
add esp, 4
cmp dword [edi + 0x14], 0x10
jb 0x40ac4c
mov eax, dword [edi]
jmp 0x40ac4e
mov eax, edi
push eax
lea edx, [esp + 0x48]
push edx
call fcn.0040fe10
push eax
lea ecx, [esp + 0x78]
call fcn.0040f710
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x7c]
movsx eax, dl
xor eax, ecx
movzx ebx, cl
and eax, 0xff
xor ecx, eax
mov eax, dword [esp + 0x24]
and edx, 0xffffff00
or edx, ebx
mov ebx, dword [esp + 0x28]
mov dword [esp + 0x58], ebx
mov ebx, dword [esp + 0x74]
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0x78]
mov dword [esp + 0x78], eax
mov eax, edx
shl eax, 0x17
sar eax, 0x1f
mov dword [esp + 0x28], ebx
shl eax, 8
xor eax, ecx
mov ebx, edx
xor ebx, ecx
and eax, 0x100
xor ecx, eax
and ebx, 0x100
xor edx, ebx
mov dword [esp + 0x7c], ecx
lea ecx, [esp + 0x74]
mov dword [esp + 0x2c], edx
call fcn.0040f870
push str.XP_32
lea ecx, [esp + 0x28]
push ecx
call fcn.0040fe10
mov ecx, eax
call fcn.0040fa80
push str.XP_64
lea edx, [esp + 0x28]
push edx
mov dword [esi + 0x14], eax
call fcn.0040fe10
mov ecx, eax
call fcn.0040fa80
mov dword [esi + 0x18], eax
push str.Vista_32
lea eax, [esp + 0x28]
push eax
call fcn.0040fe10
mov ecx, eax
call fcn.0040fa80
push str.Vista_64
lea ecx, [esp + 0x28]
push ecx
mov dword [esi + 0x1c], eax
call fcn.0040fe10
mov ecx, eax
call fcn.0040fa80
push str.Win7_32
lea edx, [esp + 0x28]
push edx
mov dword [esi + 0x20], eax
call fcn.0040fe10
mov ecx, eax
call fcn.0040fa80
mov dword [esi + 0x24], eax
push str.Win7_64
lea eax, [esp + 0x28]
push eax
call fcn.0040fe10
mov ecx, eax
call fcn.0040fa80
push str.Win8_32
lea ecx, [esp + 0x28]
push ecx
mov dword [esi + 0x28], eax
call fcn.0040fe10
mov ecx, eax
call fcn.0040fa80
push str.Win8_64
lea edx, [esp + 0x28]
push edx
mov dword [esi + 0x2c], eax
call fcn.0040fe10
mov ecx, eax
call fcn.0040fa80
mov ecx, dword [esp + 0x20]
mov dword [esi + 0x30], eax
mov edx, dword [ecx + 4]
mov eax, dword [esp + 0x1c]
mov ecx, dword [ecx + 8]
add edx, eax
mov dword [ecx + edx*4], esi
mov esi, dword [esp + 0xc4]
add edi, 0x1c
inc eax
mov dword [esp + 0x1c], eax
cmp edi, esi
jne 0x40abb0
mov edi, dword [esp + 0xc0]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
add dword [eax + 4], edx
xor eax, eax
mov byte [esp + 0x188], 0x10
cmp edi, eax
je 0x40ae25
mov ebx, edi
cmp edi, esi
je 0x40ae1a
cmp dword [ebx + 0x14], 0x10
jb 0x40ae06
mov eax, dword [ebx]
push eax
call fcn.00438e41
add esp, 4
xor eax, eax
mov dword [ebx + 0x14], 0xf
mov dword [ebx + 0x10], eax
mov byte [ebx], 0
add ebx, 0x1c
cmp ebx, esi
jne 0x40adf3
push edi
call fcn.00438e41
add esp, 4
xor eax, eax
mov dword [esp + 0xc0], eax
mov dword [esp + 0xc4], eax
mov dword [esp + 0xc8], eax
mov eax, dword [esp + 0x18]
add eax, 0x1c
mov dword [esp + 0x18], eax
cmp eax, dword [esp + 0xa8]
jne 0x40aa20
mov esi, dword [esp + 0xa4]
mov ebx, 0xf
test esi, esi
je 0x40aea5
mov edi, dword [esp + 0xa8]
cmp esi, edi
je 0x40ae95
lea ecx, [ecx]
cmp dword [esi + 0x14], 0x10
jb 0x40ae81
mov eax, dword [esi]
push eax
call fcn.00438e41
add esp, 4
mov dword [esi + 0x14], ebx
mov dword [esi + 0x10], 0
mov byte [esi], 0
add esi, 0x1c
cmp esi, edi
jne 0x40ae70
mov eax, dword [esp + 0xa4]
push eax
call fcn.00438e41
add esp, 4
lea ecx, [esp + 0x24]
mov byte [esp + 0x188], 8
call fcn.0040f870
lea ecx, [esp + 0x44]
mov byte [esp + 0x188], 6
call fcn.0040f870
lea ecx, [esp + 0x34]
mov byte [esp + 0x188], 4
call fcn.0040f870
lea ecx, [esp + 0x64]
mov byte [esp + 0x188], 2
call fcn.0040f870
lea ecx, [esp + 0x84]
mov byte [esp + 0x188], 0
call fcn.0040f870
mov esi, 0x10
cmp dword [esp + 0x150], esi
jb 0x40af1b
mov ecx, dword [esp + 0x13c]
push ecx
call fcn.00438e41
add esp, 4
xor edi, edi
mov dword [esp + 0x150], ebx
mov dword [esp + 0x14c], edi
mov byte [esp + 0x13c], 0
cmp dword [esp + 0x120], esi
jb 0x40af4c
mov edx, dword [esp + 0x10c]
push edx
call fcn.00438e41
add esp, 4
lea ecx, [esp + 0xf4]
mov dword [esp + 0x120], ebx
mov dword [esp + 0x11c], edi
mov byte [esp + 0x10c], 0
call fcn.0040b3d0
mov eax, dword [esp + 0xf4]
push eax
call fcn.00438e41
mov eax, dword [esp + 0xf0]
add esp, 4
mov dword [esp + 0xf4], edi
cmp eax, edi
je 0x40afa5
dec eax
jne 0x40af9a
mov dword [esp + 0xe8], edi
cmp eax, edi
jne 0x40af90
mov dword [esp + 0xec], eax
mov esi, dword [esp + 0xe4]
mov eax, dword [esp + 0xe0]
cmp esi, edi
jbe 0x40afd4
dec esi
cmp dword [eax + esi*4], edi
je 0x40afd0
mov ecx, dword [eax + esi*4]
push ecx
call fcn.00438e41
mov eax, dword [esp + 0xe4]
add esp, 4
cmp esi, edi
ja 0x40afb7
cmp eax, edi
je 0x40afe1
push eax
call fcn.00438e41
add esp, 4
mov edx, dword [esp + 0xdc]
push edx
mov dword [esp + 0xe8], edi
mov dword [esp + 0xe4], edi
call fcn.00438e41
add esp, 4
mov ecx, dword [esp + 0x180]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.00438fc8
mov esp, ebp
pop ebp
ret 4