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

Disassembly:
push 0xffffffffffffffff
push 0x4212f1
mov eax, dword fs:[0]
push eax
sub esp, 0x398
mov eax, dword [0x42b1d0]
xor eax, esp
mov dword [esp + 0x394], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x42b1d0]
xor eax, esp
push eax
lea eax, [esp + 0x3ac]
mov dword fs:[0], eax
mov eax, dword [esp + 0x3bc]
mov edi, ecx
xor ebx, ebx
push 0x104
lea ecx, [esp + 0x94]
mov esi, edx
push ebx
push ecx
mov dword [esp + 0x24], edi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], eax
mov dword [esp + 0x2c], ebx
call fcn.004183e0
add esp, 0xc
push 2
push ebx
push ebx
push 0x42c0ac
mov dword [esi], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
jne 0x402de1
push str.FindCDRForHardID___SetupDiGetClassDevs_return_INVALID_HANDLE_VALUE.
call fcn.004124a0
add esp, 4
or eax, 0xffffffff
jmp 0x403386
push esi
push ebx
push eax
mov dword [esp + 0x38], ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x40336f
mov esi, dword [edi + 0x70]
cmp esi, dword [edi + 0x74]
jbe 0x402e03
call fcn.00413a68
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x30]
mov ebx, dword [esp + 0x1c]
mov ebp, dword [edx + 0x64]
mov dword [esp + 0x28], esi
call fcn.00402940
xor ebx, ebx
cmp eax, ebx
je 0x403357
push 0x103
push eax
lea eax, [esp + 0x98]
push eax
call fcn.00413040
add esp, 0xc
push 0xd
push str.vid_12d1pid_
lea ecx, [esp + 0x44]
mov dword [esp + 0x5c], 0xf
mov dword [esp + 0x58], ebx
mov byte [esp + 0x48], bl
call fcn.00401c30
mov edi, dword [esp + 0x34]
mov eax, edi
mov dword [esp + 0x3b4], ebx
lea edx, [eax + 1]
jmp 0x402e70
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x402e70
sub eax, edx
je 0x402fb0
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x402e84
sub eax, edx
push eax
push edi
lea eax, [esp + 0x44]
call fcn.00401740
cmp dword [esp + 0x54], 0x10
mov esi, dword [esp + 0x40]
jae 0x402ea7
lea esi, [esp + 0x40]
lea ecx, [esp + 0x90]
push ecx
call fcn.00412c85
add esp, 4
push esi
push eax
call fcn.00413540
add esp, 8
test eax, eax
je 0x403167
mov eax, edi
mov dword [esp + 0x20], 1
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x402ed6
mov ebp, dword [esp + 0x18]
sub eax, edx
push eax
lea esi, [ebp + 0x48]
push edi
mov ecx, esi
call fcn.00401c30
cmp dword [esi + 0x18], 0x10
jb 0x402efa
mov esi, dword [esi + 4]
jmp 0x402efd
add esi, 4
push esi
push str.the_CDROM_PID_is__s
call fcn.004124a0
mov edi, 0xf
lea eax, [esp + 0x98]
add esp, 8
mov dword [esp + 0x70], edi
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x402f26
sub eax, edx
push eax
lea edx, [esp + 0x94]
push edx
lea ecx, [esp + 0x60]
call fcn.00401c30
push 5
push str.rev_
lea eax, [esp + 0x60]
push eax
mov byte [esp + 0x3c0], 1
call fcn.00401930
mov esi, eax
cmp esi, 0xffffffff
jne 0x40329a
mov esi, 0x10
cmp dword [esp + 0x70], esi
jb 0x402f7d
mov ecx, dword [esp + 0x5c]
push ecx
call fcn.0041288e
add esp, 4
mov dword [esp + 0x3b4], 0xffffffff
mov dword [esp + 0x70], edi
mov dword [esp + 0x6c], ebx
mov byte [esp + 0x5c], bl
cmp dword [esp + 0x54], esi
jb 0x403191
mov edx, dword [esp + 0x40]
push edx
jmp 0x403189
mov edi, dword [esp + 0x18]
mov esi, dword [edi + 0x74]
cmp dword [edi + 0x70], esi
jbe 0x402fc1
call fcn.00413a68
mov eax, dword [edi + 0x64]
cmp ebp, ebx
je 0x402fcc
cmp ebp, eax
je 0x402fd1
call fcn.00413a68
cmp dword [esp + 0x28], esi
je 0x403167
push 0xd
push str.vid_12d1pid_
lea ecx, [esp + 0x44]
call fcn.00401c30
cmp ebp, ebx
jne 0x40308c
call fcn.00413a68
xor eax, eax
mov ecx, dword [esp + 0x28]
cmp ecx, dword [eax + 0x10]
jb 0x403008
call fcn.00413a68
mov edi, dword [esp + 0x28]
push ebx
add edi, 0x1c
push edi
or eax, 0xffffffff
lea esi, [esp + 0x44]
call fcn.00401b40
cmp dword [esp + 0x54], 0x10
mov esi, dword [esp + 0x40]
jae 0x40302c
lea esi, [esp + 0x40]
lea edx, [esp + 0x90]
push edx
call fcn.00412c85
add esp, 4
push esi
push eax
call fcn.00413540
add esp, 8
test eax, eax
je 0x40313f
mov dword [esp + 0x20], 1
cmp ebp, ebx
jne 0x403094
call fcn.00413a68
xor eax, eax
mov ecx, dword [esp + 0x28]
cmp ecx, dword [eax + 0x10]
jb 0x40306f
call fcn.00413a68
mov esi, dword [esp + 0x18]
push 0xffffffffffffffff
push ebx
add esi, 0x48
push edi
mov ecx, esi
call fcn.00401850
cmp dword [esi + 0x18], 0x10
jb 0x403099
mov esi, dword [esi + 4]
jmp 0x40309c
mov eax, dword [ebp]
jmp 0x402ffa
mov eax, dword [ebp]
jmp 0x403061
add esi, 4
push esi
push str.the_CDROM_PID_is__s
call fcn.004124a0
mov edi, 0xf
lea eax, [esp + 0x98]
add esp, 8
mov dword [esp + 0x8c], edi
mov dword [esp + 0x88], ebx
mov byte [esp + 0x78], bl
lea edx, [eax + 1]
jmp 0x4030d0
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4030d0
sub eax, edx
push eax
lea edx, [esp + 0x94]
push edx
lea ecx, [esp + 0x7c]
call fcn.00401c30
push 5
push str.rev_
lea eax, [esp + 0x7c]
push eax
mov byte [esp + 0x3c0], 2
call fcn.00401930
mov esi, eax
cmp esi, 0xffffffff
jne 0x4031bc
mov byte [esp + 0x3b4], bl
cmp dword [esp + 0x8c], 0x10
jb 0x40312d
mov ecx, dword [esp + 0x78]
push ecx
call fcn.0041288e
add esp, 4
mov dword [esp + 0x8c], edi
mov dword [esp + 0x88], ebx
mov byte [esp + 0x78], bl
cmp ebp, ebx
jne 0x403162
call fcn.00413a68
xor eax, eax
mov edx, dword [esp + 0x28]
cmp edx, dword [eax + 0x10]
jb 0x403158
call fcn.00413a68
add dword [esp + 0x28], 0x38
jmp 0x402fb0
mov eax, dword [ebp]
jmp 0x40314a
cmp dword [esp + 0x20], 1
je 0x40327d
mov dword [esp + 0x3b4], 0xffffffff
cmp dword [esp + 0x54], 0x10
jb 0x403191
mov eax, dword [esp + 0x40]
push eax
call fcn.0041288e
add esp, 4
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x1c]
inc eax
push ecx
push eax
push edx
mov dword [esp + 0x38], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x403369
mov edi, dword [esp + 0x18]
jmp 0x402df6
push 0x104
lea eax, [esp + 0x19c]
push ebx
push eax
call fcn.004183e0
add esp, 0xc
lea ecx, [esp + 0x90]
push ecx
push str.The_hardware_is__s
call fcn.004124a0
push 0x26
push str.the_character_is__d
call fcn.004124a0
mov al, byte [esp + esi + 0xa5]
lea ecx, [esp + esi + 0xa5]
add esp, 0x10
cmp al, 0x26
je 0x40321f
lea edx, [esp + 0x198]
sub edx, ecx
mov edi, edi
cmp al, bl
je 0x40321f
mov byte [edx + ecx], al
mov al, byte [ecx + 1]
inc ecx
cmp al, 0x26
jne 0x403210
lea eax, [esp + 0x198]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x403230
mov ecx, dword [esp + 0x18]
sub eax, edx
push eax
lea edx, [esp + 0x19c]
push edx
add ecx, 0xac
call fcn.00401c30
lea eax, [esp + 0x198]
push eax
push str.m_strCurDevVer_is:__s
call fcn.004124a0
add esp, 8
cmp dword [esp + 0x8c], 0x10
jb 0x40327d
mov ecx, dword [esp + 0x78]
push ecx
call fcn.0041288e
add esp, 4
cmp dword [esp + 0x54], 0x10
jb 0x403382
mov ecx, dword [esp + 0x40]
push ecx
call fcn.0041288e
add esp, 4
jmp 0x403382
push 0x104
lea edx, [esp + 0x2a4]
push ebx
push edx
call fcn.004183e0
add esp, 0xc
lea eax, [esp + 0x90]
push eax
push str.The_hardware_is__s
call fcn.004124a0
push 0x26
push str.the_character_is__d
call fcn.004124a0
mov al, byte [esp + esi + 0xa5]
lea ecx, [esp + esi + 0xa5]
add esp, 0x10
cmp al, 0x26
je 0x4032ff
lea edx, [esp + 0x2a0]
sub edx, ecx
lea esp, [esp]
cmp al, bl
je 0x4032ff
mov byte [edx + ecx], al
mov al, byte [ecx + 1]
inc ecx
cmp al, 0x26
jne 0x4032f0
lea eax, [esp + 0x2a0]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x403310
sub eax, edx
push eax
lea ecx, [esp + 0x2a4]
push ecx
lea ecx, [ebp + 0xac]
call fcn.00401c30
lea edx, [esp + 0x2a0]
push edx
push str.m_strCurDevVer_is:__s
call fcn.004124a0
add esp, 8
cmp dword [esp + 0x70], 0x10
jb 0x40327d
mov eax, dword [esp + 0x5c]
push eax
jmp 0x403275
push str.GetDeviceHardWareID___return_NULL
call fcn.004124a0
add esp, 4
or eax, 0xffffffff
jmp 0x403386
cmp dword [esp + 0x20], ebx
jne 0x403382
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov dword [esp + 0x1c], 0xffffffff
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x3ac]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x394]
xor ecx, esp
call fcn.00412899
add esp, 0x3a4
ret 4