Function at 0x40f1be
Capabilities:
Delete file
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x56794d
mov eax, dword fs:[0]
push eax
sub esp, 0x2b0
mov eax, dword [0x5c9030]
xor eax, esp
mov dword [esp + 0x2a8], eax
push ebx
push esi
push edi
mov eax, dword [0x5c9030]
xor eax, esp
push eax
lea eax, [esp + 0x2c0]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
cmp byte [eax + 0x30], 0
mov dword [esp + 0x10], eax
jne 0x40f590
call fcn.00438647
push eax
lea ecx, [esp + 0x1c]
call fcn.0042a80d
and dword [esp + 0x2c8], 0
lea ecx, [esp + 0x14]
call fcn.004127e0
mov byte [esp + 0x2c8], 1
mov eax, dword [eax]
push 0x59a698
push eax
lea eax, [esp + 0x20]
push 0x59a4bc
push eax
call fcn.0040a7c3
mov byte [esp + 0x2d8], 0
mov ecx, dword [esp + 0x24]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.00402722
lea ecx, [esp + 0x24]
call fcn.0043a735
mov byte [esp + 0x2c8], 2
mov esi, dword [esp + 0x18]
push 0
push esi
lea ecx, [esp + 0x2c]
call fcn.0043a7dc
test eax, eax
je 0x40f291
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [esp + 0x24]
call fcn.0043a2a1
push ecx
lea edi, [esi - 0x10]
mov dword [esp + 0x24], esp
mov ebx, esp
push edi
mov dword [esp + 0x28], edi
call fcn.00402431
add eax, 0x10
pop ecx
mov dword [ebx], eax
call fcn.00436ff4
mov ebx, dword [esp + 0x14]
pop ecx
push ebx
call fcn.0040fff1
push esi
push 0
push str.Count
push str.AllEpsonDS
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x40f302
cmp dword [ebx + 0x5c], eax
jne 0x40f302
lea ecx, [esp + 0x24]
mov byte [esp + 0x2c8], al
call fcn.0043a767
mov ecx, edi
call fcn.00402722
xor eax, eax
jmp 0x40f593
push 0x2f
mov ebx, str...COMMONDeviceManager.cpp
push ebx
call fcn.005392c0
pop ecx
pop ecx
test eax, eax
je 0x40f319
push 0x2f
jmp 0x40f329
push 0x5c
push ebx
call fcn.005392c0
pop ecx
pop ecx
test eax, eax
je 0x40f334
push 0x5c
push ebx
call fcn.005392c0
pop ecx
pop ecx
inc eax
jmp 0x40f336
mov eax, ebx
push 1
push 0x3b
push eax
lea esi, [esp + 0x68]
call fcn.00404b01
push str.Enumerating_Scanner....
push 0
mov ecx, eax
mov byte [esp + 0x2d0], 3
call fcn.00404bdf
mov edi, eax
call fcn.00402776
pop ecx
mov ecx, esi
mov byte [esp + 0x2c8], 2
call fcn.00404b6d
call fcn.00438647
push eax
lea ecx, [esp + 0x20]
call fcn.0042a80d
mov byte [esp + 0x2c8], 4
mov edi, dword [esp + 0x10]
lea ecx, [edi + 0x34]
call fcn.00439658
and dword [esp + 0x10], 0
cmp dword [esp + 0x14], 0
jle 0x40f3fe
push dword [esp + 0x10]
lea eax, [esp + 0x20]
push str.name
push str._s_d
push eax
call fcn.0040a7c3
add esp, 0x10
push dword [esp + 0x18]
lea eax, [esp + 0xb0]
push 0x104
push eax
push 0x5990a0
push dword [esp + 0x2c]
push str.AllEpsonDS
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0xac]
push eax
lea ecx, [edi + 0x34]
call fcn.004398fc
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x14]
jl 0x40f3a0
push 0xa
lea ecx, [esp + 0x44]
mov byte [edi + 0x30], 1
call fcn.00439570
push 1
lea eax, [esp + 0x44]
push eax
mov ecx, edi
mov byte [esp + 0x2d0], 5
call fcn.0040f61d
mov eax, dword [esp + 0x44]
test eax, eax
jne 0x40f448
push 0x2f
push ebx
call fcn.005392c0
pop ecx
pop ecx
test eax, eax
je 0x40f501
push 0x2f
jmp 0x40f511
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40f4fc
mov ecx, dword [eax]
mov eax, dword [eax + 8]
sub eax, 0x10
push eax
mov dword [esp + 0x18], ecx
call fcn.00402431
lea edi, [eax + 0x10]
pop ecx
mov dword [esp + 0x10], edi
push 0x2f
push ebx
mov byte [esp + 0x2d0], 6
call fcn.005392c0
pop ecx
pop ecx
test eax, eax
je 0x40f484
push 0x2f
jmp 0x40f494
push 0x5c
push ebx
call fcn.005392c0
pop ecx
pop ecx
test eax, eax
je 0x40f49f
push 0x5c
push ebx
call fcn.005392c0
pop ecx
pop ecx
inc eax
jmp 0x40f4a1
mov eax, ebx
push 1
push 0x50
push eax
lea esi, [esp + 0x68]
call fcn.00404b01
push edi
push 0
mov ecx, eax
mov byte [esp + 0x2d0], 7
call fcn.00404bdf
mov edi, eax
call fcn.0040cbe5
pop ecx
mov ecx, esi
mov byte [esp + 0x2c8], 6
call fcn.00404b6d
mov byte [esp + 0x2c8], 5
mov ecx, dword [esp + 0x10]
add ecx, 0xfffffff0
call fcn.00402722
cmp dword [esp + 0x14], 0
jne 0x40f444
jmp 0x40f42b
call fcn.00439394
push 0x5c
push ebx
call fcn.005392c0
pop ecx
pop ecx
test eax, eax
je 0x40f51c
push 0x5c
push ebx
call fcn.005392c0
pop ecx
pop ecx
inc eax
jmp 0x40f51e
mov eax, ebx
push 1
push 0x52
push eax
lea esi, [esp + 0x68]
call fcn.00404b01
push str.__Done.
push 0
mov ecx, eax
mov byte [esp + 0x2d0], 8
call fcn.00404bdf
mov edi, eax
call fcn.00402776
pop ecx
mov ecx, esi
mov byte [esp + 0x2c8], 5
call fcn.00404b6d
lea ecx, [esp + 0x40]
mov byte [esp + 0x2c8], 4
call fcn.0043969e
mov ecx, dword [esp + 0x1c]
add ecx, 0xfffffff0
call fcn.00402722
lea ecx, [esp + 0x24]
mov byte [esp + 0x2c8], 0
call fcn.0043a767
mov ecx, dword [esp + 0x20]
call fcn.00402722
xor eax, eax
inc eax
mov ecx, dword [esp + 0x2c0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2a8]
xor ecx, esp
call fcn.005384ff
mov esp, ebp
pop ebp
ret 4