Function at 0x401856
Capabilities:
Connect pipe
Encode data using xor

Disassembly:
push ecx
mov ecx, dword [esp + 0x1c]
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
mov esi, dword [esp + 0x1c]
lea edx, [ecx - 0x23a3]
add ebx, 0xffffffb9
mov dword [esp + 0x28], edx
push edi
mov edi, dword [esp + 0x24]
lea ebp, [ecx + 0x62]
add edi, 0x3a
mov dword [esp + 0x10], ebx
add esi, 0x67
mov dword [esp + 0x18], edi
lea eax, [ebx + 0x118]
mov dword [esp + 0x20], esi
cmp edi, eax
jg 0x401ab5
cmp edi, ebp
jl 0x401aa7
lea eax, [ebx + 0x16b]
cmp ebp, eax
je 0x401aa7
mov eax, dword [0x645d9c]
xor edx, 0x2474
mov esi, dword [esp + 0x28]
mov dword [esp + 0x2c], edx
mov ecx, dword [eax + 0x34]
add ecx, dword [eax + 0x20]
xor ecx, dword [esi + 0x6c]
xor ecx, 0xc4ef9243
xor edi, edi
mov dword [esi + 0x6c], ecx
mov eax, dword [0x645d9c]
mov dword [eax + 0xa0], 0x4bb688
mov eax, dword [0x645d9c]
mov eax, dword [eax + 0xa0]
mov ebx, dword [eax + edi]
add edi, 4
mov eax, dword [0x645eb8]
sub eax, dword [0x645e30]
imul ebx, dword [esi + 0x6c]
or dword [esi + 0x5c], eax
mov ecx, dword [0x645d9c]
mov edx, ebx
mov eax, dword [ecx + 0x10]
sub eax, 0x7830570
shr edx, 0x10
or dword [ecx + 4], eax
mov eax, dword [0x645db0]
add eax, 0xf87cfa90
add dword [esi + 0xd4], eax
mov eax, dword [0x645e30]
dec eax
xor dword [esi + 0xc4], eax
mov eax, dword [esi + 4]
sub eax, 9
imul eax, dword [esi + 0x128]
mov dword [esi + 0x128], eax
mov eax, dword [0x645d9c]
mov ecx, dword [eax + 0x84]
mov eax, dword [esi + 0xa4]
mov byte [ecx + eax], dl
mov edx, ebx
mov eax, dword [0x645d9c]
shr edx, 8
inc dword [eax + 0x84]
mov ecx, dword [0x645d9c]
mov eax, dword [esi + 0xb0]
xor eax, dword [0x645de0]
sub dword [ecx + 0x108], eax
mov eax, dword [esi + 0x84]
mov ecx, dword [esi + 0xa4]
mov byte [ecx + eax], dl
inc dword [esi + 0x84]
mov ecx, dword [esi + 0x84]
mov eax, dword [esi + 0xa4]
mov byte [ecx + eax], bl
inc dword [esi + 0x84]
mov eax, dword [0x645d9c]
mov eax, dword [eax + 0x34]
sub dword [esi + 0x2c], eax
mov eax, dword [esi + 0x2c]
add eax, 0xfffefc72
add dword [esi + 0xec], eax
mov eax, dword [esi + 0xc4]
xor eax, dword [esi + 4]
sub eax, 0xa
or dword [esi + 0x20], eax
mov eax, dword [esi + 0x124]
xor eax, dword [0x645e30]
xor eax, 1
mov dword [esi + 0x124], eax
mov eax, dword [0x645d9c]
mov eax, dword [eax + 0x5c]
sub eax, 0xe25fa
or dword [esi + 0x10], eax
cmp edi, 0x1a280
jl 0x4018e7
mov ecx, dword [esp + 0x10]
mov eax, dword [esi + 0xc8]
xor eax, 0x1744a29
mov dword [esi + 0x6c], eax
lea eax, [ecx + 0xac]
push eax
lea eax, [ecx + 0x50]
push eax
mov eax, dword [esp + 0x28]
add eax, 0x1c
push eax
mov eax, dword [esp + 0x38]
add eax, 0xffffff2f
xor eax, 0x14
push eax
lea eax, [ecx + 0x238]
push esi
push eax
lea eax, [ebp + 0xf2]
push eax
call fcn.00401340
mov eax, dword [0x645d9c]
add esp, 0x1c
cmp dword [eax + 0x78], 0x16b1c
jae 0x401a72
mov eax, dword [esi + 0x5c]
xor eax, 0xe2f68
mov dword [esi + 0x6c], eax
jmp 0x401a87
mov eax, dword [esi + 0xf8]
add eax, dword [esi + 0xcc]
add eax, dword [esi + 0xb0]
sub dword [esi + 0x78], eax
cmp dword [esi + 0x20], 0x5280
jae 0x401aa7
mov ecx, dword [esi + 0x4c]
mov eax, dword [0x645e0c]
xor ecx, dword [esi + 4]
add eax, 0xc13
add eax, ecx
mov dword [0x645e0c], eax
pop edi
xor ebp, 0x8d
pop esi
mov eax, ebp
pop ebp
pop ebx
pop ecx
ret
mov ecx, dword [0x645d9c]
mov edi, dword [esp + 0x28]
mov eax, dword [ecx + 0x70]
xor eax, dword [edi + 0x2c]
and eax, dword [0x645e38]
cmp dword [edi + 0xb0], eax
jne 0x401b7c
mov eax, dword [0x645e84]
mov ecx, dword [edi + 0x118]
imul eax, esi
sub ecx, 0x23ff
mov esi, edx
mov edx, dword [edi + 0x78]
imul edx, ebp
or esi, 0x2537
sub esi, dword [edi + 0x120]
inc eax
imul ebx, eax
mov eax, dword [edi + 0x40]
or eax, dword [esp + 0x2c]
and edx, dword [esp + 0x18]
or eax, 0x2474
push eax
push ecx
push edx
push esi
mov esi, dword [esp + 0x30]
imul eax, esi, 0xffffe4db
and eax, 0x24c3
push eax
push edi
call fcn.00419eb2
add esp, 0x18
imul ecx, esi, 0x23a3
mov dword [esp + 0x18], eax
mov eax, dword [0x645df4]
imul eax, ebx
push ecx
mov ecx, dword [edi + 0x78]
or ecx, 0x25a8
xor ecx, dword [edi]
push ecx
mov ecx, dword [0x645d9c]
mov ecx, dword [ecx + 0x24]
imul ecx, dword [0x645da4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esp + 0x2c]
lea eax, [esi + ebp]
or eax, 0x23a3
mov dword [edi + 0x18], eax
mov ecx, dword [0x645d9c]
xor esi, 0x2405
cmp dword [edi + 0x8c], esi
je 0x401aa7
imul eax, ebx, 0x24da
mov ebp, edx
or ebp, dword [esp + 0x20]
sub esi, dword [edi + 0x8c]
mov dword [esp + 0x10], ebp
mov dword [esp + 0x24], eax
mov eax, dword [0x645de4]
mov edx, dword [0x645e30]
imul eax, dword [esp + 0x2c]
or edx, 0x23ff
add edx, dword [ecx + 0x8c]
mov ecx, dword [ecx + 0x40]
xor ecx, dword [edi + 0xa8]
xor ecx, 0x2370
push eax
push edi
push ecx
push dword [esp + 0x30]
push ebp
push edx
call fcn.00401856
mov ecx, dword [0x645d9c]
add esp, 0x18
mov ebp, eax
mov ecx, dword [ecx + 0xe4]
sub ecx, dword [esp + 0x18]
push ecx
mov ecx, dword [edi + 0xb4]
add ecx, ebx
and ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
sub esi, 1
je 0x401aa7
mov ecx, dword [0x645d9c]
mov ebp, dword [esp + 0x10]
jmp 0x401ba8