Function at 0x4081e0
Capabilities:
Read .ini file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x447e8c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x10124
call fcn.0042dd50
push ebx
push esi
push edi
xor eax, eax
mov ecx, 0x1fff
lea edi, [esp + 0x130]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov ecx, 0x1fff
lea edi, [esp + 0x8130]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x104
lea eax, [esp + 0x34]
push eax
push 0
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x30]
push 0x5c
push ecx
call fcn.0042f860
add esp, 8
push 0x44bfb0
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edi, [esp + 0x30]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x408270
mov dx, word [0x44b63c]
mov eax, dword [0x466df8]
mov word [edi], dx
mov esi, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408290
lea edi, [esp + 0x30]
sub eax, esi
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4082a0
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0x20
lea eax, [esp + 0x34]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x30]
push ecx
push 0x7fff
lea edx, [esp + 0x138]
push edx
push str.DeviceDesc
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionA]
xor edi, edi
mov dword [esp + 0x14], edi
jmp 0x4082f0
mov edi, dword [esp + 0x14]
lea esp, [esp]
lea esi, [esp + edi + 0x130]
push esi
lea ecx, [esp + 0x14]
call fcn.00402470
push 0x44bfa0
lea ecx, [esp + 0x14]
mov dword [esp + 0x10140], 0
call fcn.00403790
push 1
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x18]
call fcn.00403670
mov eax, dword [eax]
push 0x44bf9c
push eax
call fcn.0042f5a3
add esp, 8
test eax, eax
mov eax, dword [esp + 0x28]
setne bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40835d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test bl, bl
je 0x40866b
mov ebx, dword [ebp + 8]
push ebx
push esi
call fcn.0042f890
add esp, 8
test eax, eax
jne 0x4086be
push ebx
lea ecx, [esp + 0x20]
call fcn.00402470
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 0xc]
test ecx, ecx
mov byte [esp + 0x1013c], 1
jg 0x40839c
or eax, 0xffffffff
jmp 0x4083b4
push 0x20
push eax
call fcn.0042f4d1
add esp, 8
test eax, eax
jne 0x4083b0
or eax, 0xffffffff
jmp 0x4083b4
sub eax, dword [esp + 0x10]
inc eax
push eax
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x18]
call fcn.00401cf0
mov ecx, dword [eax]
mov esi, dword [esp + 0x10]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
mov byte [esp + 0x1013c], 2
je 0x408426
mov edx, dword [esi + 0xc]
test edx, edx
lea ebx, [esi + 0xc]
jl 0x408418
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x408418
push eax
call fcn.004014e0
mov edi, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x40840b
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call dword [edx + 4]
add edi, 0x10
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x14]
jmp 0x408426
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x18]
call fcn.00401a70
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov byte [esp + 0x1013c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40844c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 0xc]
test ecx, ecx
je 0x408645
push 5
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x24]
call fcn.00403670
mov eax, dword [eax]
push str.Canon
push eax
call fcn.0042f5a3
mov ebx, eax
mov eax, dword [esp + 0x2c]
add esp, 8
neg ebx
sbb bl, bl
add eax, 0xfffffff0
inc bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4084a1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test bl, bl
je 0x408645
mov eax, dword [esp + 0x10]
test eax, eax
je 0x408645
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx - 0xc]
test edx, edx
jl 0x408649
push eax
push ecx
call fcn.0042f637
add esp, 8
test eax, eax
je 0x408645
mov ecx, dword [esp + 0x1c]
sub eax, ecx
mov dword [esp + 0x14], eax
js 0x408649
lea eax, [ecx - 0x10]
mov dword [esp + 0x20], 1
mov byte [esp + 0x1013c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408510
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x1013c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408539
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esp + 0x30]
push eax
push 0x7fff
lea ecx, [esp + 0x8138]
push ecx
push str.DriverDesc
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionA]
xor ebx, ebx
jmp 0x408560
lea esi, [esp + ebx + 0x8130]
push esi
lea ecx, [esp + 0x18]
call fcn.00402470
push 0x44bfa0
lea ecx, [esp + 0x18]
mov dword [esp + 0x10140], 3
call fcn.00403790
push 1
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x1c]
call fcn.00403670
mov eax, dword [eax]
push 0x44bf9c
push eax
call fcn.0042f5a3
add esp, 8
test eax, eax
mov eax, dword [esp + 0x24]
setne byte [esp + 0x1b]
add eax, 0xfffffff0
or edi, 0xffffffff
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4085d1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov al, byte [esp + 0x1b]
test al, al
je 0x4085ee
mov eax, dword [ebp + 8]
push eax
push esi
call fcn.0042f890
add esp, 8
test eax, eax
jne 0x4086cb
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4085f3
sub eax, edx
mov esi, eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ebx, [ebx + esi + 1]
mov dword [esp + 0x1013c], edi
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jg 0x408624
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test esi, esi
jne 0x408560
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x10134]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x1c]
lea eax, [ecx - 0x10]
mov byte [esp + 0x1013c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40866b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esp + edi + 0x130]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408675
sub eax, edx
mov esi, eax
lea eax, [edi + esi + 1]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x1013c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4086b1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test esi, esi
jne 0x4082e8
jmp 0x408539
mov dword [esp + 0x20], 1
jmp 0x408510
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov esi, 1
mov dword [esp + 0x1013c], edi
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jg 0x4086f2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x10134]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret