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

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x4d356c
push eax
mov eax, 0x11d4
mov dword fs:[0], esp
call fcn.004bf9a0
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x18]
mov ebp, ecx
xor edi, edi
push eax
mov dword [esp + 0x28], ebp
mov dword [esp + 0x18], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], edi
call fcn.00497210
cmp eax, edi
jl 0x495b68
mov ecx, dword [esp + 0x18]
cmp ecx, edi
je 0x495b68
mov edx, dword [ecx]
lea eax, [esp + 0x1c]
push eax
push ecx
call dword [edx + 0x24]
mov ecx, dword [esp + 0x1c]
push 0x100
lea edx, [esp + 0xe8]
push ecx
push edx
call fcn.004c160e
mov eax, dword [esp + 0x28]
add esp, 0xc
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov eax, dword [esp + 0x18]
cmp eax, edi
je 0x495833
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push 8
push edi
push edi
push 0x4d9190
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4958f2
mov ebx, dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
lea edx, [esp + 0x70]
push edx
push edi
push esi
mov dword [esp + 0x7c], 0x1c
call ebx
test eax, eax
je 0x4958dd
mov ebp, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstanceIdA]
push 0
lea eax, [esp + 0x1e8]
push 0x1000
lea ecx, [esp + 0x78]
push eax
push ecx
push esi
inc edi
call ebp
test eax, eax
mov dword [esp + 0x14], eax
je 0x4958aa
lea edx, [esp + 0x1e4]
lea eax, [esp + 0xe4]
push edx
push eax
call fcn.004c0134
add esp, 8
test eax, eax
je 0x4958c1
lea ecx, [esp + 0x70]
mov dword [esp + 0x70], 0x1c
push ecx
push edi
push esi
call ebx
test eax, eax
jne 0x49586e
jmp 0x4958db
lea edx, [esp + 0x70]
push edx
push esi
push 5
call dword [sym.imp.SETUPAPI.dll_SetupDiCallClassInstaller]
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], 1
xor edi, edi
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
cmp dword [esp + 0x20], edi
jne 0x495b56
mov ebp, dword [esp + 0x24]
lea ecx, [esp + 0x8c]
call fcn.0046ceb0
lea ecx, [esp + 0xb8]
mov dword [esp + 0x11ec], edi
call fcn.0046ceb0
mov al, byte [esp + 0x13]
push edi
lea ecx, [esp + 0x44]
mov byte [esp + 0x11f0], 1
mov byte [esp + 0x44], al
call fcn.00406ad6
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edi
mov cl, byte [esp + 0x13]
push edi
mov byte [esp + 0x2c], cl
lea ecx, [esp + 0x2c]
mov byte [esp + 0x11f0], 2
call fcn.00406ad6
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], edi
push edi
push 0x640
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x98]
mov byte [esp + 0x11f8], 3
call fcn.0046d3e0
test eax, eax
je 0x495a9f
lea edx, [esp + 0x28]
lea ecx, [esp + 0x8c]
push edx
call fcn.0046ecc0
test eax, eax
je 0x495a9f
lea eax, [esp + 0x28]
push edi
push eax
lea ecx, [esp + 0x94]
call fcn.004a8f80
push eax
lea ecx, [esp + 0xc4]
call fcn.0046d070
test eax, eax
je 0x495a67
push edi
sub esp, 0x18
mov ecx, esp
mov dword [esp + 0x40], esp
push 0x503a34
call fcn.00405d20
lea ecx, [esp + 0x5c]
push ecx
push 0x645
lea ecx, [esp + 0xdc]
call fcn.0046dfc0
mov eax, dword [esp + 0x44]
mov esi, 0x4d68e8
cmp eax, edi
je 0x4959f5
mov esi, eax
mov ecx, dword [ebp + 4]
lea edx, [esp + 0x58]
push edx
call fcn.00428170
mov eax, dword [eax + 4]
cmp eax, edi
jne 0x495a0e
mov eax, 0x4d68e8
push esi
push eax
call fcn.004c0f13
add esp, 8
test eax, eax
mov eax, dword [esp + 0x68]
sete bl
cmp eax, edi
je 0x495a32
push eax
call fcn.004be17b
add esp, 4
mov dword [esp + 0x68], edi
mov eax, dword [esp + 0x5c]
cmp eax, edi
je 0x495a57
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x495a4e
cmp al, 0xff
je 0x495a4e
dec al
mov byte [ecx], al
jmp 0x495a57
push ecx
call fcn.004be17b
add esp, 4
test bl, bl
mov dword [esp + 0x5c], edi
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], edi
jne 0x495a82
lea eax, [esp + 0x28]
lea ecx, [esp + 0x8c]
push eax
call fcn.0046ecc0
test eax, eax
jne 0x495995
jmp 0x495a9f
lea ecx, [esp + 0xb8]
call fcn.0046f620
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x90]
call fcn.0046f120
mov eax, dword [esp + 0x38]
cmp eax, edi
je 0x495ab4
push eax
call fcn.004be17b
add esp, 4
mov dword [esp + 0x38], edi
mov eax, dword [esp + 0x2c]
cmp eax, edi
je 0x495ad9
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x495ad0
cmp al, 0xff
je 0x495ad0
dec al
mov byte [ecx], al
jmp 0x495ad9
push ecx
call fcn.004be17b
add esp, 4
mov eax, dword [esp + 0x50]
mov dword [esp + 0x2c], edi
cmp eax, edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
je 0x495afa
push eax
call fcn.004be17b
add esp, 4
mov dword [esp + 0x50], edi
mov eax, dword [esp + 0x44]
cmp eax, edi
je 0x495b1f
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x495b16
cmp al, 0xff
je 0x495b16
dec al
mov byte [ecx], al
jmp 0x495b1f
push ecx
call fcn.004be17b
add esp, 4
lea ecx, [esp + 0xb8]
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], edi
mov byte [esp + 0x11ec], 0
call fcn.0046cf30
lea ecx, [esp + 0x8c]
mov dword [esp + 0x11ec], 0xffffffff
call fcn.0046cf30
mov eax, dword [esp + 0x14]
neg eax
sbb eax, eax
and eax, 0x7fffbffb
add eax, 0x80004005
mov ecx, dword [esp + 0x11e4]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x11e0
ret