Function at 0x569e80
Capabilities:
Query environment variable
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5ae88f
mov eax, dword fs:[0]
push eax
sub esp, 0x2a0
mov eax, dword [0x614040]
xor eax, esp
mov dword [esp + 0x298], eax
push ebx
push esi
push edi
mov eax, dword [0x614040]
xor eax, esp
push eax
lea eax, [esp + 0x2b0]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x2c], edi
mov ecx, dword [0x61fea8]
mov eax, 0x2aaaaaab
sub ecx, dword [0x61fea0]
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 0x80
jae 0x569ef9
push 0x80
mov ecx, 0x61fea0
call fcn.00409980
mov esi, dword [sym.imp.WINSPOOL.DRV_Ordinal_203]
lea eax, [esp + 0x24]
push eax
push 0
mov dword [esp + 0x2c], 0
call esi
mov eax, dword [esp + 0x24]
test eax, eax
je 0x56a5ac
push eax
lea ecx, [esp + 0x34]
call fcn.00409880
lea eax, [esp + 0x24]
mov dword [esp + 0x2b8], 0
mov ebx, dword [esp + 0x30]
push eax
push ebx
call esi
push dword [esp + 0x24]
push ebx
call fcn.00528e42
add esp, 8
mov dword [esp + 0x68], 7
xor ecx, ecx
mov dword [esp + 0x64], 0
mov word [esp + 0x54], cx
lea ecx, [esp + 0x54]
push eax
push ebx
call fcn.00408830
lea eax, [esp + 0x28]
mov byte [esp + 0x2b8], 1
mov esi, dword [sym.imp.WINSPOOL.DRV_EnumPrintersW]
push eax
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0
push eax
push 0
push 0
push 4
push 0
push 2
mov dword [esp + 0x44], 0
call esi
push dword [esp + 0x20]
call fcn.0040d503
add esp, 4
mov ebx, eax
lea eax, [esp + 0x28]
mov dword [esp + 0x14], ebx
push eax
lea eax, [esp + 0x24]
push eax
push dword [esp + 0x28]
push ebx
push 4
push 0
push 2
call esi
cmp dword [esp + 0x28], 0
mov dword [esp + 0x18], 0
jbe 0x56a124
mov edi, ebx
mov dword [esp + 0x1c], ebx
jmp 0x569ff0
mov edx, dword [edi]
xor eax, eax
mov dword [esp + 0x80], 7
mov dword [esp + 0x7c], 0
mov word [esp + 0x6c], ax
cmp word [edx], ax
jne 0x56a015
xor ecx, ecx
jmp 0x56a02f
mov ecx, edx
lea esi, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x56a020
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0x74]
call fcn.00408830
mov byte [esp + 0x2b8], 2
lea eax, [esp + 0x6c]
mov esi, dword [0x61fea4]
cmp eax, esi
jae 0x56a0ac
mov ebx, dword [0x61fea0]
cmp ebx, eax
ja 0x56a0ac
mov ecx, eax
mov eax, 0x2aaaaaab
sub ecx, ebx
imul ecx
sar edx, 2
mov edi, edx
shr edi, 0x1f
add edi, edx
cmp esi, dword [0x61fea8]
jne 0x56a08e
push ecx
mov ecx, 0x61fea0
call fcn.00409a20
mov esi, dword [0x61fea4]
mov ebx, dword [0x61fea0]
lea eax, [edi + edi*2]
lea eax, [ebx + eax*8]
test esi, esi
je 0x56a0a6
push eax
mov ecx, esi
call fcn.00408640
mov esi, dword [0x61fea4]
mov edi, dword [esp + 0x1c]
jmp 0x56a0db
cmp esi, dword [0x61fea8]
jne 0x56a0c5
push ecx
mov ecx, 0x61fea0
call fcn.00409a20
mov esi, dword [0x61fea4]
test esi, esi
je 0x56a0db
lea eax, [esp + 0x6c]
mov ecx, esi
push eax
call fcn.00408640
mov esi, dword [0x61fea4]
add esi, 0x18
mov byte [esp + 0x2b8], 1
cmp dword [esp + 0x80], 8
mov dword [0x61fea4], esi
jb 0x56a102
push dword [esp + 0x6c]
call fcn.0040d50c
add esp, 4
mov eax, dword [esp + 0x18]
add edi, 0xc
inc eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], eax
cmp eax, dword [esp + 0x28]
jb 0x569ff0
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x2c]
push ebx
call fcn.0040d50c
mov eax, dword [0x61fa9c]
add esp, 4
test eax, eax
je 0x56a149
push eax
call fcn.0040d50c
add esp, 4
mov dword [0x61fa9c], 0
xor eax, eax
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], 0
mov word [esp + 0x3c], ax
push 0x104
lea eax, [esp + 0xa0]
mov byte [esp + 0x2bc], 3
push eax
push str._APPDATA_CanonIJ_Scan_Utility
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor ecx, ecx
cmp edi, 0x9fbf1
jne 0x56a18f
mov ecx, 1
mov eax, dword [0x61fa68]
test eax, eax
je 0x56a1a6
push 0x2000000
push dword [ecx*4 + 0x61feb8]
call eax
push eax
mov edx, edi
lea ecx, [esp + 0x30]
call fcn.0058d5b0
add esp, 4
mov byte [esp + 0x2b8], 4
lea eax, [esp + 0x9c]
mov esi, dword [esp + 0x2c]
mov edi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
push esi
push eax
call edi
push str.PRINTER.DAT
lea eax, [esp + 0xa0]
push eax
call edi
push 0x5e932c
lea eax, [esp + 0xa0]
mov dword [esp + 0x14], 0
push eax
lea eax, [esp + 0x18]
push eax
call fcn.005291b2
mov eax, dword [esp + 0x1c]
add esp, 0xc
test eax, eax
je 0x56a3df
push eax
push 1
lea eax, [esp + 0x24]
mov dword [esp + 0x24], 0
push 4
push eax
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
call fcn.0052a263
push dword [esp + 0x20]
lea eax, [esp + 0x28]
push 1
push 4
push eax
call fcn.0052a263
push dword [esp + 0x30]
lea eax, [esp + 0x3c]
push 1
push 4
push eax
call fcn.0052a263
add esp, 0x30
cmp dword [esp + 0x1c], 0x100
jne 0x56a348
mov eax, dword [esp + 0x14]
cmp eax, 0xffff
jae 0x56a348
cmp dword [esp + 0x18], 1
jne 0x56a348
push eax
lea ecx, [esp + 0x70]
call fcn.00409880
mov byte [esp + 0x2b8], 5
push dword [esp + 0x10]
mov edi, dword [esp + 0x70]
push dword [esp + 0x18]
push 2
push edi
call fcn.0052a263
add esp, 0x10
mov dword [esp + 0x98], 7
xor eax, eax
mov dword [esp + 0x94], 0
lea ecx, [esp + 0x84]
mov word [esp + 0x84], ax
push dword [esp + 0x14]
push edi
call fcn.00408830
cmp dword [esp + 0x50], 8
jb 0x56a2f2
push dword [esp + 0x3c]
call fcn.0040d50c
add esp, 4
xor eax, eax
mov dword [esp + 0x50], 7
mov word [esp + 0x3c], ax
lea ecx, [esp + 0x3c]
lea eax, [esp + 0x84]
mov dword [esp + 0x4c], 0
push eax
call fcn.004087d0
cmp dword [esp + 0x98], 8
jb 0x56a333
push dword [esp + 0x84]
call fcn.0040d50c
add esp, 4
mov byte [esp + 0x2b8], 4
test edi, edi
je 0x56a348
push edi
call fcn.0040d50c
add esp, 4
push dword [esp + 0x10]
lea eax, [esp + 0x20]
push 1
push 4
push eax
call fcn.0052a263
push dword [esp + 0x20]
lea eax, [esp + 0x28]
push 1
push 4
push eax
call fcn.0052a263
push dword [esp + 0x30]
lea eax, [esp + 0x3c]
push 1
push 4
push eax
call fcn.0052a263
add esp, 0x30
cmp dword [esp + 0x1c], 0x200
jne 0x56a3d3
mov eax, dword [esp + 0x14]
cmp eax, 0xffff
jae 0x56a3d3
cmp dword [esp + 0x18], 0x64
jne 0x56a3d3
push eax
mov dword [0x61fa98], eax
call fcn.0040d503
push dword [esp + 0x14]
mov dword [0x61fa9c], eax
push dword [esp + 0x1c]
push 1
push eax
call fcn.0052a263
add esp, 0x14
lea eax, [esp + 0x3c]
mov ecx, 0x6154a0
push 0xffffffffffffffff
push 0
push eax
call fcn.004089c0
push dword [esp + 0x10]
call fcn.005294d1
add esp, 4
mov ecx, dword [0x61fea0]
mov eax, dword [0x61fea4]
cmp ecx, eax
je 0x56a440
mov ebx, dword [esp + 0x64]
cmp dword [ecx + 0x14], 8
mov eax, dword [ecx + 0x10]
jb 0x56a3ff
mov edi, dword [ecx]
jmp 0x56a401
mov edi, ecx
cmp ebx, eax
jb 0x56a407
mov ebx, eax
cmp dword [esp + 0x68], 8
mov edx, dword [esp + 0x54]
jae 0x56a416
lea edx, [esp + 0x54]
test ebx, ebx
jne 0x56a461
xor eax, eax
mov ebx, dword [esp + 0x64]
test eax, eax
jne 0x56a434
mov edx, dword [ecx + 0x10]
cmp ebx, edx
jb 0x56a434
cmp ebx, edx
setne al
test eax, eax
je 0x56a480
mov eax, dword [0x61fea4]
add ecx, 0x18
cmp ecx, eax
jne 0x56a3f2
mov edi, dword [0x61fea0]
mov ecx, edi
cmp ecx, eax
je 0x56a525
mov ebx, dword [esp + 0x4c]
cmp dword [ecx + 0x14], 8
mov eax, dword [ecx + 0x10]
jb 0x56a4a5
mov edi, dword [ecx]
jmp 0x56a4a7
mov ax, word [edx]
cmp ax, word [edi]
jne 0x56a472
add edx, 2
add edi, 2
dec ebx
jmp 0x56a418
movzx eax, word [edx]
cmp ax, word [edi]
sbb eax, eax
and eax, 0xfffffffe
inc eax
jmp 0x56a41c
mov edi, dword [0x61fea0]
mov eax, 0x2aaaaaab
sub ecx, edi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [0x615470], eax
mov eax, dword [0x61fea4]
jmp 0x56a446
mov edi, ecx
cmp ebx, eax
jb 0x56a4ad
mov ebx, eax
cmp dword [esp + 0x50], 8
mov edx, dword [esp + 0x3c]
jae 0x56a4bc
lea edx, [esp + 0x3c]
test ebx, ebx
jne 0x56a4f0
xor eax, eax
mov ebx, dword [esp + 0x4c]
test eax, eax
jne 0x56a4da
mov edx, dword [ecx + 0x10]
cmp ebx, edx
jb 0x56a4da
cmp ebx, edx
setne al
test eax, eax
je 0x56a509
add ecx, 0x18
cmp ecx, dword [0x61fea4]
jne 0x56a454
jmp 0x56a525
mov ax, word [edx]
cmp ax, word [edi]
jne 0x56a501
add edx, 2
add edi, 2
dec ebx
jmp 0x56a4be
sbb eax, eax
and eax, 0xfffffffe
inc eax
jmp 0x56a4c2
sub ecx, dword [0x61fea0]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [0x615470], eax
add esi, 0xfffffff0
mov byte [esp + 0x2b8], 3
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x56a547
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [esp + 0x50], 8
jb 0x56a55a
push dword [esp + 0x3c]
call fcn.0040d50c
add esp, 4
xor eax, eax
mov dword [esp + 0x50], 7
cmp dword [esp + 0x68], 8
mov dword [esp + 0x4c], 0
mov word [esp + 0x3c], ax
jb 0x56a584
push dword [esp + 0x54]
call fcn.0040d50c
add esp, 4
xor eax, eax
mov dword [esp + 0x68], 7
mov word [esp + 0x54], ax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x64], 0
test eax, eax
je 0x56a5ac
push eax
call fcn.0040d50c
add esp, 4
mov ecx, dword [esp + 0x2b0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x298]
xor ecx, esp
call fcn.00527e2c
mov esp, ebp
pop ebp
ret