Function at 0x413317
Capabilities:
Create thread
Delete file
Read .ini file

Disassembly:
push 0x270
mov eax, 0x55901a
call fcn.0052faf2
mov ebx, ecx
mov eax, dword [ebx + 0xdc8]
xor esi, esi
mov dword [ebp - 0x240], ebx
cmp eax, esi
je 0x413355
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebx + 0xdc8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0xdc8], esi
push 0xa
lea ecx, [ebp - 0x27c]
call fcn.0042c48a
mov dword [ebp - 4], esi
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x238], esi
call fcn.00409c58
mov edi, 0x588a04
push edi
push eax
lea eax, [ebp - 0x22c]
push eax
mov byte [ebp - 4], 1
call fcn.004016d7
add esp, 0xc
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x234]
add ecx, 0xfffffff0
call fcn.004021a7
call fcn.004070f7
mov esi, eax
cmp byte [esi + 0x30], 0
jne 0x41356a
call fcn.0042b589
push eax
lea ecx, [ebp - 0x230]
call fcn.0040217f
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 4
call fcn.00409c58
mov byte [ebp - 4], 5
mov eax, dword [eax]
push edi
push eax
lea eax, [ebp - 0x230]
push 0x588938
push eax
call fcn.004034f1
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x23c]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004021a7
lea ecx, [ebp - 0x260]
call fcn.0042d64f
mov byte [ebp - 4], 6
mov ebx, dword [ebp - 0x230]
push 0
push ebx
lea ecx, [ebp - 0x260]
call fcn.0042d6f6
test eax, eax
je 0x41342f
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x260]
call fcn.0042d1bb
push ecx
lea eax, [ebx - 0x10]
mov dword [ebp - 0x224], esp
mov edi, esp
push eax
mov dword [ebp - 0x224], eax
call fcn.00401e83
add eax, 0x10
pop ecx
mov dword [edi], eax
call fcn.0042a18d
pop ecx
push esi
call fcn.004079f1
push ebx
push 0
push str.Count
mov edi, str.AllEpsonDS
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x228], eax
test eax, eax
jne 0x4134a6
cmp dword [esi + 0x5c], eax
jne 0x4134a6
lea ecx, [ebp - 0x260]
mov byte [ebp - 4], 4
call fcn.0042d681
mov ecx, dword [ebp - 0x224]
call fcn.004021a7
jmp 0x4135b5
call fcn.0042b589
push eax
lea ecx, [ebp - 0x220]
call fcn.0040217f
lea ecx, [esi + 0x34]
mov byte [ebp - 4], 7
call fcn.0042c572
and dword [ebp - 0x21c], 0
cmp dword [ebp - 0x228], 0
jle 0x413534
push dword [ebp - 0x21c]
lea eax, [ebp - 0x220]
push str.name
push str._s_d
push eax
call fcn.004034f1
add esp, 0x10
push ebx
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0x587cac
push dword [ebp - 0x220]
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x218]
push eax
lea ecx, [esi + 0x34]
call fcn.0042c816
inc dword [ebp - 0x21c]
mov eax, dword [ebp - 0x21c]
cmp eax, dword [ebp - 0x228]
jl 0x4134d3
mov ecx, dword [ebp - 0x220]
add ecx, 0xfffffff0
mov byte [esi + 0x30], 1
call fcn.004021a7
lea ecx, [ebp - 0x260]
mov byte [ebp - 4], 4
call fcn.0042d681
mov ecx, dword [ebp - 0x224]
mov byte [ebp - 4], 3
call fcn.004021a7
mov ebx, dword [ebp - 0x240]
lea esi, [ebx + 0xdcc]
mov ecx, esi
call fcn.0042c572
push esi
lea ecx, [ebp - 0x238]
call fcn.004135d8
mov ecx, esi
call fcn.0041e162
call fcn.00413b00
xor eax, eax
cmp dword [ebx + 0xdc8], eax
jne 0x4135b5
lea ecx, [ebp - 0x244]
push ecx
push eax
push ebx
push 0x413e05
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebx + 0xdc8], eax
mov ecx, dword [ebp - 0x22c]
add ecx, 0xfffffff0
call fcn.004021a7
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x27c]
call fcn.0042c5b8
call fcn.0052fb75
ret