Function at 0x402640
Capabilities:
Accept command line arguments
Connect pipe
Create pipe
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41a8fd
mov eax, dword fs:[0]
push eax
sub esp, 0x148
mov eax, dword [0x425040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x138], 0
xorps xmm0, xmm0
xor eax, eax
mov dword [ebp - 0x18], 0
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 4], eax
movups xmmword [ebp - 0x40], xmm0
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
push 0xb0
push eax
lea eax, [ebp - 0xf4]
mov byte [ebp - 4], 1
push eax
call fcn.00407ec0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edx, eax
mov dword [ebp - 0x124], 0
mov ecx, edx
mov dword [ebp - 0x120], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x134], xmm0
lea esi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4026f0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x134]
call fcn.00404e40
sub esp, 8
mov byte [ebp - 4], 2
lea eax, [ebp - 0x134]
lea ecx, [ebp - 0xf4]
push eax
call fcn.00403ca0
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x120]
cmp ecx, 7
jbe 0x402769
mov edx, dword [ebp - 0x134]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40275f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403198
push ecx
push edx
call fcn.004067bc
add esp, 8
push 0x2f
lea edx, [ebp - 0x28]
lea ecx, [ebp - 0xf4]
call fcn.004052d0
push 0x22
lea edx, [ebp - 0x28]
lea ecx, [ebp - 0xf4]
call fcn.004052d0
push 0x22
lea edx, [ebp - 0x28]
lea ecx, [ebp - 0xf4]
call fcn.004052d0
push 0x2f
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0xf4]
call fcn.004052d0
push 0x22
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0xf4]
call fcn.004052d0
push 0x22
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0xf4]
call fcn.004052d0
mov esi, dword [ebp - 0x18]
add esp, 0x18
cmp esi, 4
jb 0x40283d
mov ecx, 3
mov dword [ebp - 0x124], 0
cmp esi, ecx
mov dword [ebp - 0x120], 0
lea eax, [ebp - 0x28]
xorps xmm0, xmm0
cmovb ecx, esi
cmp dword [ebp - 0x14], 7
push ecx
cmova eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x134]
push eax
movups xmmword [ebp - 0x134], xmm0
call fcn.00404e40
mov eax, 9
lea ecx, [ebp - 0x134]
mov edx, 0x421fc4
mov dword [ebp - 0x138], eax
call fcn.004049d0
mov esi, dword [ebp - 0x18]
mov byte [ebp - 0x119], 1
test al, al
jne 0x402844
mov byte [ebp - 0x119], 0
mov eax, dword [ebp - 0x138]
test al, 1
je 0x402897
and eax, 0xfffffffe
mov dword [ebp - 0x138], eax
mov ecx, dword [ebp - 0x120]
cmp ecx, 7
jbe 0x402897
mov edx, dword [ebp - 0x134]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40288d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403198
push ecx
push edx
call fcn.004067bc
add esp, 8
cmp byte [ebp - 0x119], 0
je 0x402a8b
sub esp, 0x18
lea eax, [ebp - 0x40]
mov ecx, esp
push eax
call fcn.004041d0
mov cl, 1
call fcn.00402150
lea eax, [ebp - 0x40]
mov ecx, esp
push eax
call fcn.004041d0
call fcn.00402360
add esp, 0x18
mov dword [ebp - 0x124], 0
mov dword [ebp - 0x120], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x134], xmm0
test al, al
je 0x4029ef
cmp esi, 3
jb 0x403193
lea eax, [esi - 3]
mov ecx, 1
cmp eax, ecx
cmovb ecx, eax
cmp dword [ebp - 0x14], 7
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
push ecx
add eax, 6
lea ecx, [ebp - 0x134]
push eax
call fcn.00404e40
push 0x421fcc
lea edx, [ebp - 0x134]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x154]
call fcn.00404900
add esp, 4
mov ecx, 0x426c74
push eax
call fcn.00404140
mov ecx, dword [ebp - 0x140]
cmp ecx, 7
jbe 0x40298b
mov edx, dword [ebp - 0x154]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402981
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403198
push ecx
push edx
call fcn.004067bc
add esp, 8
xor eax, eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x120]
mov dword [ebp - 0x144], 0
mov dword [ebp - 0x140], 7
mov word [ebp - 0x154], ax
cmp ecx, 7
jbe 0x402f33
mov edx, dword [ebp - 0x134]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402f29
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403198
jmp 0x402f29
cmp esi, 3
jb 0x40319d
lea eax, [esi - 3]
mov ecx, 1
cmp eax, ecx
cmovb ecx, eax
cmp dword [ebp - 0x14], 7
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
push ecx
add eax, 6
lea ecx, [ebp - 0x134]
push eax
call fcn.00404e40
push 0x421fdc
lea edx, [ebp - 0x134]
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x154]
call fcn.00404900
add esp, 4
mov ecx, 0x426c74
push eax
call fcn.00404140
mov ecx, dword [ebp - 0x140]
cmp ecx, 7
jbe 0x40298b
mov edx, dword [ebp - 0x154]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402981
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403198
jmp 0x402981
cmp esi, 7
jb 0x402afd
mov ecx, 6
mov dword [ebp - 0x124], 0
cmp esi, ecx
mov dword [ebp - 0x120], 0
lea eax, [ebp - 0x28]
xorps xmm0, xmm0
cmovb ecx, esi
cmp dword [ebp - 0x14], 7
push ecx
cmova eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x134]
push eax
movups xmmword [ebp - 0x134], xmm0
call fcn.00404e40
mov eax, dword [ebp - 0x138]
lea ecx, [ebp - 0x134]
or eax, 0x42
mov edx, str.delete
mov dword [ebp - 0x138], eax
call fcn.004049d0
mov esi, dword [ebp - 0x18]
mov byte [ebp - 0x119], 1
test al, al
jne 0x402b04
mov byte [ebp - 0x119], 0
mov eax, dword [ebp - 0x138]
test al, 2
je 0x402b57
and eax, 0xfffffffd
mov dword [ebp - 0x138], eax
mov ecx, dword [ebp - 0x120]
cmp ecx, 7
jbe 0x402b57
mov edx, dword [ebp - 0x134]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402b4d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403198
push ecx
push edx
call fcn.004067bc
add esp, 8
cmp byte [ebp - 0x119], 0
je 0x402cea
sub esp, 0x18
lea eax, [ebp - 0x40]
mov ecx, esp
push eax
call fcn.004041d0
xor cl, cl
call fcn.00402150
lea eax, [ebp - 0x40]
mov ecx, esp
push eax
call fcn.004041d0
call fcn.00402360
add esp, 0x18
mov dword [ebp - 0x124], 0
mov dword [ebp - 0x120], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x134], xmm0
test al, al
je 0x402c4e
cmp esi, 6
jb 0x4031a2
lea eax, [esi - 6]
mov ecx, 1
cmp eax, ecx
cmovb ecx, eax
cmp dword [ebp - 0x14], 7
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
push ecx
add eax, 0xc
lea ecx, [ebp - 0x134]
push eax
call fcn.00404e40
push 0x421ff8
lea edx, [ebp - 0x134]
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x154]
call fcn.00404900
add esp, 4
mov ecx, 0x426c74
push eax
call fcn.00404140
mov ecx, dword [ebp - 0x140]
cmp ecx, 7
jbe 0x40298b
mov edx, dword [ebp - 0x154]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402981
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403198
jmp 0x402981
cmp esi, 6
jb 0x4031a7
lea eax, [esi - 6]
mov ecx, 1
cmp eax, ecx
cmovb ecx, eax
cmp dword [ebp - 0x14], 7
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
push ecx
add eax, 0xc
lea ecx, [ebp - 0x134]
push eax
call fcn.00404e40
push 0x422008
lea edx, [ebp - 0x134]
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x154]
call fcn.00404900
add esp, 4
mov ecx, 0x426c74
push eax
call fcn.00404140
mov ecx, dword [ebp - 0x140]
cmp ecx, 7
jbe 0x40298b
mov edx, dword [ebp - 0x154]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402981
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403198
jmp 0x402981
cmp esi, 6
jb 0x402d57
mov ecx, 5
mov dword [ebp - 0x124], 0
cmp esi, ecx
mov dword [ebp - 0x120], 0
lea eax, [ebp - 0x28]
xorps xmm0, xmm0
cmovb ecx, esi
cmp dword [ebp - 0x14], 7
push ecx
cmova eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x134]
push eax
movups xmmword [ebp - 0x134], xmm0
call fcn.00404e40
or dword [ebp - 0x138], 0x104
lea ecx, [ebp - 0x134]
mov edx, str.query
call fcn.004049d0
mov esi, dword [ebp - 0x18]
mov byte [ebp - 0x119], 1
test al, al
jne 0x402d5e
mov byte [ebp - 0x119], 0
mov eax, dword [ebp - 0x138]
test al, 4
je 0x402da8
mov ecx, dword [ebp - 0x120]
cmp ecx, 7
jbe 0x402da8
mov edx, dword [ebp - 0x134]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402d9e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403198
push ecx
push edx
call fcn.004067bc
add esp, 8
cmp byte [ebp - 0x119], 0
je 0x403046
sub esp, 0x18
lea eax, [ebp - 0x40]
mov ecx, esp
push eax
call fcn.004041d0
call fcn.00402360
add esp, 0x18
mov dword [ebp - 0x124], 0
mov dword [ebp - 0x120], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x134], xmm0
test al, al
je 0x402e8d
cmp esi, 5
jb 0x4031ac
lea eax, [esi - 5]
mov ecx, 1
cmp eax, ecx
cmovb ecx, eax
cmp dword [ebp - 0x14], 7
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
push ecx
add eax, 0xa
lea ecx, [ebp - 0x134]
push eax
call fcn.00404e40
push str.success
lea edx, [ebp - 0x134]
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x154]
call fcn.00404900
add esp, 4
mov ecx, 0x426c74
push eax
call fcn.00404140
mov ecx, dword [ebp - 0x140]
cmp ecx, 7
jbe 0x40298b
mov edx, dword [ebp - 0x154]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402981
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403198
jmp 0x402981
cmp esi, 5
jb 0x4031b1
lea eax, [esi - 5]
mov ecx, 1
cmp eax, ecx
cmovb ecx, eax
cmp dword [ebp - 0x14], 7
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
push ecx
add eax, 0xa
lea ecx, [ebp - 0x134]
push eax
call fcn.00404e40
push str.fail
lea edx, [ebp - 0x134]
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x154]
call fcn.00404900
add esp, 4
mov ecx, 0x426c74
push eax
call fcn.00404140
mov ecx, dword [ebp - 0x140]
cmp ecx, 7
jbe 0x40298b
mov edx, dword [ebp - 0x154]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402981
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403198
jmp 0x402981
push ecx
push edx
call fcn.004067bc
add esp, 8
push 0
lea eax, [ebp - 0xf8]
push eax
push 1
push str.D:_A_OICI_GRGW___WD_
call dword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
mov eax, dword [ebp - 0xf8]
mov dword [ebp - 0x114], eax
lea eax, [ebp - 0x118]
push eax
push 0xffffffffffffffff
push 0
push 0
push 0xff
push 6
push 3
push str..pipeIDTPipe1
mov dword [ebp - 0x118], 0xc
mov dword [ebp - 0x110], 0
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
push dword [ebp - 0xf8]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 0xfc], eax
xor esi, esi
mov dword [ebp - 0x10c], 0
mov dword [ebp - 0x108], 0
mov dword [ebp - 0x104], 0
mov dword [ebp - 0x100], 0
lea eax, [ebp - 0x10c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x40300b
lea ecx, [ebp - 0x13c]
mov dword [ebp - 0x13c], 0x64
mov dword [ebp - 0x138], eax
call fcn.00404a30
inc esi
cmp esi, 5
jle 0x402fd6
jmp 0x403035
mov eax, dword [0x426c84]
lea edx, [ebp - 0x44]
cmp dword [0x426c88], 7
push 0
push edx
lea ecx, [eax + eax]
mov eax, 0x426c74
cmova eax, dword [0x426c74]
push ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push dword [ebp - 0xfc]
call esi
mov eax, dword [ebp - 0xf4]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xf4], vtable.std::basic_stringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0xf4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0xf8], eax
lea ecx, [ebp - 0xdc]
call fcn.004038a0
mov eax, dword [ebp - 0xf4]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xf4], vtable.std::basic_iostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0xf4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x20]
mov dword [ebp + ecx - 0xf8], eax
mov eax, dword [ebp - 0xe4]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xe4], vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0xe4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0xe8], eax
mov eax, dword [ebp - 0xf4]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xf4], vtable.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0xf4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x18]
mov dword [ebp + ecx - 0xf8], eax
lea eax, [ebp - 0x8c]
mov byte [ebp - 4], 0xb
push eax
mov dword [ebp - 0x8c], vtable.std::ios_base.0
call fcn.0040608e
mov ecx, dword [ebp - 0x2c]
add esp, 4
cmp ecx, 7
jbe 0x403140
mov edx, dword [ebp - 0x40]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x403136
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403198
push ecx
push edx
call fcn.004067bc
add esp, 8
mov ecx, dword [ebp - 0x14]
cmp ecx, 7
jbe 0x403176
mov edx, dword [ebp - 0x28]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40316c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403198
push ecx
push edx
call fcn.004067bc
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.0040652d
mov esp, ebp
pop ebp
ret
call fcn.00404780
call fcn.0040afce
call fcn.00404780
call fcn.00404780
call fcn.00404780
call fcn.00404780
call fcn.00404780
int3