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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5671a1
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 ebx, ecx
cmp byte [ebx + 0x30], 0
jne 0x40f42b
call fcn.00437f60
push eax
lea ecx, [esp + 0x24]
call fcn.0042a551
and dword [esp + 0x2c8], 0
lea ecx, [esp + 0x10]
call fcn.00412621
mov byte [esp + 0x2c8], 1
mov eax, dword [eax]
push 0x59a6d0
push eax
lea eax, [esp + 0x28]
push 0x59a4dc
push eax
call fcn.0040a7ee
mov byte [esp + 0x2d8], 0
mov ecx, dword [esp + 0x20]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.00402728
lea ecx, [esp + 0x24]
call fcn.0043a04c
mov byte [esp + 0x2c8], 2
mov esi, dword [esp + 0x20]
push 0
push esi
lea ecx, [esp + 0x2c]
call fcn.0043a0f3
test eax, eax
je 0x40f137
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [esp + 0x24]
call fcn.00439bb8
push ecx
lea eax, [esi - 0x10]
mov dword [esp + 0x14], esp
mov edi, esp
push eax
mov dword [esp + 0x18], eax
call fcn.0040242c
add eax, 0x10
pop ecx
mov dword [edi], eax
call fcn.0043690b
pop ecx
push ebx
call fcn.0040fe1f
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 0x40f1a6
cmp dword [ebx + 0x5c], eax
jne 0x40f1a6
lea ecx, [esp + 0x24]
mov byte [esp + 0x2c8], al
call fcn.0043a07e
mov ecx, dword [esp + 0x10]
call fcn.00402728
xor eax, eax
jmp 0x40f42e
push 0x2f
mov edi, str...COMMONDeviceManager.cpp
push edi
call fcn.00538be0
pop ecx
pop ecx
test eax, eax
je 0x40f1bd
push 0x2f
jmp 0x40f1cd
push 0x5c
push edi
call fcn.00538be0
pop ecx
pop ecx
test eax, eax
je 0x40f1d8
push 0x5c
push edi
call fcn.00538be0
pop ecx
pop ecx
inc eax
jmp 0x40f1da
mov eax, edi
push 1
push 0x3b
push eax
lea esi, [esp + 0x68]
call fcn.00404b6f
push str.Enumerating_Scanner....
push 0
mov ecx, eax
mov byte [esp + 0x2d0], 3
call fcn.00404c4d
mov esi, eax
call fcn.0040279b
pop ecx
lea ecx, [esp + 0x5c]
mov byte [esp + 0x2c8], 2
call fcn.00404bdb
call fcn.00437f60
push eax
lea ecx, [esp + 0x20]
call fcn.0042a551
lea ecx, [ebx + 0x34]
mov byte [esp + 0x2c8], 4
call fcn.00438f6f
and dword [esp + 0x18], 0
cmp dword [esp + 0x14], 0
jle 0x40f2a0
push dword [esp + 0x18]
lea eax, [esp + 0x20]
push str.name
push str._s_d
push eax
call fcn.0040a7ee
add esp, 0x10
push dword [esp + 0x20]
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, [ebx + 0x34]
call fcn.00439213
inc dword [esp + 0x18]
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x14]
jl 0x40f242
push 0xa
lea ecx, [esp + 0x44]
mov byte [ebx + 0x30], 1
call fcn.00438e87
push 1
lea eax, [esp + 0x44]
push eax
mov ecx, ebx
mov byte [esp + 0x2d0], 5
call fcn.0040f4b6
mov ebx, dword [esp + 0x44]
jmp 0x40f37b
mov eax, ebx
test ebx, ebx
je 0x40f395
mov eax, dword [eax + 8]
mov ebx, dword [ebx]
sub eax, 0x10
push eax
call fcn.0040242c
add eax, 0x10
pop ecx
mov dword [esp + 0x14], eax
push 0x2f
push edi
mov byte [esp + 0x2d0], 6
call fcn.00538be0
pop ecx
pop ecx
test eax, eax
je 0x40f308
push 0x2f
jmp 0x40f318
push 0x5c
push edi
call fcn.00538be0
pop ecx
pop ecx
test eax, eax
je 0x40f323
push 0x5c
push edi
call fcn.00538be0
pop ecx
pop ecx
inc eax
jmp 0x40f325
mov eax, edi
push 1
push 0x50
push eax
lea esi, [esp + 0x68]
call fcn.00404b6f
mov byte [esp + 0x2c8], 7
push dword [esp + 0x14]
mov ecx, eax
push 0x5996a0
push 0
call fcn.00404c4d
mov esi, eax
call fcn.0040cc0a
pop ecx
pop ecx
lea ecx, [esp + 0x5c]
mov byte [esp + 0x2c8], 6
call fcn.00404bdb
mov byte [esp + 0x2c8], 5
mov ecx, dword [esp + 0x14]
add ecx, 0xfffffff0
call fcn.00402728
test ebx, ebx
jne 0x40f2ce
push 0x2f
push edi
call fcn.00538be0
pop ecx
pop ecx
test eax, eax
je 0x40f39a
push 0x2f
jmp 0x40f3aa
call fcn.00438caa
push 0x5c
push edi
call fcn.00538be0
pop ecx
pop ecx
test eax, eax
je 0x40f3b5
push 0x5c
push edi
call fcn.00538be0
pop ecx
pop ecx
inc eax
jmp 0x40f3b7
mov eax, edi
push 1
push 0x52
push eax
lea esi, [esp + 0x68]
call fcn.00404b6f
push str.__Done.
push 0
mov ecx, eax
mov byte [esp + 0x2d0], 8
call fcn.00404c4d
mov esi, eax
call fcn.0040279b
pop ecx
lea ecx, [esp + 0x5c]
mov byte [esp + 0x2c8], 5
call fcn.00404bdb
lea ecx, [esp + 0x40]
mov byte [esp + 0x2c8], 4
call fcn.00438fb5
mov ecx, dword [esp + 0x1c]
add ecx, 0xfffffff0
call fcn.00402728
lea ecx, [esp + 0x24]
mov byte [esp + 0x2c8], 0
call fcn.0043a07e
mov ecx, dword [esp + 0x10]
call fcn.00402728
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.00537e11
mov esp, ebp
pop ebp
ret