Function at 0x40e940
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54e0f0
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x5a68a0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
push eax
call fcn.0040a450
add eax, 0x10
add esp, 4
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.00404ec0
mov edi, dword [ebp - 0x14]
mov eax, dword [edi - 0xc]
test eax, eax
jl 0x40e9b2
push str.EPSON
push edi
call fcn.0051d76b
add esp, 8
test eax, eax
je 0x40e9b2
sub eax, edi
sar eax, 1
jns 0x40e9bc
mov esi, 1
jmp 0x40ebd2
cmp dword [edi - 0xc], 0
jl 0x40e9e4
push str.REMOTE
push edi
call fcn.0051d76b
add esp, 8
test eax, eax
je 0x40e9e4
sub eax, edi
sar eax, 1
js 0x40e9e4
mov esi, 7
jmp 0x40ebd2
mov eax, dword [ebp + 8]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x1c], esp
mov esi, esp
push eax
call fcn.0040a450
add eax, 0x10
mov dword [esi], eax
add esp, 4
lea eax, [ebp - 0x10]
push eax
call fcn.0040ef90
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x10]
cmp dword [ecx - 0xc], 0
je 0x40ebaa
call fcn.0041f7c9
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40ea32
push 0x80004005
call fcn.0040a9a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x10]
lea edx, [ebp - 0x18]
mov byte [ebp - 4], 3
call fcn.004044f0
mov ecx, dword [ebp - 0x18]
push str..VIF
push ecx
call fcn.0051d669
add esp, 8
test eax, eax
jne 0x40eb80
mov edx, dword [ebp - 0x10]
push edx
push eax
push str.Category
push str.PrnterInfo
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
lea ecx, [eax - 0xb]
cmp ecx, 8
ja 0x40ea90
mov esi, 5
jmp 0x40eb85
cmp eax, 5
jne 0x40eb71
lea ecx, [ebp - 0x30]
call fcn.00420633
push 0xffffffffffffffff
push 0
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 4
call fcn.004206b4
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x30]
push eax
call fcn.00403670
mov ebx, eax
add esp, 8
xor esi, esi
test ebx, ebx
jle 0x40eb3b
test esi, esi
jl 0x40eb6c
cmp esi, dword [ebp - 0x28]
jge 0x40eb6c
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ecx + esi*4]
sub eax, 0x10
push eax
call fcn.0040a450
lea edi, [eax + 0x10]
add esp, 4
mov dword [ebp - 0x1c], edi
mov byte [ebp - 4], 5
cmp esi, dword [ebp - 0x28]
jge 0x40eb6c
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + esi*4]
push str.DownLoad
push eax
call fcn.0051d669
add esp, 8
test eax, eax
je 0x40eb4e
lea eax, [edi - 0x10]
inc esi
mov byte [ebp - 4], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40eb34
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp esi, ebx
jl 0x40eac9
mov edi, dword [ebp - 0x14]
lea ecx, [ebp - 0x30]
mov esi, 6
mov byte [ebp - 4], 3
call fcn.0042085f
jmp 0x40eb85
lea ecx, [ebp - 0x1c]
call fcn.0040f4d0
mov edi, dword [ebp - 0x14]
lea ecx, [ebp - 0x30]
mov esi, 2
mov byte [ebp - 4], 3
call fcn.0042085f
jmp 0x40eb85
call fcn.0041f5a0
xor ecx, ecx
cmp eax, 6
sete cl
add ecx, 2
mov esi, ecx
jmp 0x40eb85
mov esi, 8
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ebaf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40ebaf
mov esi, 8
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ebd2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ebf2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ec18
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4