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

Disassembly:
push 0xffffffffffffffff
push 0x43ac5e
mov eax, dword fs:[0]
push eax
sub esp, 0x48c
mov eax, dword [0x44b5d0]
xor eax, esp
mov dword [esp + 0x488], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x44b5d0]
xor eax, esp
push eax
lea eax, [esp + 0x4a0]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x4b0]
mov eax, dword [esp + 0x4b4]
mov dword [esp + 0x14], ecx
xor ecx, ecx
cmp dword [ebp + 8], ecx
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], ecx
jle 0x401cff
mov dword [esp + 0x24], ecx
jmp 0x401584
mov ecx, dword [esp + 0x24]
test ecx, ecx
jl 0x401d29
mov edx, dword [esp + 0x1c]
cmp edx, dword [ebp + 8]
jge 0x401d29
mov eax, dword [ebp + 4]
push 1
push 1
push 0
add eax, ecx
push 1
push eax
mov eax, dword [ebp]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
mov ebx, eax
or edi, 0xffffffff
cmp ebx, edi
mov dword [esp + 0x68], ebx
je 0x401cac
mov esi, dword [0x44cb70]
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x90]
push edx
push 0
push 0
push str.SymbolicName
push ebx
mov dword [esp + 0x40], 0x104
call esi
test eax, eax
jne 0x40186e
lea eax, [esp + 0x8c]
push str.DosDevices
push eax
call fcn.004239f5
add esp, 8
test eax, eax
je 0x4016ca
lea edi, [eax + 0xe]
push edi
lea ecx, [esp + 0x5c]
mov word [edi], 0x5c
mov word [eax + 0x10], 0x5c
mov word [eax + 0x12], 0x2e
call fcn.004024b0
mov esi, dword [esp + 0x18]
lea ebx, [esp + 0x58]
mov dword [esp + 0x4a8], 0
call fcn.00401ee0
mov dword [esp + 0x4a8], 0xffffffff
mov eax, dword [esp + 0x58]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40166f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [ebp + 0x10], 0
jne 0x40183e
cmp dword [esp + 0x14], 0
je 0x40183e
push edi
lea ecx, [esp + 0x40]
call fcn.004024b0
mov esi, dword [esp + 0x14]
lea ebx, [esp + 0x3c]
mov dword [esp + 0x4a8], 1
call fcn.00401ee0
mov dword [esp + 0x4a8], 0xffffffff
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x401832
lea ecx, [esp + 0x8c]
push str.___
push ecx
call fcn.004239f5
add esp, 8
test eax, eax
je 0x401795
lea edx, [esp + 0x8c]
push edx
lea ecx, [esp + 0x54]
mov word [esp + 0x92], 0x5c
mov word [esp + 0x94], 0x2e
call fcn.004024b0
mov esi, dword [esp + 0x18]
lea ebx, [esp + 0x50]
mov dword [esp + 0x4a8], 2
call fcn.00401ee0
mov dword [esp + 0x4a8], edi
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40174a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [ebp + 0x10], 0
jne 0x40183e
mov esi, dword [esp + 0x14]
test esi, esi
je 0x40183e
lea ecx, [esp + 0x8c]
push ecx
lea ecx, [esp + 0x48]
call fcn.004024b0
lea ebx, [esp + 0x44]
mov dword [esp + 0x4a8], 3
call fcn.00401ee0
mov dword [esp + 0x4a8], edi
mov eax, dword [esp + 0x44]
jmp 0x401825
lea ecx, [esp + 0x8c]
push ecx
lea ecx, [esp + 0x38]
call fcn.004024b0
mov esi, dword [esp + 0x18]
lea ebx, [esp + 0x34]
mov dword [esp + 0x4a8], 4
call fcn.00401ee0
mov dword [esp + 0x4a8], edi
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov ecx, edi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4017e4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [ebp + 0x10], 0
jne 0x40183e
cmp dword [esp + 0x14], 0
je 0x40183e
lea ecx, [esp + 0x8c]
push ecx
lea ecx, [esp + 0x50]
call fcn.004024b0
mov esi, dword [esp + 0x14]
lea ebx, [esp + 0x4c]
mov dword [esp + 0x4a8], 5
call fcn.00401ee0
mov dword [esp + 0x4a8], edi
mov eax, dword [esp + 0x4c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
lock xadd dword [edx], edi
dec edi
test edi, edi
jg 0x40183e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x18]
mov ecx, dword [edx + 4]
lea eax, [ecx - 1]
test eax, eax
jl 0x401d29
cmp eax, ecx
jge 0x401d29
mov ecx, dword [edx]
mov edx, dword [ecx + eax*4]
lea eax, [ecx + eax*4]
push edx
call fcn.00408230
add esp, 4
jmp 0x401b65
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x90]
push ecx
push 0
push 0
push str.PortName
push ebx
call esi
test eax, eax
jne 0x4019d4
mov eax, dword [esp + 0x28]
shr eax, 1
sub eax, 2
cmp word [esp + eax*2 + 0x8c], 0x3a
mov dword [esp + 0x28], eax
lea eax, [esp + eax*2 + 0x8c]
jne 0x4018b3
mov word [eax], 0
mov ebx, dword [esp + 0x18]
cmp dword [ebx + 4], 0
je 0x4018e4
lea edx, [esp + 0x8c]
push edx
lea ecx, [esp + 0x64]
call fcn.004024b0
or dword [esp + 0x20], 1
lea ecx, [esp + 0x60]
call fcn.00401f50
test eax, eax
jl 0x4018e4
xor bl, bl
jmp 0x4018e6
mov bl, 1
test byte [esp + 0x20], 1
je 0x401911
mov eax, dword [esp + 0x60]
and dword [esp + 0x20], 0xfffffffe
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401911
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x401b65
lea ecx, [esp + 0x8c]
push ecx
lea ecx, [esp + 0x58]
call fcn.004024b0
mov esi, dword [esp + 0x18]
lea ebx, [esp + 0x54]
mov dword [esp + 0x4a8], 6
call fcn.00401ee0
mov dword [esp + 0x4a8], edi
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov ecx, edi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x401968
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [ebp + 0x10], 0
jne 0x4019bf
mov esi, dword [esp + 0x14]
test esi, esi
je 0x4019bf
lea ecx, [esp + 0x8c]
push ecx
lea ecx, [esp + 0x60]
call fcn.004024b0
lea ebx, [esp + 0x5c]
mov dword [esp + 0x4a8], 7
call fcn.00401ee0
mov dword [esp + 0x4a8], edi
mov eax, dword [esp + 0x5c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
lock xadd dword [edx], edi
dec edi
test edi, edi
jg 0x4019bf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x8c]
push ecx
call fcn.00408230
add esp, 4
jmp 0x401b65
cmp dword [ebp + 0x10], 0
lea ecx, [ebp + 0x10]
je 0x401b35
mov edx, dword [esp + 0x1c]
xor eax, eax
cmp edx, dword [ebp + 8]
mov dword [esp + 0x70], 0x1c
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
jge 0x401d29
mov eax, dword [ebp + 4]
add eax, dword [esp + 0x24]
lea edx, [esp + 0x70]
push edx
push 0
push ecx
push eax
mov eax, dword [ebp]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x401b24
mov eax, dword [ebp]
mov esi, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
push 0
lea ecx, [esp + 0x30]
push ecx
push 0
push 0
lea edx, [esp + 0x80]
push edx
push eax
call esi
test eax, eax
jne 0x401b65
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x401b65
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.00409544
add esp, 4
push 0
mov edi, eax
mov dword [edi], 6
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x30]
push edx
mov edx, dword [ebp]
push eax
push edi
lea ecx, [esp + 0x80]
push ecx
push edx
call esi
test eax, eax
je 0x401b19
lea esi, [edi + 4]
lea edx, [esp + 0x294]
mov eax, esi
sub edx, esi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x401ab3
push 0x441c10
push esi
call fcn.004239f5
add esp, 8
test eax, eax
je 0x401ade
mov word [esp + 0x298], 0x2e
lea eax, [esp + 0x294]
push eax
lea ecx, [esp + 0x3c]
call fcn.004024b0
mov esi, dword [esp + 0x18]
lea ebx, [esp + 0x38]
mov dword [esp + 0x4a8], 8
call fcn.00401ee0
mov ecx, ebx
mov dword [esp + 0x4a8], 0xffffffff
call fcn.00402200
push edi
call fcn.00409549
add esp, 4
jmp 0x401b65
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00408230
add esp, 4
jmp 0x401b65
push 0
push 0x64
lea ecx, [esp + 0x6c]
push ecx
push 0x800
push eax
push 0
push 0x1100
call dword [0x44cb80]
mov esi, dword [esp + 0x64]
push esi
call fcn.00408230
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [esp + 0x68]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp + 0x10], 0
lea ecx, [ebp + 0x10]
je 0x401ce6
cmp dword [esp + 0x14], 0
je 0x401ce6
xor eax, eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov eax, dword [esp + 0x1c]
cmp eax, dword [ebp + 8]
mov dword [esp + 0x70], 0x1c
jge 0x401d29
mov eax, dword [ebp + 4]
add eax, dword [esp + 0x24]
lea edx, [esp + 0x70]
push edx
push 0
push ecx
push eax
mov eax, dword [ebp]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x401c9b
mov eax, dword [ebp]
mov esi, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
push 0
lea ecx, [esp + 0x34]
push ecx
push 0
push 0
lea edx, [esp + 0x80]
push edx
push eax
call esi
test eax, eax
jne 0x401ce6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x401ce6
mov ecx, dword [esp + 0x30]
push ecx
call fcn.00409544
add esp, 4
push 0
mov edi, eax
mov dword [edi], 6
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x34]
push edx
mov edx, dword [ebp]
push eax
push edi
lea ecx, [esp + 0x80]
push ecx
push edx
call esi
test eax, eax
je 0x401c90
lea ebp, [edi + 4]
push ebp
lea ecx, [esp + 0x44]
call fcn.004024b0
mov esi, dword [esp + 0x14]
lea ebx, [esp + 0x40]
mov dword [esp + 0x4a8], 9
call fcn.00401ee0
mov ecx, ebx
mov dword [esp + 0x4a8], 0xffffffff
call fcn.00402200
push ebp
call fcn.00408230
mov ebp, dword [esp + 0x70]
add esp, 4
push edi
call fcn.00409549
add esp, 4
jmp 0x401ce6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00408230
add esp, 4
jmp 0x401ce6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0x64
lea ecx, [esp + 0x50]
push ecx
push 0x800
push eax
push 0
push 0x1100
call dword [0x44cb80]
mov edx, dword [esp + 0x48]
push edx
call fcn.00408230
mov eax, dword [esp + 0x4c]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x1c]
add dword [esp + 0x24], 0x1c
add eax, 1
cmp eax, dword [ebp + 8]
mov dword [esp + 0x1c], eax
jl 0x401580
mov ecx, dword [esp + 0x4a0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x488]
xor ecx, esp
call fcn.00423ed2
add esp, 0x498
ret 8
push 0
push 0
push 1
push 0xc000008c
call dword [sym.imp.KERNEL32.dll_RaiseException]