Function at 0x401830
Capabilities:
Copy file
Create thread
Delete file
Read file on windows
Set console window title
Write file on windows

Disassembly:
mov eax, 0x1758
call fcn.004029c0
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0
push 0
push 1
push 0
mov byte [esp + 0x17], 0
call esi
push 1
push 0x401600
mov dword [0x40ada4], eax
mov dword [esp + 0x554], 0
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
push 0x409a60
push 0x409798
push 0x40836c
push str.PSEXESVC.EXE
push 0x40836c
push 0x408354
push 0x409690
call fcn.004014a0
add esp, 0x1c
test al, al
jne 0x4018a7
or eax, 0xffffffff
pop esi
add esp, 0x1758
ret
push ebx
push ebp
call fcn.004012e0
push 0x409690
push str._rConnecting_with_PsExec_service_on__s...
call fcn.0040264e
push 0x409690
lea eax, [esp + 0x44]
push str._spipepsexecsvc
push eax
call fcn.004025fc
add esp, 0x14
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
lea ecx, [esp + 0x38]
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push ecx
call ebx
cmp eax, 0xffffffff
mov dword [0x408150], eax
jne 0x401916
call fcn.004012e0
push 0x409690
push str._rError_establishing_communication_with_PsExec_service_on__s:_n
call fcn.0040264e
add esp, 8
jmp 0x401ec6
xor edx, edx
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], edx
push edx
push edx
push 1
push edx
mov dword [esp + 0x34], edx
call esi
mov dword [esp + 0x24], eax
mov al, byte [0x40989d]
test al, al
je 0x4019e2
call fcn.004012e0
push 0x409690
push 0x40aca0
push str._rCopying__s_to__s...
call fcn.0040264e
push 0x5c
push 0x40aca0
call fcn.00402990
mov ebp, eax
add esp, 0x14
test ebp, ebp
jne 0x401979
mov ebp, 0x40aca0
jmp 0x40197a
inc ebp
push ebp
push 0x409690
lea eax, [esp + 0x560]
push str._sADMIN_System32_s
push eax
call fcn.004025fc
add esp, 0x10
lea ecx, [esp + 0x558]
push 1
push ecx
push 0x40aca0
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x4019db
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0xb7
je 0x4019db
call fcn.004012e0
push 0x40aca0
push str._rError_copying__s_to_remote_system:_n
call fcn.0040264e
add esp, 8
call esi
jmp 0x401ecc
mov byte [esp + 0xf], 1
jmp 0x4019e7
mov ebp, 0x40aca0
push edi
call fcn.004012e0
push 0x409690
push 0x40aca0
push str._rStarting__s_on__s...
call fcn.0040264e
mov al, byte [0x40989e]
mov dl, byte [0x40989f]
mov byte [esp + 0x355], al
mov al, byte [0x409794]
add esp, 0xc
mov byte [esp + 0x348], dl
test al, al
mov byte [esp + 0x34a], al
je 0x401a7f
mov edi, 0x409798
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x34b]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x44f]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x409a60
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x140]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x248]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40adc0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x144]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [0x408150]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
push ecx
push 0x41c
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x401b1d
call fcn.004012e0
push 0x409690
push str._rError_communicating_with_PsExec_service_on__s:_n
call fcn.0040264e
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004012a0
add esp, 4
jmp 0x401e9e
call fcn.004012e0
push 0x408244
call fcn.0040264e
mov al, byte [0x40989f]
add esp, 4
test al, al
jne 0x401da9
push 0x409690
lea ecx, [esp + 0x40]
push str._spipepsexecsvc_in
push ecx
call fcn.004025fc
add esp, 0xc
lea edx, [esp + 0x3c]
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push edx
call ebx
cmp eax, 0xffffffff
mov dword [0x40814c], eax
jne 0x401b9e
call fcn.004012e0
push 0x409690
push str._rError_establishing_communication_with_PsExec_service_on__s:_n
call fcn.0040264e
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004012a0
add esp, 4
jmp 0x401e9e
push 0x409690
lea eax, [esp + 0x40]
push str._spipepsexecsvc_out
push eax
call fcn.004025fc
add esp, 0xc
lea ecx, [esp + 0x3c]
push 0
push 0x40000000
push 3
push 0
push 0
push 0xc0000000
push ecx
call ebx
cmp eax, 0xffffffff
mov dword [0x408148], eax
jne 0x401c03
call fcn.004012e0
push 0x409690
push str._rError_establishing_communication_with_PsExec_service_on__s:_n
call fcn.0040264e
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004012a0
add esp, 4
jmp 0x401e9e
mov eax, dword [0x40814c]
lea edx, [esp + 0x38]
push edx
push 0
push eax
push 0x4017a0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
mov dword [esp + 0x2c], eax
jne 0x401c4d
call fcn.004012e0
push str._rError_launching_input_thread:_n
call fcn.0040264e
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004012a0
add esp, 4
jmp 0x401e9e
lea ecx, [esp + 0x244]
lea edx, [esp + 0x140]
push ecx
push edx
push 0x409690
lea eax, [esp + 0x66c]
push str._s:__s__s
push eax
call fcn.004025fc
add esp, 0x14
lea ecx, [esp + 0x660]
push ecx
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
mov edx, dword [esp + 0x28]
mov eax, dword [0x40ada4]
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov ebx, dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea edx, [esp + 0x18]
lea eax, [esp + 0x14]
push edx
mov edx, dword [0x408148]
push eax
lea ecx, [esp + 0x76c]
push 0x1000
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401d18
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x401d7f
push 0xffffffffffffffff
lea eax, [esp + 0x34]
push 0
push eax
push 2
call ebp
cmp eax, 1
je 0x401d7f
mov eax, dword [0x408148]
lea ecx, [esp + 0x14]
push 1
lea edx, [esp + 0x1c]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x401d7f
mov edx, dword [esp + 0x14]
mov al, byte [0x409ca0]
test al, al
mov byte [esp + edx + 0x764], 0
je 0x401d5f
lea edi, [esp + 0x764]
or ecx, 0xffffffff
xor eax, eax
mov esi, 0x409ca0
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x764]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x401d5f
mov byte [0x409ca0], al
mov dword [0x4098a0], eax
jmp 0x401ca2
lea ecx, [esp + 0x14]
push 0
push ecx
push edx
lea edx, [esp + 0x770]
push edx
push 0xfffffffffffffff5
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x401ca2
push 0xfffffffffffffff6
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov eax, dword [esp + 0x2c]
push 0xffffffffffffffff
push eax
mov byte [0x408144], 0
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [0x40814c]
push ecx
call esi
mov edx, dword [esp + 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [esp + 0x18]
lea ecx, [esp + 0x14]
push eax
mov eax, dword [0x408150]
push ecx
lea edx, [esp + 0x148]
push 0x41c
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [0x408150]
lea ecx, [esp + 0x14]
push 1
lea edx, [esp + 0x1c]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x401e1e
call fcn.004012e0
push 0x409690
push str._rError_communicating_with_PsExec_service_on__s:_n
call fcn.0040264e
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004012a0
add esp, 4
jmp 0x401e9e
mov eax, dword [esp + 0x554]
test eax, eax
je 0x401e57
call fcn.004012e0
lea ecx, [esp + 0x140]
push 0x409690
push ecx
push str._rPsExec_could_not_start__s_on__s:_n
call fcn.0040264e
mov edx, dword [esp + 0x560]
push edx
call fcn.004012a0
add esp, 0x10
jmp 0x401e9e
mov al, byte [0x40989f]
test al, al
jne 0x401e84
mov eax, dword [esp + 0x558]
lea ecx, [esp + 0x140]
push eax
push 0x409690
push ecx
push str._s_exited_on__s_with_error_code__d._n
call fcn.0040264e
add esp, 0x10
jmp 0x401e9e
lea edx, [esp + 0x140]
push 0x409690
push edx
push str._s_started_on__s._n
call fcn.0040264e
add esp, 0xc
mov al, byte [esp + 0x13]
pop edi
test al, al
je 0x401ed5
lea eax, [esp + 0x558]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x401ed5
push str.Could_not_delete__s_from_remote_system:_n
call fcn.0040264e
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004012a0
add esp, 4
push str.PSEXESVC.EXE
push 0x40836c
push 0x409690
call fcn.00401450
mov eax, dword [esp + 0x560]
add esp, 0xc
pop ebp
pop ebx
pop esi
add esp, 0x1758
ret