Function at 0x569bc0
Capabilities:
Query environment variable
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ae825
mov eax, dword fs:[0]
push eax
sub esp, 0x224
mov eax, dword [0x614040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov ecx, dword [0x61fea4]
mov eax, 0x2aaaaaab
sub ecx, dword [0x61fea0]
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x569e64
cmp eax, dword [0x615470]
jle 0x569e64
push 0x104
lea eax, [ebp - 0x218]
push eax
push str._APPDATA_CanonIJ_Scan_Utility
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor eax, eax
cmp esi, 0x9fbf1
jne 0x569c44
mov eax, 1
mov ecx, dword [0x61fa68]
test ecx, ecx
jne 0x569c52
xor eax, eax
jmp 0x569c60
push 0x2000000
push dword [eax*4 + 0x61feb8]
call ecx
push eax
mov edx, esi
lea ecx, [ebp - 0x22c]
call fcn.0058d5b0
add esp, 4
mov dword [ebp - 4], 0
lea eax, [ebp - 0x218]
mov edi, dword [ebp - 0x22c]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
push edi
push eax
call esi
push str.PRINTER.DAT
lea eax, [ebp - 0x218]
push eax
call esi
call fcn.00414eab
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x569cb8
push 0x80004005
call fcn.00402740
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x230], esi
push 0x5e9334
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x21c], 0
push eax
call fcn.005291b2
add esp, 0xc
cmp dword [ebp - 0x21c], 0
je 0x569e26
push ecx
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x228], 0x100
call fcn.00409830
push dword [ebp - 0x21c]
push 1
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x228]
push 4
push eax
mov dword [ebp - 0x224], 1
call fcn.0052a468
push dword [ebp - 0x21c]
lea eax, [ebp - 0x220]
push 1
push 4
push eax
call fcn.0052a468
push dword [ebp - 0x21c]
lea eax, [ebp - 0x224]
push 1
push 4
push eax
call fcn.0052a468
add esp, 0x2c
call fcn.00409830
cmp dword [eax + 0x14], 8
jb 0x569d87
mov eax, dword [eax]
push dword [ebp - 0x21c]
push dword [ebp - 0x220]
push 2
push eax
call fcn.0052a468
push dword [ebp - 0x21c]
mov eax, dword [0x61fa98]
push 1
mov dword [ebp - 0x220], eax
lea eax, [ebp - 0x228]
push 4
push eax
mov dword [ebp - 0x228], 0x200
mov dword [ebp - 0x224], 0x64
call fcn.0052a468
push dword [ebp - 0x21c]
lea eax, [ebp - 0x220]
push 1
push 4
push eax
call fcn.0052a468
push dword [ebp - 0x21c]
lea eax, [ebp - 0x224]
push 1
push 4
push eax
call fcn.0052a468
add esp, 0x40
push dword [ebp - 0x21c]
push dword [ebp - 0x220]
push 1
push dword [0x61fa9c]
call fcn.0052a468
push dword [ebp - 0x21c]
call fcn.005294d1
add esp, 0x14
lea edx, [esi - 0x10]
mov byte [ebp - 4], 0
or esi, 0xffffffff
lea ecx, [edx + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x569e46
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edi + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x569e64
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00527e2c
mov esp, ebp
pop ebp
ret