Function at 0x522585
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf34
call fcn.004fd17e
mov dword [ebp - 0x294], eax
lea eax, [ebp - 0x104]
push eax
call fcn.00529440
add esp, 4
cmp dword [ebp - 0x294], 1
jne 0x5225c5
push str.UFD_MPFactoryDriverWin2000
lea ecx, [ebp - 0x104]
push ecx
call fcn.0054bea0
add esp, 8
cmp dword [ebp - 0x294], 2
jne 0x5225e2
push str.UFD_MPFactoryDriverWinXP
lea edx, [ebp - 0x104]
push edx
call fcn.0054bea0
add esp, 8
lea eax, [ebp - 0x104]
push eax
lea ecx, [ebp - 0x20c]
push ecx
call fcn.0054be90
add esp, 8
push 0x5caca4
lea edx, [ebp - 0x20c]
push edx
call fcn.0054bea0
add esp, 8
push str.smi32x2k.inf
lea eax, [ebp - 0x20c]
push eax
call fcn.0054bea0
add esp, 8
mov dword [0x6811ac], 0
mov dword [ebp - 0x290], 0
mov dword [ebp - 0x39c], 0
mov dword [ebp - 0x298], 0
push pe_nt_image_headers32
push 0
lea ecx, [ebp - 0x398]
push ecx
call fcn.0054bf90
add esp, 0xc
lea edx, [ebp - 0x20c]
push edx
push pe_nt_image_headers32
lea eax, [ebp - 0x398]
push eax
push 0x685848
push 0
push 0x5cacb8
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea ecx, [ebp - 0x398]
mov dword [ebp - 0x108], ecx
mov edx, dword [ebp - 0x108]
movsx eax, byte [edx]
test eax, eax
je 0x522a2c
lea ecx, [ebp - 0x20c]
push ecx
push 0x80
lea edx, [ebp - 0x424]
push edx
push 0x68584c
mov eax, dword [ebp - 0x108]
push eax
push str.Manufacturer
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push 0xa00
push 0
lea ecx, [ebp - 0xe24]
push ecx
call fcn.0054bf90
add esp, 0xc
lea edx, [ebp - 0x20c]
push edx
push 0xa00
lea eax, [ebp - 0xe24]
push eax
lea ecx, [ebp - 0x424]
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionA]
lea edx, [ebp - 0xe24]
push edx
lea eax, [ebp - 0xea4]
push eax
call fcn.0054be90
add esp, 8
push 0x2c
lea ecx, [ebp - 0xea4]
push ecx
call fcn.0054d0e0
add esp, 8
mov dword [ebp - 0x3a4], eax
mov edx, dword [ebp - 0x3a4]
add edx, 1
mov dword [ebp - 0x3a4], edx
mov eax, dword [ebp - 0x3a4]
mov byte [eax], 0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
push str.USBVID__04XPID__04X
lea eax, [ebp - 0x28c]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [ebp - 0xe24]
mov dword [ebp - 0x3a0], ecx
mov edx, dword [ebp - 0x3a0]
movsx eax, byte [edx]
test eax, eax
je 0x52296d
push 0x2c
mov ecx, dword [ebp - 0x3a0]
push ecx
call fcn.0054d0e0
add esp, 8
mov dword [ebp - 0xeb4], eax
push 0x3d
mov edx, dword [ebp - 0x3a0]
push edx
call fcn.0054d0e0
add esp, 8
mov dword [ebp - 0xeb4], eax
cmp dword [ebp - 0xeb4], 0
je 0x5227cd
push 0x2c
mov eax, dword [ebp - 0xeb4]
push eax
call fcn.0054d0e0
add esp, 8
mov dword [ebp - 0xeb4], eax
cmp dword [ebp - 0xeb4], 0
je 0x52293b
mov ecx, dword [ebp - 0xeb4]
add ecx, 1
mov dword [ebp - 0xeb4], ecx
mov edx, dword [ebp - 0xeb4]
movsx eax, byte [edx]
cmp eax, 0x20
jne 0x522808
mov ecx, dword [ebp - 0xeb4]
add ecx, 1
mov dword [ebp - 0xeb4], ecx
jmp 0x5227e9
mov edx, dword [ebp - 0xeb4]
push edx
mov eax, dword [0x6811ac]
shl eax, 7
add eax, 0x67fdac
push eax
call fcn.0054be90
add esp, 8
lea ecx, [ebp - 0x28c]
push ecx
mov edx, dword [0x6811ac]
shl edx, 7
add edx, 0x67fdac
push edx
call fcn.0054cb20
add esp, 8
test eax, eax
je 0x522852
mov dword [ebp - 0x39c], 1
push str.VID_
mov eax, dword [ebp - 0xeb4]
push eax
call fcn.0054cb20
add esp, 8
mov dword [ebp - 0xeb0], eax
cmp dword [ebp - 0xeb0], 0
je 0x5228c0
push 5
push 0
lea ecx, [ebp - 0xeac]
push ecx
call fcn.0054bf90
add esp, 0xc
push 4
mov edx, dword [ebp - 0xeb0]
add edx, 4
push edx
lea eax, [ebp - 0xeac]
push eax
call fcn.0054c7e0
add esp, 0xc
lea ecx, [ebp - 0xeac]
push ecx
call fcn.00529529
add esp, 4
mov edx, dword [0x6811ac]
mov word [edx*2 + 0x680dac], ax
push str.PID_
mov eax, dword [ebp - 0xeb4]
push eax
call fcn.0054cb20
add esp, 8
mov dword [ebp - 0xeb0], eax
cmp dword [ebp - 0xeb0], 0
je 0x52292e
push 5
push 0
lea ecx, [ebp - 0xeac]
push ecx
call fcn.0054bf90
add esp, 0xc
push 4
mov edx, dword [ebp - 0xeb0]
add edx, 4
push edx
lea eax, [ebp - 0xeac]
push eax
call fcn.0054c7e0
add esp, 0xc
lea ecx, [ebp - 0xeac]
push ecx
call fcn.00529529
add esp, 4
mov edx, dword [0x6811ac]
mov word [edx*2 + 0x680fac], ax
mov eax, dword [0x6811ac]
add eax, 1
mov dword [0x6811ac], eax
mov ecx, dword [ebp - 0x3a0]
movsx edx, byte [ecx]
test edx, edx
je 0x522959
mov eax, dword [ebp - 0x3a0]
add eax, 1
mov dword [ebp - 0x3a0], eax
jmp 0x52293b
mov ecx, dword [ebp - 0x3a0]
add ecx, 1
mov dword [ebp - 0x3a0], ecx
jmp 0x52276e
cmp dword [ebp - 0x39c], 0
jne 0x5229fa
lea edx, [ebp - 0x28c]
push edx
mov eax, dword [0x6811ac]
shl eax, 7
add eax, 0x67fdac
push eax
call fcn.0054be90
add esp, 8
mov ecx, dword [0x6811ac]
add ecx, 1
mov dword [0x6811ac], ecx
lea edx, [ebp - 0x28c]
push edx
lea eax, [ebp - 0xea4]
push eax
push 0x5cad00
lea ecx, [ebp - 0xf34]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [ebp - 0xf34]
push edx
mov eax, dword [ebp - 0x3a0]
push eax
call fcn.0054bea0
add esp, 8
lea ecx, [ebp - 0x20c]
push ecx
lea edx, [ebp - 0xe24]
push edx
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileSectionA]
mov ecx, dword [ebp - 0x108]
movsx edx, byte [ecx]
test edx, edx
je 0x522a18
mov eax, dword [ebp - 0x108]
add eax, 1
mov dword [ebp - 0x108], eax
jmp 0x5229fa
mov ecx, dword [ebp - 0x108]
add ecx, 1
mov dword [ebp - 0x108], ecx
jmp 0x52268f
mov eax, 1
mov esp, ebp
pop ebp
ret