Function at 0x4147f0
Capabilities:
Enumerate files on windows
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x45f2e8
mov eax, dword fs:[0]
push eax
sub esp, 0xcfc
mov eax, dword [0x47b038]
xor eax, esp
mov dword [esp + 0xcf8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x47b038]
xor eax, esp
push eax
lea eax, [esp + 0xd10]
mov dword fs:[0], eax
mov eax, dword [esp + 0xd24]
mov edi, dword [esp + 0xd20]
mov dword [esp + 0x28], ecx
xor ebp, ebp
lea ecx, [esp + 0x34]
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x2c], ebp
call fcn.004031d0
lea ecx, [esp + 0x64]
mov dword [esp + 0xd18], ebp
call fcn.004031d0
xor esi, esi
mov byte [esp + 0xd18], 1
cmp edi, ebp
je 0x414879
cmp word [edi], bp
je 0x414879
mov esi, edi
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x24]
push edx
push ebp
push ebp
push 3
push ebp
push esi
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x38], ebp
call sub.WINSPOOL.DRV_EnumPrinterDriversW
mov eax, dword [esp + 0x20]
cmp eax, ebp
je 0x41491a
push eax
call fcn.0044b473
mov edx, dword [esp + 0x24]
add esp, 4
mov ebx, eax
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x24]
push ecx
push edx
push ebx
push 3
push ebp
push esi
call sub.WINSPOOL.DRV_EnumPrinterDriversW
test eax, eax
je 0x41490b
xor ebp, ebp
cmp dword [esp + 0x1c], ebp
jle 0x41490b
lea edi, [ebx + 4]
push 0x208
call fcn.0044b473
mov edx, dword [edi]
add esp, 4
mov esi, eax
movzx ecx, word [edx]
mov word [esi], cx
add edx, 2
add esi, 2
test cx, cx
jne 0x4148e2
push 0xffffffffffffffff
push 1
push eax
lea ecx, [esp + 0x70]
call fcn.004075d0
inc ebp
add edi, 0x28
cmp ebp, dword [esp + 0x1c]
jl 0x4148d1
push ebx
call fcn.0044b468
mov edi, dword [esp + 0x28]
add esp, 4
xor ebp, ebp
mov eax, dword [esp + 0x14]
push eax
push edi
push str.RemovePrinterInfs_____s___s__n
call fcn.0043e2c0
add esp, 0xc
cmp edi, ebp
mov ebp, dword [sym.imp.USER32.dll_wsprintfW]
je 0x414952
cmp word [edi], 0
je 0x414952
push edi
lea ecx, [esp + 0x900]
push str._s_admin_
push ecx
call ebp
add esp, 0xc
jmp 0x414965
push 0x104
lea edx, [esp + 0x900]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [esp + 0x8fc]
push eax
lea ecx, [esp + 0x6f8]
push str._sinfoem.inf
push ecx
call ebp
add esp, 0xc
lea edx, [esp + 0x94]
push edx
lea eax, [esp + 0x6f8]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
mov dword [esp + 0x30], edi
cmp edi, 0xffffffff
je 0x414c41
lea ecx, [esp + 0xc0]
push ecx
lea edx, [esp + 0x900]
push edx
lea eax, [esp + 0x6fc]
push str._sinf_s
push eax
call ebp
push 0x4fc8
call fcn.0044ad7f
add esp, 0x14
mov dword [esp + 0x18], eax
mov byte [esp + 0xd18], 2
test eax, eax
je 0x4149f9
push 0
lea ecx, [esp + 0x6f8]
push ecx
mov ecx, eax
call fcn.0043f710
mov esi, eax
mov dword [esp + 0x18], eax
jmp 0x4149ff
xor esi, esi
mov dword [esp + 0x18], esi
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx + 4]
push edx
lea eax, [esp + 0x6f8]
push eax
mov byte [esp + 0xd20], 1
call fcn.00442290
test al, al
je 0x414c0f
push str.Printer
mov ecx, esi
call fcn.0043eae0
push eax
call fcn.0044b362
add esp, 8
test eax, eax
jne 0x414c0f
lea ecx, [esp + 0x7c]
xor bl, bl
call fcn.004031d0
lea edx, [esp + 0x7c]
push edx
mov ecx, esi
mov byte [esp + 0xd1c], 3
call fcn.0043f920
test eax, eax
je 0x414bfe
lea ecx, [esp + 0x4c]
call fcn.004031d0
mov eax, dword [esp + 0x7c]
mov eax, dword [eax]
lea ecx, [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x1c]
push eax
mov byte [esp + 0xd20], 4
call fcn.0043fa10
mov edi, dword [esp + 0x14]
push edi
push str.wszPrinterDriver____s__n
mov ebp, eax
call fcn.0043e2c0
add esp, 8
xor esi, esi
test ebp, ebp
jle 0x414bcd
mov edx, dword [esp + 0x4c]
mov eax, dword [edx + esi*8]
push eax
push str.___Model_in_INF_file___s__n
call fcn.0043e2c0
mov eax, dword [esp + 0x54]
mov eax, dword [eax + esi*8]
push edi
push eax
call fcn.0044b362
add esp, 0x10
test eax, eax
jne 0x414ae6
push str.______Found_n
call fcn.0043e2c0
add esp, 4
mov bl, 1
inc esi
cmp esi, ebp
jl 0x414ab0
test bl, bl
je 0x414bcd
xor bl, bl
xor edi, edi
mov ecx, dword [esp + 0x4c]
mov eax, dword [ecx + edi*8]
push eax
push str.Model_in_INF_file___s__n
call fcn.0043e2c0
xor esi, esi
add esp, 8
cmp dword [esp + 0x68], esi
jle 0x414b85
jmp 0x414b20
mov edx, dword [esp + 0x64]
mov ecx, dword [edx + esi*8]
lea edx, [esp + 0x2e4]
mov edi, edi
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x414b30
lea eax, [esp + 0x2e4]
push eax
push str.___Still_Installed_Model___s__n
call fcn.0043e2c0
mov ecx, dword [esp + 0x54]
mov eax, dword [ecx + edi*8]
lea edx, [esp + 0x2ec]
push edx
push eax
call fcn.0044b362
add esp, 0x10
test eax, eax
jne 0x414b7e
push str.______Shared_n
call fcn.0043e2c0
add esp, 4
mov bl, 1
inc esi
cmp esi, dword [esp + 0x68]
jl 0x414b20
inc edi
cmp edi, ebp
jl 0x414af7
test bl, bl
jne 0x414bcd
push 0x208
call fcn.0044b473
lea ecx, [esp + 0x6f8]
mov esi, eax
mov edx, ecx
add esp, 4
sub esi, edx
lea esp, [esp]
movzx edx, word [ecx]
mov word [esi + ecx], dx
add ecx, 2
test dx, dx
jne 0x414bb0
push 0xffffffffffffffff
push 1
push eax
lea ecx, [esp + 0x40]
call fcn.004075d0
lea ecx, [esp + 0x4c]
call fcn.004031f0
lea ecx, [esp + 0x7c]
call fcn.004031f0
lea ecx, [esp + 0x4c]
mov byte [esp + 0xd18], 3
call fcn.00404b90
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x30]
mov ebp, dword [sym.imp.USER32.dll_wsprintfW]
lea ecx, [esp + 0x7c]
mov byte [esp + 0xd18], 1
call fcn.00404b90
test esi, esi
je 0x414c23
mov ecx, esi
call fcn.00440470
push esi
call fcn.0044ad0a
add esp, 4
lea eax, [esp + 0x94]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4149a4
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [esp + 0x64]
call fcn.004031f0
mov edi, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
xor esi, esi
test edi, edi
jle 0x414c76
jmp 0x414c60
mov eax, dword [ebx + esi*8]
push eax
push str.___INF_can_be_deleted___s__n
call fcn.0043e2c0
inc esi
add esp, 8
cmp esi, edi
jl 0x414c60
xor ebp, ebp
cmp dword [esp + 0x38], ebp
jle 0x414f00
mov esi, dword [esp + 0x24]
mov dword [esp + 0x2c], 1
mov edi, edi
mov ecx, dword [esp + 0x34]
mov ecx, dword [ecx + ebp*8]
lea edx, [esp + 0xb04]
mov edi, edi
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x414ca0
push 0x4fc8
call fcn.0044ad7f
add esp, 4
mov dword [esp + 0x30], eax
mov byte [esp + 0xd18], 5
test eax, eax
je 0x414ce3
push 0
lea edx, [esp + 0xb08]
push edx
mov ecx, eax
call fcn.0043f710
mov edi, eax
jmp 0x414ce5
xor edi, edi
push 0x1f34
mov byte [esp + 0xd1c], 1
call fcn.0044ad7f
add esp, 4
test eax, eax
je 0x414d09
mov ecx, eax
call fcn.00404ba0
mov ebx, eax
jmp 0x414d0b
xor ebx, ebx
push 0x1f34
push 0
push ebx
call fcn.0044ac90
add esp, 0xc
test esi, esi
je 0x414d29
cmp word [esi], 0
jne 0x414ecd
mov eax, dword [esp + 0x14]
push ebx
push eax
mov ecx, edi
call fcn.00441470
cmp word [ebx + 0xe78], 0
lea esi, [ebx + 0xe78]
je 0x414d79
push esi
push 0
push 0
call sub.WINSPOOL.DRV_DeleteMonitorW
test eax, eax
je 0x414d64
push esi
push str.PortMonitor___s__removed._n
call fcn.0043e2c0
add esp, 8
jmp 0x414d79
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.Failed_to_remove_PortMonitor___s_____ld_n
call fcn.0043e2c0
add esp, 0xc
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx + 4]
cmp dword [eax], 1
je 0x414eb9
cmp dword [eax], 0x11
je 0x414eb9
mov esi, dword [esp + 0x14]
push 2
lea edx, [esp + 0x4f0]
push edx
push 0
push esi
mov ecx, edi
call fcn.00440480
test eax, eax
je 0x414e3d
lea eax, [esp + 0x4ec]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x414dc0
sub eax, edx
lea edx, [esp + 0x4ec]
push edx
sar eax, 1
xor ecx, ecx
push str.wszHardwareId____s__n
mov word [esp + eax*2 + 0x4ec], cx
call fcn.0043e2c0
lea eax, [esp + 0x4f4]
push eax
push str.SYSTEMCurrentControlSetEnum
lea ecx, [esp + 0x2f4]
push 0x461a90
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
lea edx, [esp + 0x2fc]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.0044a580
add esp, 0x20
test eax, eax
je 0x414e3d
push 0
push 1
lea eax, [esp + 0x2ec]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.0044a560
add esp, 0x10
push 2
lea ecx, [esp + 0x4f0]
push ecx
push 1
push esi
mov ecx, edi
call fcn.00440480
test eax, eax
je 0x414eb9
lea edx, [esp + 0x4ec]
push edx
push str.wszHardwareId____s__n
call fcn.0043e2c0
lea eax, [esp + 0x4f4]
push eax
push str.SYSTEMCurrentControlSetEnum
lea ecx, [esp + 0x2f4]
push 0x461a90
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
lea edx, [esp + 0x2fc]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.0044a580
add esp, 0x20
test eax, eax
je 0x414eb9
push 0
push 1
lea eax, [esp + 0x2ec]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.0044a560
add esp, 0x10
mov ecx, ebx
call fcn.00404d70
push ebx
call fcn.0044ad0a
mov esi, dword [esp + 0x28]
add esp, 4
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0xb04]
push ecx
mov ecx, dword [edx + 4]
call fcn.00442ba0
test edi, edi
je 0x414ef5
mov ecx, edi
call fcn.00440470
push edi
call fcn.0044ad0a
add esp, 4
inc ebp
cmp ebp, dword [esp + 0x38]
jl 0x414c90
lea ecx, [esp + 0x34]
call fcn.004031f0
lea ecx, [esp + 0x64]
mov byte [esp + 0xd18], 0
call fcn.00404b90
lea ecx, [esp + 0x34]
mov dword [esp + 0xd18], 0xffffffff
call fcn.00404b90
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0xd10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xcf8]
xor ecx, esp
call fcn.0044ac80
add esp, 0xd08
ret 8