Function at 0x4059e0
Capabilities:
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x42408d
mov eax, dword fs:[0]
push eax
mov eax, 0x1410
call fcn.00411020
mov eax, dword [0x42ea04]
xor eax, esp
mov dword [esp + 0x140c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x42ea04]
xor eax, esp
push eax
lea eax, [esp + 0x1424]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov ecx, dword [esp + 0x1434]
lea eax, [esp + 0x18]
push eax
push ecx
mov dword [esp + 0x1434], ebx
call fcn.00404fb0
add esp, 8
test eax, eax
jne 0x405a7e
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x405a77
mov edx, dword [esp + 0x38]
push edx
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x1c]
push ecx
push edx
push eax
call fcn.00403180
mov eax, dword [esp + 0x2c]
push eax
call fcn.00407818
add esp, 0x14
xor eax, eax
jmp 0x406193
mov esi, dword [esp + 0x1c]
cmp esi, ebx
je 0x405aa1
mov ecx, dword [esp + 0x20]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jne 0x405aaa
call fcn.00411175
mov esi, dword [esp + 0x1c]
lea edx, [esp + 0x98]
push esi
push edx
call fcn.00403af0
add esp, 8
cmp dword [esp + 0xac], ebx
mov byte [esp + 0x142c], 1
jne 0x405b10
cmp dword [esp + 0xb0], 0x10
jb 0x405ae6
mov eax, dword [esp + 0x9c]
push eax
call fcn.00407818
add esp, 4
lea ecx, [esp + 0x18]
mov dword [esp + 0xb0], 0xf
mov dword [esp + 0xac], ebx
mov byte [esp + 0x9c], 0
call fcn.00404930
xor eax, eax
jmp 0x406193
push ebx
lea ecx, [esp + 0x1c]
call fcn.00401aa0
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0xa0]
push ecx
mov ecx, eax
call fcn.00402780
push ebx
lea ecx, [esp + 0x1c]
call fcn.00401aa0
mov edi, 0x10
cmp dword [eax + 0x18], edi
jb 0x405b45
mov eax, dword [eax + 4]
jmp 0x405b48
add eax, 4
lea edx, [esp + 0x5c]
push edx
push 2
push ebx
push eax
call dword [sym.imp.SETUPAPI.dll_SetupOpenInfFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x405b6a
cmp dword [esp + 0xb0], edi
jmp 0x405ad4
push 0x800
lea ecx, [esp + 0x824]
push ebx
push ecx
call fcn.00410c60
push 0x40
lea edx, [esp + 0x1f0]
push ebx
push edx
call fcn.00410c60
push 0x400
lea eax, [esp + 0x43c]
push ebx
push eax
call fcn.00410c60
add esp, 0x24
push 1
lea ecx, [esp + 0x1c]
call fcn.00401aa0
cmp dword [eax + 0x18], edi
jb 0x405bb8
mov eax, dword [eax + 4]
jmp 0x405bbb
add eax, 4
mov ebp, dword [sym.imp.SETUPAPI.dll_SetupFindFirstLineA]
lea ecx, [esp + 0x28]
push ecx
push str.BeginPrompt
push eax
push esi
call ebp
push 1
lea ecx, [esp + 0x1c]
call fcn.00401aa0
cmp dword [eax + 0x18], edi
jb 0x405be4
mov eax, dword [eax + 4]
jmp 0x405be7
add eax, 4
mov edi, dword [sym.imp.SETUPAPI.dll_SetupGetLineTextA]
lea edx, [esp + 0x14]
push edx
push 0x100
lea ecx, [esp + 0xe8]
push ecx
push str.BeginPrompt
push eax
push esi
lea edx, [esp + 0x40]
push edx
call edi
lea eax, [esp + 0x28]
push eax
push str.Prompt
lea ecx, [esp + 0xe8]
push ecx
push esi
call ebp
lea edx, [esp + 0x14]
push edx
push 0x800
lea eax, [esp + 0x828]
push eax
push str.Prompt
lea ecx, [esp + 0xf0]
push ecx
push esi
lea edx, [esp + 0x40]
push edx
call edi
lea eax, [esp + 0x28]
push eax
push str.ButtonType
lea ecx, [esp + 0xe8]
push ecx
push esi
call ebp
lea edx, [esp + 0x14]
push edx
push 0x40
lea eax, [esp + 0x1e8]
push eax
push str.ButtonType
lea ecx, [esp + 0xf0]
push ecx
push esi
lea edx, [esp + 0x40]
push edx
call edi
lea eax, [esp + 0x28]
push eax
push str.Title
lea ecx, [esp + 0xe8]
push ecx
push esi
call ebp
lea edx, [esp + 0x14]
push edx
push 0x400
lea eax, [esp + 0x428]
push eax
push str.Title
lea ecx, [esp + 0xf0]
push ecx
push esi
lea edx, [esp + 0x40]
push edx
call edi
push str.YESNO
lea ecx, [esp + 0xc8]
call fcn.00402dc0
mov ebx, eax
lea eax, [esp + 0x1e0]
push eax
lea ecx, [esp + 0x44]
mov byte [esp + 0x1430], 2
call fcn.00402dc0
mov byte [esp + 0x142c], 3
push ebx
push eax
call fcn.00402140
add esp, 8
cmp dword [esp + 0x58], 0x10
mov bl, al
jb 0x405d12
mov ecx, dword [esp + 0x44]
push ecx
call fcn.00407818
add esp, 4
cmp dword [esp + 0xdc], 0x10
mov dword [esp + 0x58], 0xf
mov dword [esp + 0x54], 0
mov byte [esp + 0x44], 0
mov byte [esp + 0x142c], 1
jb 0x405d49
mov edx, dword [esp + 0xc8]
push edx
call fcn.00407818
add esp, 4
test bl, bl
je 0x406124
push 4
lea eax, [esp + 0x424]
push eax
lea ecx, [esp + 0x828]
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor edx, edx
cmp eax, 6
sete dl
mov eax, edx
test eax, eax
je 0x406124
push str._132
lea ecx, [esp + 0x64]
call fcn.00402dc0
push eax
push 1
lea ecx, [esp + 0x20]
mov byte [esp + 0x1434], 4
call fcn.00401aa0
push eax
lea eax, [esp + 0x84]
push eax
call fcn.00402f60
add esp, 0xc
mov ebx, eax
push 0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1430], 5
call fcn.00401aa0
push eax
lea ecx, [esp + 0xc8]
push ebx
push ecx
call fcn.00402f60
add esp, 0xc
lea ecx, [esp + 0x7c]
call fcn.004021f0
lea ecx, [esp + 0x60]
mov byte [esp + 0x142c], 8
call fcn.004021f0
call fcn.004013a0
lea edx, [esp + 0xc4]
push edx
call fcn.00403200
add esp, 4
test eax, eax
jne 0x405e32
lea ecx, [esp + 0xc4]
call fcn.004021f0
lea ecx, [esp + 0x98]
call fcn.004021f0
lea ecx, [esp + 0x18]
call fcn.00404930
xor eax, eax
jmp 0x406193
lea eax, [esp + 0x28]
push eax
push str.ClassGUID
push str.Version
push esi
call ebp
lea ecx, [esp + 0x14]
push ecx
push 0x100
lea edx, [esp + 0x328]
push edx
push str.ClassGUID
push str.Version
push esi
lea eax, [esp + 0x40]
push eax
call edi
lea ecx, [esp + 0x320]
push ecx
lea edx, [esp + 0x44]
push edx
call fcn.00403790
mov ecx, dword [eax + 4]
mov edx, dword [eax + 8]
mov ebx, dword [eax]
mov eax, dword [eax + 0xc]
add esp, 8
mov dword [esp + 0xb8], ecx
lea ecx, [esp + 0x28]
push ecx
push str.Ricoh.DeviceDesc
push str.Strings
push esi
mov dword [esp + 0xcc], edx
mov dword [esp + 0xd0], eax
call ebp
lea edx, [esp + 0x14]
push edx
push 0x100
lea eax, [esp + 0x228]
push eax
push str.Ricoh.DeviceDesc
push str.Strings
push esi
lea ecx, [esp + 0x40]
push ecx
call edi
mov ecx, dword [esp + 0xb8]
lea edx, [esp + 0x220]
push edx
mov edx, dword [esp + 0xc0]
sub esp, 0x10
mov eax, esp
mov dword [eax], ebx
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0xd4]
mov dword [eax + 8], edx
mov dword [eax + 0xc], ecx
call fcn.00401440
push esi
call fcn.004052d0
add esp, 0x18
push 1
lea ecx, [esp + 0x1c]
call fcn.00401aa0
mov ebx, 0x10
cmp dword [eax + 0x18], ebx
jb 0x405f28
mov eax, dword [eax + 4]
jmp 0x405f2b
add eax, 4
lea edx, [esp + 0x28]
push edx
push str.DelDirs
push eax
push esi
call ebp
push 1
lea ecx, [esp + 0x1c]
call fcn.00401aa0
cmp dword [eax + 0x18], ebx
jb 0x405f4e
mov eax, dword [eax + 4]
jmp 0x405f51
add eax, 4
lea ecx, [esp + 0x14]
push ecx
push 0x100
lea edx, [esp + 0xe8]
push edx
push str.DelDirs
push eax
push esi
lea eax, [esp + 0x40]
push eax
call edi
lea ecx, [esp + 0xe0]
push ecx
push esi
call dword [sym.imp.SETUPAPI.dll_SetupGetLineCountA]
xor ebx, ebx
test eax, eax
mov dword [esp + 0x38], eax
jle 0x405fdd
lea ebx, [ebx]
lea edx, [esp + 0x28]
push edx
push ebx
lea eax, [esp + 0xe8]
push eax
push esi
call dword [sym.imp.SETUPAPI.dll_SetupGetLineByIndexA]
lea ecx, [esp + 0x3c]
push ecx
push 0x400
lea edx, [esp + 0x1028]
push edx
push 0
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetStringFieldA]
lea ecx, [esp + 0x1020]
push ecx
call fcn.00402420
add ebx, 1
add esp, 4
cmp ebx, dword [esp + 0x38]
jl 0x405f90
mov ebx, 0x10
cmp dword [esp + 0xdc], ebx
jb 0x405ffb
mov edx, dword [esp + 0xc8]
push edx
call fcn.00407818
add esp, 4
push 1
lea ecx, [esp + 0x1c]
call fcn.00401aa0
cmp dword [eax + 0x18], ebx
jb 0x406010
mov eax, dword [eax + 4]
jmp 0x406013
add eax, 4
lea ecx, [esp + 0x28]
push ecx
push str.EndPrompt
push eax
push esi
call ebp
push 1
lea ecx, [esp + 0x1c]
call fcn.00401aa0
cmp dword [eax + 0x18], ebx
jb 0x406036
mov eax, dword [eax + 4]
jmp 0x406039
add eax, 4
lea edx, [esp + 0x14]
push edx
push 0x100
lea ecx, [esp + 0xe8]
push ecx
push str.EndPrompt
push eax
push esi
lea edx, [esp + 0x40]
push edx
call edi
lea eax, [esp + 0x28]
push eax
push str.Prompt
lea ecx, [esp + 0xe8]
push ecx
push esi
call ebp
lea edx, [esp + 0x14]
push edx
push 0x800
lea eax, [esp + 0x828]
push eax
push str.Prompt
lea ecx, [esp + 0xf0]
push ecx
push esi
lea edx, [esp + 0x40]
push edx
call edi
lea eax, [esp + 0x28]
push eax
push str.ButtonType
lea ecx, [esp + 0xe8]
push ecx
push esi
call ebp
lea edx, [esp + 0x14]
push edx
push 0x40
lea eax, [esp + 0x1e8]
push eax
push str.ButtonType
lea ecx, [esp + 0xf0]
push ecx
push esi
lea edx, [esp + 0x40]
push edx
call edi
lea eax, [esp + 0x28]
push eax
push str.Title
lea ecx, [esp + 0xe8]
push ecx
push esi
call ebp
lea edx, [esp + 0x14]
push edx
push 0x400
lea eax, [esp + 0x428]
push eax
push str.Title
lea ecx, [esp + 0xf0]
push ecx
push esi
lea edx, [esp + 0x40]
push edx
call edi
push 0
lea eax, [esp + 0x424]
push eax
lea ecx, [esp + 0x828]
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call dword [sym.imp.SETUPAPI.dll_SetupCloseInfFile]
mov eax, dword [esp + 0x9c]
mov esi, 0x10
cmp dword [esp + 0xb0], esi
jae 0x406147
lea eax, [esp + 0x9c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [esp + 0xb0], esi
jb 0x406167
mov edx, dword [esp + 0x9c]
push edx
call fcn.00407818
add esp, 4
lea ecx, [esp + 0x18]
mov dword [esp + 0xb0], 0xf
mov dword [esp + 0xac], 0
mov byte [esp + 0x9c], 0
call fcn.00404930
mov eax, 1
mov ecx, dword [esp + 0x1424]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x140c]
xor ecx, esp
call fcn.00410f96
add esp, 0x141c
ret 4