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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10071cb0
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x4c
push ebx
push esi
push edi
mov eax, dword [0x10093054]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 1
push 1
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 0
push 0
push 1
lea ecx, [ebp - 0x5c]
push ecx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
mov dword [ebp - 0x48], 0xc
mov dword [ebp - 0x40], 0
lea edx, [ebp - 0x5c]
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x14], 0
jmp 0x100149ff
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
cmp edx, dword [ecx + 0xc]
jge 0x10014ba5
push 0
push 1
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 4]
mov ecx, dword [ebp - 0x14]
mov dword [edx + ecx*4], eax
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 4]
mov ecx, dword [ebp - 0x14]
cmp dword [eax + ecx*4], 0
jne 0x10014a69
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x20]
push edx
push 0x10077118
push 0x100947d8
call fcn.1000ade0
add esp, 8
mov ecx, eax
call fcn.10014670
mov dword [ebp - 0x1c], 0
jmp 0x10014ba5
imul eax, dword [ebp - 0x14], 0x2030
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x18]
mov ecx, dword [ecx + 4]
mov esi, dword [ebp - 0x14]
mov ecx, dword [ecx + esi*4]
mov dword [edx + eax + 0x10], ecx
lea edx, [ebp - 0x48]
push edx
push 0x1388
push 0x2000
push 0x2000
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 0xc]
push ecx
push 6
push 0x40000003
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
imul ecx, dword [ebp - 0x14], 0x2030
mov edx, dword [ebp - 0x18]
mov edx, dword [edx]
mov dword [edx + ecx + 0x14], eax
imul eax, dword [ebp - 0x14], 0x2030
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
cmp dword [edx + eax + 0x14], 0xffffffff
jne 0x10014b29
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x20], eax
push 0x10077134
mov eax, dword [ebp - 0x20]
push eax
push str.__with
mov ecx, dword [ebp - 0x14]
push ecx
push str.CreateNamedPipe_failed_i:
push 0x100947d8
call fcn.1000ade0
add esp, 8
mov ecx, eax
call fcn.100079d0
push eax
call fcn.1000ade0
add esp, 8
mov ecx, eax
call fcn.10014670
push eax
call fcn.1000ade0
add esp, 8
mov dword [ebp - 0x1c], 0
jmp 0x10014ba5
imul edx, dword [ebp - 0x14], 0x2030
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
add ecx, edx
push ecx
imul edx, dword [ebp - 0x14], 0x2030
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
mov edx, dword [ecx + edx + 0x14]
push edx
mov ecx, dword [ebp - 0x18]
call fcn.10014830
imul ecx, dword [ebp - 0x14], 0x2030
mov edx, dword [ebp - 0x18]
mov edx, dword [edx]
mov dword [edx + ecx + 0x2024], eax
imul eax, dword [ebp - 0x14], 0x2030
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
cmp dword [edx + eax + 0x2024], 0
je 0x10014b83
mov dword [ebp - 0x34], 0
jmp 0x10014b8a
mov dword [ebp - 0x34], 1
imul eax, dword [ebp - 0x14], 0x2030
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x34]
mov dword [edx + eax + 0x2020], ecx
jmp 0x100149f6
mov dword [ebp - 0x24], 1
cmp dword [ebp - 0x1c], 0
je 0x10015198
mov edx, 1
test edx, edx
je 0x10015198
push 0xffffffffffffffff
push 0
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0xc]
add eax, 1
push eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0x102
jne 0x10014c24
push 0x1007715c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.dwWait__WAIT_TIMEOUT___last_error:
push 0x100947d8
call fcn.1000ade0
add esp, 8
mov ecx, eax
call fcn.10014670
push eax
call fcn.1000ade0
add esp, 8
mov dword [ebp - 0x24], 0
jmp 0x10015198
cmp dword [ebp - 0x2c], 0xffffffff
jne 0x10014c64
push 0x10077188
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.dwWait__WAIT_FAILED___last_error:
push 0x100947d8
call fcn.1000ade0
add esp, 8
mov ecx, eax
call fcn.10014670
push eax
call fcn.1000ade0
add esp, 8
mov dword [ebp - 0x24], 0
jmp 0x10015198
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x14], ecx
cmp dword [ebp - 0x14], 0
jl 0x10014c7e
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0xc]
sub eax, 1
cmp dword [ebp - 0x14], eax
jle 0x10014cd1
push 0x100771b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.__last_error:
mov ecx, dword [ebp - 0x2c]
push ecx
push str.Index_out_of_range__wait:
push 0x100947d8
call fcn.1000ade0
add esp, 8
mov ecx, eax
call fcn.10014670
push eax
call fcn.1000ade0
add esp, 8
mov ecx, eax
call fcn.10014670
push eax
call fcn.1000ade0
add esp, 8
mov dword [ebp - 0x24], 0
jmp 0x10015198
imul edx, dword [ebp - 0x14], 0x2030
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
cmp dword [ecx + edx + 0x2024], 0
je 0x10014e4f
push 1
lea edx, [ebp - 0x28]
push edx
imul eax, dword [ebp - 0x14], 0x2030
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
add edx, eax
push edx
imul eax, dword [ebp - 0x14], 0x2030
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
mov eax, dword [edx + eax + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov dword [ebp - 0x1c], eax
imul ecx, dword [ebp - 0x14], 0x2030
mov edx, dword [ebp - 0x18]
mov eax, dword [edx]
mov ecx, dword [eax + ecx + 0x2020]
mov dword [ebp - 0x30], ecx
cmp dword [ebp - 0x30], 0
je 0x10014d4b
cmp dword [ebp - 0x30], 1
je 0x10014d99
cmp dword [ebp - 0x30], 2
je 0x10014de5
jmp 0x10014e2d
cmp dword [ebp - 0x1c], 0
jne 0x10014d7d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error_:
push 0x100947d8
call fcn.1000ade0
add esp, 8
mov ecx, eax
call fcn.10014670
mov dword [ebp - 0x24], 0
jmp 0x10014e4f
imul edx, dword [ebp - 0x14], 0x2030
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
mov dword [ecx + edx + 0x2020], 1
jmp 0x10014e4f
cmp dword [ebp - 0x1c], 0
je 0x10014da5
cmp dword [ebp - 0x28], 0
jne 0x10014db6
mov edx, dword [ebp - 0x14]
push edx
mov ecx, dword [ebp - 0x18]
call fcn.100152d0
jmp 0x10014bb6
imul eax, dword [ebp - 0x14], 0x2030
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x28]
mov dword [edx + eax + 0x1018], ecx
imul edx, dword [ebp - 0x14], 0x2030
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
mov dword [ecx + edx + 0x2020], 2
jmp 0x10014e4f
cmp dword [ebp - 0x1c], 0
je 0x10014e03
imul edx, dword [ebp - 0x14], 0x2030
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
mov eax, dword [ebp - 0x28]
cmp eax, dword [ecx + edx + 0x201c]
je 0x10014e14
mov ecx, dword [ebp - 0x14]
push ecx
mov ecx, dword [ebp - 0x18]
call fcn.100152d0
jmp 0x10014bb6
imul edx, dword [ebp - 0x14], 0x2030
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
mov dword [ecx + edx + 0x2020], 1
jmp 0x10014e4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x20], eax
push str.Invalid_pipe_state.
push 0x100947d8
call fcn.1000ade0
add esp, 8
mov dword [ebp - 0x24], 0
cmp dword [ebp - 0x24], 0
jne 0x10014e5a
jmp 0x10015198
imul edx, dword [ebp - 0x14], 0x2030
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
mov edx, dword [ecx + edx + 0x2020]
mov dword [ebp - 0x38], edx
cmp dword [ebp - 0x38], 1
je 0x10014e85
cmp dword [ebp - 0x38], 2
je 0x10014f6c
jmp 0x10015178
imul eax, dword [ebp - 0x14], 0x2030
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
add edx, eax
push edx
imul eax, dword [ebp - 0x14], 0x2030
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
lea eax, [edx + eax + 0x1018]
push eax
push 0x1000
imul ecx, dword [ebp - 0x14], 0x2030
mov edx, dword [ebp - 0x18]
mov eax, dword [edx]
lea ecx, [eax + ecx + 0x18]
push ecx
imul edx, dword [ebp - 0x14], 0x2030
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
mov edx, dword [ecx + edx + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x10014f27
imul eax, dword [ebp - 0x14], 0x2030
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
cmp dword [edx + eax + 0x1018], 0
je 0x10014f27
imul eax, dword [ebp - 0x14], 0x2030
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
mov dword [edx + eax + 0x2024], 0
imul eax, dword [ebp - 0x14], 0x2030
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
mov dword [edx + eax + 0x2020], 2
jmp 0x10014bb6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x1c], 0
jne 0x10014f5b
cmp dword [ebp - 0x20], 0x3e5
jne 0x10014f5b
imul eax, dword [ebp - 0x14], 0x2030
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
mov dword [edx + eax + 0x2024], 1
jmp 0x10014bb6
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x18]
call fcn.100152d0
jmp 0x10015193
mov dword [ebp - 4], 0
imul ecx, dword [ebp - 0x14], 0x2030
mov edx, dword [ebp - 0x18]
add ecx, dword [edx]
push ecx
mov ecx, dword [ebp - 0x18]
call fcn.100153a0
jmp 0x10014fb4
mov dword [ebp - 4], 0xffffffff
jmp 0x10014fc4
jmp 0x10014fd2
imul ecx, dword [ebp - 0x14], 0x2030
mov edx, dword [ebp - 0x18]
mov eax, dword [edx]
cmp dword [eax + ecx + 0x202c], 0
je 0x1001503f
imul ecx, dword [ebp - 0x14], 0x2030
mov edx, dword [ebp - 0x18]
mov eax, dword [edx]
add eax, ecx
push eax
lea ecx, [ebp - 0x28]
push ecx
imul edx, dword [ebp - 0x14], 0x2030
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
mov edx, dword [ecx + edx + 0x201c]
push edx
imul eax, dword [ebp - 0x14], 0x2030
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
mov eax, dword [edx + eax + 0x2028]
push eax
imul ecx, dword [ebp - 0x14], 0x2030
mov edx, dword [ebp - 0x18]
mov eax, dword [edx]
mov ecx, dword [eax + ecx + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x1c], eax
jmp 0x10015094
imul edx, dword [ebp - 0x14], 0x2030
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
add ecx, edx
push ecx
lea edx, [ebp - 0x28]
push edx
imul eax, dword [ebp - 0x14], 0x2030
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
mov eax, dword [edx + eax + 0x201c]
push eax
imul ecx, dword [ebp - 0x14], 0x2030
mov edx, dword [ebp - 0x18]
mov eax, dword [edx]
lea ecx, [eax + ecx + 0x101c]
push ecx
imul edx, dword [ebp - 0x14], 0x2030
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
mov edx, dword [ecx + edx + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x1c], eax
imul eax, dword [ebp - 0x14], 0x2030
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
cmp dword [edx + eax + 0x2028], 0
je 0x100150e5
imul eax, dword [ebp - 0x14], 0x2030
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
mov eax, dword [edx + eax + 0x2028]
mov dword [ebp - 0x3c], eax
push 0
mov ecx, dword [ebp - 0x3c]
push ecx
call fcn.1004ce37
add esp, 8
imul edx, dword [ebp - 0x14], 0x2030
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
mov dword [ecx + edx + 0x2028], 0
cmp dword [ebp - 0x1c], 0
je 0x10015136
imul edx, dword [ebp - 0x14], 0x2030
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
mov eax, dword [ebp - 0x28]
cmp eax, dword [ecx + edx + 0x201c]
jne 0x10015136
imul ecx, dword [ebp - 0x14], 0x2030
mov edx, dword [ebp - 0x18]
mov eax, dword [edx]
mov dword [eax + ecx + 0x2024], 0
imul ecx, dword [ebp - 0x14], 0x2030
mov edx, dword [ebp - 0x18]
mov eax, dword [edx]
mov dword [eax + ecx + 0x2020], 1
jmp 0x10014bb6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x1c], 0
jne 0x1001516a
cmp dword [ebp - 0x20], 0x3e5
jne 0x1001516a
imul ecx, dword [ebp - 0x14], 0x2030
mov edx, dword [ebp - 0x18]
mov eax, dword [edx]
mov dword [eax + ecx + 0x2024], 1
jmp 0x10014bb6
mov ecx, dword [ebp - 0x14]
push ecx
mov ecx, dword [ebp - 0x18]
call fcn.100152d0
jmp 0x10015193
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x20], eax
push str.Invalid_pipe_state._n
push 0x100947d8
call fcn.1000ade0
add esp, 8
jmp 0x10014bb6
mov dword [ebp - 0x14], 0
jmp 0x100151aa
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [eax + 0xc]
jge 0x10015271
imul edx, dword [ebp - 0x14], 0x2030
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
cmp dword [ecx + edx + 0x14], 0
je 0x1001520a
lfence
imul edx, dword [ebp - 0x14], 0x2030
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax]
mov edx, dword [ecx + edx + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
test eax, eax
jne 0x1001520a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10077234
push 0x100947d8
call fcn.1000ade0
add esp, 8
mov ecx, eax
call fcn.10014670
imul eax, dword [ebp - 0x14], 0x2030
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
cmp dword [edx + eax + 0x14], 0
je 0x10015237
lfence
imul eax, dword [ebp - 0x14], 0x2030
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
mov eax, dword [edx + eax + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 4]
mov eax, dword [ebp - 0x14]
cmp dword [edx + eax*4], 0
je 0x1001526c
lfence
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 4]
mov eax, dword [ebp - 0x14]
mov ecx, dword [edx + eax*4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 4]
mov ecx, dword [ebp - 0x14]
mov dword [eax + ecx*4], 0
jmp 0x100151a1
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x18]
mov dword [ecx + 8], 0
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4