Function at 0x406020
Capabilities:
Connect pipe
Create pipe
Read file on windows
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc58
mov eax, dword [0x4430a0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
push 0
push 0xffffffffffffffff
push 0xffff
push 0xffff
push 0xff
push 6
push 3
push dword [ebx + 8]
mov dword [ebp - 0xc2c], ebx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
push 1
mov dword [ebp - 0xc24], eax
call fcn.00413cdd
push eax
call fcn.00413ecc
add esp, 8
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
push str.JC_Transfer_Unicode
push edi
call esi
push str.DJC_OpenAllUserDic_Unicode
push edi
mov dword [ebp - 0xc38], eax
call esi
push 0xc18
mov dword [ebp - 0xc30], eax
lea eax, [ebp - 0xc1c]
push 0
push eax
call fcn.0040ff90
mov esi, 4
add esp, 0xc
cmp dword [ebp + 8], esi
jle 0x4060ec
lea edi, [ebp - 0xc1c]
mov eax, dword [ebx + esi*4]
mov edx, edi
sub edx, eax
nop
movzx ecx, word [eax]
lea eax, [eax + 2]
mov word [edx + eax - 2], cx
test cx, cx
jne 0x4060d0
inc esi
add edi, 0x408
cmp esi, dword [ebp + 8]
jl 0x4060c8
lea eax, [ebp - 0xc1c]
push 0
push eax
call dword [ebp - 0xc30]
push 0x1770
call fcn.0040e540
push 0x1770
mov ebx, eax
call fcn.0040e540
push 0x1770
mov edi, eax
call fcn.0040e540
add esp, 0x14
mov dword [ebp - 0xc48], 0
mov esi, eax
xorps xmm0, xmm0
lea eax, [ebp - 0xc58]
mov dword [ebp - 0xc34], esi
movups xmmword [ebp - 0xc58], xmm0
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 0
push 0
push 1
lea eax, [ebp - 0xc58]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
lea eax, [ebp - 0xc58]
mov dword [ebp - 0xc44], 0xc
mov dword [ebp - 0xc40], eax
mov eax, dword [ebp - 0xc2c]
mov dword [ebp - 0xc3c], 0
push dword [eax + 0xc]
lea eax, [ebp - 0xc44]
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0
push dword [ebp - 0xc24]
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
push 0x1770
push 0
push ebx
call fcn.0040ff90
push 0x1770
push 0
push edi
call fcn.0040ff90
push 0x1770
push 0
push esi
call fcn.0040ff90
add esp, 0x24
mov dword [ebp - 0xc2c], 0xbb8
lea eax, [ebp - 0xc28]
mov dword [ebp - 0xc30], 0xbb8
push 0
push eax
push 4
lea eax, [ebp - 0xc20]
push eax
push dword [ebp - 0xc24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0xc20]
movzx esi, al
shl esi, 8
movzx eax, ah
or esi, eax
movzx eax, byte [ebp - 0xc1e]
shl esi, 8
or esi, eax
movzx eax, byte [ebp - 0xc1d]
shl esi, 8
or esi, eax
lea eax, [ebp - 0xc28]
push 0
push eax
push 0x1770
push ebx
push dword [ebp - 0xc24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406362
nop word [eax + eax]
lea eax, [ebp - 0xc30]
push eax
push dword [ebp - 0xc34]
lea eax, [ebp - 0xc2c]
push eax
push edi
push ebx
push 1
push 1
push esi
push 0x3a4
push 0
call dword [ebp - 0xc38]
mov ecx, edi
add esp, 0x28
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406290
mov esi, dword [ebp - 0xc24]
lea eax, [ebp - 0xc28]
sub ecx, edx
push 0
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x1770
push 0
push ebx
call fcn.0040ff90
push 0x1770
push 0
push edi
call fcn.0040ff90
push 0x1770
push 0
push dword [ebp - 0xc34]
call fcn.0040ff90
add esp, 0x24
mov dword [ebp - 0xc2c], 0xbb8
lea eax, [ebp - 0xc28]
mov dword [ebp - 0xc30], 0xbb8
push 0
push eax
push 4
lea eax, [ebp - 0xc20]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0xc20]
movzx esi, al
shl esi, 8
movzx eax, ah
or esi, eax
movzx eax, byte [ebp - 0xc1e]
shl esi, 8
or esi, eax
movzx eax, byte [ebp - 0xc1d]
push 0
shl esi, 8
or esi, eax
lea eax, [ebp - 0xc28]
push eax
push 0x1770
push ebx
push dword [ebp - 0xc24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x406260
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040e54e
mov esp, ebp
pop ebp
ret