Function at 0x403b90
Capabilities:
Check mutex on windows
Connect pipe
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42d229
mov eax, dword fs:[0]
push eax
sub esp, 0x2a0
mov eax, dword [0x43e058]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [ebp + 8], 2
mov esi, dword [ebp + 0xc]
je 0x403be2
push 0
push str.error
push str.Wrong_arguments__.exe_userName
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
or eax, 0xffffffff
jmp 0x40442b
mov esi, dword [esi + 4]
mov ecx, str._check
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x403c10
test dl, dl
je 0x403c0c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x403c10
add eax, 2
add ecx, 2
test dl, dl
jne 0x403bf0
xor eax, eax
jmp 0x403c15
sbb eax, eax
or eax, 1
test eax, eax
jne 0x403c96
sub esp, 0x18
mov dword [ebp - 0x274], eax
mov ecx, esp
xorps xmm0, xmm0
movups xmmword [ebp - 0x28c], xmm0
movq qword [ebp - 0x27c], xmm0
push 0x15
push str.CloudPrintWatcher.exe
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], 0xf
mov byte [ecx], al
call fcn.00402220
lea ecx, [ebp - 0x28c]
call fcn.004034b0
mov edx, dword [ebp - 0x274]
cmp edx, 0x10
jb 0x404429
mov ecx, dword [ebp - 0x288]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40441f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4046fe
jmp 0x40441f
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403ca0
sub ecx, edx
push ecx
push esi
mov ecx, 0x43e9e8
call fcn.00402220
push 0x200
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.00410060
add esp, 0xc
lea eax, [ebp - 0x210]
push 0x200
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x210]
mov dword [ebp - 0x218], 0
mov dword [ebp - 0x214], 0xf
lea edx, [ecx + 1]
mov byte [ebp - 0x228], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403d03
sub ecx, edx
lea eax, [ebp - 0x210]
push ecx
push eax
lea ecx, [ebp - 0x228]
call fcn.00402220
mov dword [ebp - 4], 0
lea edx, [ebp - 0x228]
cmp dword [ebp - 0x214], 0x10
mov eax, dword [ebp - 0x218]
cmovae edx, dword [ebp - 0x228]
test eax, eax
je 0x403d6f
or ecx, 0xffffffff
dec eax
cmp eax, ecx
cmovb ecx, eax
add ecx, edx
cmp byte [ecx], 0x5c
je 0x403d5e
cmp ecx, edx
je 0x403d6f
dec ecx
cmp byte [ecx], 0x5c
jne 0x403d54
sub ecx, edx
inc ecx
cmp ecx, 0x200
jae 0x404703
jmp 0x403d71
xor ecx, ecx
mov byte [ebp + ecx - 0x210], 0
lea ecx, [ebp - 0x210]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403d82
sub ecx, edx
lea eax, [ebp - 0x210]
push ecx
push eax
lea ecx, [ebp - 0x228]
call fcn.00402220
mov edx, dword [ebp - 0x214]
mov eax, edx
mov ecx, dword [ebp - 0x218]
sub eax, ecx
push 0x16
push str.logCloudPrintWatcher_
cmp eax, 0x16
jb 0x403de4
cmp edx, 0x10
lea esi, [ebp - 0x228]
lea eax, [ecx + 0x16]
cmovae esi, dword [ebp - 0x228]
add esi, ecx
mov dword [ebp - 0x218], eax
push esi
call fcn.0040fac0
add esp, 0xc
mov byte [esi + 0x16], 0
jmp 0x403dfe
mov byte [ebp - 0x290], 0
lea ecx, [ebp - 0x228]
push dword [ebp - 0x290]
push 0x16
call fcn.00406300
cmp dword [0x43e9fc], 0x10
mov ecx, 0x43e9e8
mov esi, dword [ebp - 0x214]
mov eax, esi
cmovae ecx, dword [0x43e9e8]
mov edi, dword [0x43e9f8]
mov edx, dword [ebp - 0x218]
sub eax, edx
push edi
push ecx
cmp edi, eax
ja 0x403e58
lea eax, [edx + edi]
cmp esi, 0x10
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x228]
cmovae eax, dword [ebp - 0x228]
lea esi, [eax + edx]
push esi
call fcn.0040fac0
add esp, 0xc
mov byte [esi + edi], 0
jmp 0x403e71
mov byte [ebp - 0x290], 0
lea ecx, [ebp - 0x228]
push dword [ebp - 0x290]
push edi
call fcn.00406300
mov esi, dword [ebp - 0x214]
lea ecx, [ebp - 0x228]
mov edx, dword [ebp - 0x218]
mov eax, esi
sub eax, edx
cmp eax, 4
jb 0x403eae
cmp esi, 0x10
lea eax, [edx + 4]
mov dword [ebp - 0x218], eax
cmovae ecx, dword [ebp - 0x228]
mov eax, dword [str..log]
mov dword [ecx + edx], eax
mov byte [ecx + edx + 4], 0
jmp 0x403ec9
push 4
push str..log
mov byte [ebp - 0x290], 0
push dword [ebp - 0x290]
push 4
call fcn.00406300
cmp dword [ebp - 0x214], 0x10
lea ecx, [ebp - 0x228]
cmovae ecx, dword [ebp - 0x228]
call fcn.00407b00
push 0x43e9e8
lea ecx, [ebp - 0x244]
call fcn.00402150
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x244]
cmp dword [ebp - 0x230], 0x10
cmovae ecx, dword [ebp - 0x244]
call fcn.0040ab50
mov esi, eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
push esi
call fcn.00415283
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x230]
cmp eax, 0xb7
jne 0x403fdf
cmp edx, 0x10
jb 0x403f74
mov ecx, dword [ebp - 0x244]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x403f6a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404708
push edx
push ecx
call fcn.0040e2a5
add esp, 8
cmp dword [0x43e9fc], 0x10
mov eax, 0x43e9e8
cmovae eax, dword [0x43e9e8]
push eax
push str.mutex_exist._printerName:__s
push dword [0x4400f4]
call fcn.00407ca0
mov edx, dword [ebp - 0x214]
add esp, 0xc
cmp edx, 0x10
jb 0x403fd5
mov ecx, dword [ebp - 0x228]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x403fcb
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4046f9
push edx
push ecx
call fcn.0040e2a5
add esp, 8
mov eax, 0xfffffffe
jmp 0x40442b
cmp edx, 0x10
jb 0x404013
mov ecx, dword [ebp - 0x244]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404009
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404708
push edx
push ecx
call fcn.0040e2a5
add esp, 8
cmp dword [0x43e9fc], 0x10
mov eax, 0x43e9e8
cmovae eax, dword [0x43e9e8]
push eax
push str.FileLoggerInitSuccess:__s
push dword [0x4400f4]
call fcn.00407ca0
push 0xc
call fcn.0040e275
mov esi, eax
mov dword [ebp - 0x22c], esi
mov byte [ebp - 4], 2
xorps xmm0, xmm0
movq qword [esi], xmm0
mov dword [esi + 8], 0
push 0x18
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.0040e275
add esp, 0x14
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x244]
mov dword [0x4400ec], esi
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
push 0x43e9e8
mov dword [esi], eax
call fcn.00402150
cmp dword [ebp - 0x230], 0x10
lea eax, [ebp - 0x244]
xorps xmm0, xmm0
mov dword [ebp - 0x264], 0xf000c
movlpd qword [ebp - 0x26c], xmm0
jb 0x4040cb
mov eax, dword [ebp - 0x244]
test eax, eax
jne 0x4040cb
xor esi, esi
jmp 0x4040d6
push eax
call fcn.00415a64
add esp, 4
mov esi, eax
lea eax, [ebp - 0x26c]
push eax
lea eax, [ebp - 0x290]
push eax
push esi
call dword [sym.imp.WINSPOOL.DRV_OpenPrinterA]
test eax, eax
jne 0x40413c
push esi
call fcn.00415283
mov byte [ebp - 4], 0
add esp, 4
mov edx, dword [ebp - 0x230]
cmp edx, 0x10
jb 0x404194
mov ecx, dword [ebp - 0x244]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404130
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40470d
push edx
push ecx
call fcn.0040e2a5
add esp, 8
jmp 0x404194
mov edi, dword [ebp - 0x290]
mov dword [ebp - 0x22c], edi
push esi
call fcn.00415283
mov byte [ebp - 4], 0
add esp, 4
mov edx, dword [ebp - 0x230]
cmp edx, 0x10
jb 0x40418f
mov ecx, dword [ebp - 0x244]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404185
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40470d
push edx
push ecx
call fcn.0040e2a5
add esp, 8
cmp edi, 0xffffffff
jne 0x4041fd
cmp dword [0x43e9fc], 0x10
mov eax, 0x43e9e8
cmovae eax, dword [0x43e9e8]
push eax
push str.The_printer__s_is_not_existing__Exit_the_program
push dword [0x4400f4]
call fcn.00407ca0
mov edx, dword [ebp - 0x214]
add esp, 0xc
cmp edx, 0x10
jb 0x4041f5
mov ecx, dword [ebp - 0x228]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4041eb
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4046f9
push edx
push ecx
call fcn.0040e2a5
add esp, 8
or eax, 0xffffffff
jmp 0x40442b
push 0
push 1
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0x78
mov edi, eax
call fcn.0040e275
mov esi, eax
mov dword [ebp - 0x290], esi
push 0x78
push 0
push esi
call fcn.00410060
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
add esi, 0x14
mov byte [ebp - 4], 6
push 0x18
mov dword [ebp - 0x294], esi
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.0040e275
push 2
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [esi], eax
mov esi, dword [ebp - 0x290]
add esi, 0x1c
push esi
call fcn.0040d087
lea eax, [esi + 0x30]
push eax
call fcn.0040caf0
mov eax, dword [ebp - 0x290]
add esp, 0x20
mov dword [esi + 0x58], 0
mov byte [ebp - 4], 0
mov dword [eax], 0xffffffff
mov dword [eax + 0x74], 0
mov dword [eax + 4], edi
mov edi, eax
mov eax, dword [ebp - 0x22c]
mov dword [edi], eax
mov eax, dword [0x4400ec]
mov dword [eax + 8], edi
call fcn.00401290
push 0
sub esp, 0x18
mov dword [ebp - 0x248], 0
xorps xmm0, xmm0
mov ecx, esp
movups xmmword [ebp - 0x260], xmm0
push 0x43e9e8
movq qword [ebp - 0x250], xmm0
call fcn.00402150
lea ecx, [ebp - 0x260]
call fcn.00403300
push esi
mov byte [ebp - 4], 7
call fcn.0040d0a8
add esp, 4
test eax, eax
jne 0x404712
mov eax, dword [esi + 0x58]
test eax, eax
jne 0x40432f
lea edi, [esi + 0x30]
push esi
push edi
call fcn.0040cb14
mov eax, dword [esi + 0x58]
add esp, 8
test eax, eax
je 0x404318
mov edi, dword [ebp - 0x290]
dec eax
push esi
mov dword [esi + 0x58], eax
call fcn.0040d0cd
push dword [edi + 0x74]
push str.Semaphore_wait_consumed__semaphone_left:__d
push dword [0x4400f4]
call fcn.00407ca0
add esp, 0x10
push 0xffffffffffffffff
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push str.ReadWriteEvent_consumed
push dword [0x4400f4]
call fcn.00407ca0
mov eax, dword [edi + 0xc]
add esp, 8
mov esi, dword [edi + 8]
sub eax, esi
cmp eax, 4
jae 0x404446
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push str.JobsInfo_size0
push dword [0x4400f4]
call fcn.00407ca0
add esp, 8
mov edx, dword [ebp - 0x248]
cmp edx, 0x10
jb 0x4043d4
mov ecx, dword [ebp - 0x25c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4043ca
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40471d
push edx
push ecx
call fcn.0040e2a5
add esp, 8
mov edx, dword [ebp - 0x214]
mov dword [ebp - 0x24c], 0
mov dword [ebp - 0x248], 0xf
mov byte [ebp - 0x25c], 0
cmp edx, 0x10
jb 0x404429
mov ecx, dword [ebp - 0x228]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40441f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40471d
push edx
push ecx
call fcn.0040e2a5
add esp, 8
xor eax, eax
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.0040e264
mov esp, ebp
pop ebp
ret
mov esi, dword [esi]
lea ecx, [ebp - 0x270]
mov edx, esi
call fcn.00403690
sub esp, 0x10
mov byte [ebp - 4], 8
lea eax, [ebp - 0x244]
lea ecx, [ebp - 0x270]
push eax
call fcn.00404780
mov byte [ebp - 4], 9
push str.Listen_for_connect......
push dword [0x4400f4]
call fcn.00407ca0
add esp, 8
push 0
push dword [ebp - 0x260]
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x404520
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
je 0x404520
push str.Fatal_error__pipeserver_listen_return_false
push dword [0x4400f4]
call fcn.00407d20
mov edx, dword [ebp - 0x230]
add esp, 8
cmp edx, 0x10
jb 0x4044f5
mov ecx, dword [ebp - 0x244]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4044eb
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40471d
push edx
push ecx
call fcn.0040e2a5
add esp, 8
lea ecx, [ebp - 0x270]
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x230], 0xf
mov byte [ebp - 0x244], 0
call fcn.004049f0
jmp 0x40439a
push str.A_Client_has_connected.
push dword [0x4400f4]
call fcn.00407ca0
add esp, 8
lea ecx, [ebp - 0x22c]
cmp dword [ebp - 0x230], 0x10
lea eax, [ebp - 0x244]
cmovae eax, dword [ebp - 0x244]
push 0
push ecx
push dword [ebp - 0x234]
push eax
push dword [ebp - 0x260]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404603
cmp dword [ebp - 0x22c], 0xffffffff
je 0x404603
lea eax, [ebp - 0x2ac]
mov ecx, esi
push eax
call fcn.00401f40
mov byte [ebp - 4], 0xa
lea edx, [ebp - 0x244]
cmp dword [ebp - 0x230], 0x10
mov ecx, dword [edi + 0xc]
cmovae edx, dword [ebp - 0x244]
sub ecx, dword [edi + 8]
sar ecx, 2
cmp dword [eax + 0x14], 0x10
jb 0x4045af
mov eax, dword [eax]
push edx
push ecx
push 0
push eax
push dword [esi + 8]
push str.Pipe_write:__n_JobId:_d__n_Document:_s__n_JobInfoIndex:__d__JobInfoSize:__d___n_json:__s
push dword [0x4400f4]
call fcn.00407ca0
mov edx, dword [ebp - 0x298]
add esp, 0x1c
cmp edx, 0x10
jb 0x404616
mov ecx, dword [ebp - 0x2ac]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4045fa
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404718
push edx
push ecx
call fcn.0040e2a5
jmp 0x404613
push str.Pipe_Write_fails
push dword [0x4400f4]
call fcn.00407d20
add esp, 8
push dword [ebp - 0x260]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [ebp - 0x230]
cmp edx, 0x10
jb 0x404665
mov ecx, dword [ebp - 0x244]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40465b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40471d
push edx
push ecx
call fcn.0040e2a5
add esp, 8
lea ecx, [ebp - 0x270]
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x230], 0xf
mov byte [ebp - 0x244], 0
call fcn.004049f0
mov edx, dword [ebp - 0x248]
cmp edx, 0x10
jb 0x4046c1
mov ecx, dword [ebp - 0x25c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4046b7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40471d
push edx
push ecx
call fcn.0040e2a5
add esp, 8
mov edx, dword [ebp - 0x214]
cmp edx, 0x10
jb 0x404429
mov ecx, dword [ebp - 0x228]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40441f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40441f
call fcn.004127cf
call fcn.004127cf
call fcn.0040e3f8
call fcn.004127cf
call fcn.004127cf
push eax
call fcn.0040cc07
call fcn.004127cf
call fcn.004127cf
int3