Function at 0x1003711a
Capabilities:
Connect pipe
Create pipe
Read file on windows
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
mov eax, dword [0x1010f16c]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, ecx
movzx eax, byte [esi + 0xe]
dec eax
cmp eax, 4
ja case.default.0x10037113
jmp dword [eax*4 + 0x10037478]
mov eax, dword [esi + 4]
cmp byte [eax + 0x10], 0
je 0x10037212
push 1
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], 0
xorps xmm0, xmm0
push eax
movq qword [esp + 0x14], xmm0
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x100371fd
push 0
push 0
push 1
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x100371fd
lea eax, [esp + 0x18]
mov dword [esp + 0xc], 0xc
mov dword [esp + 0x10], eax
lea eax, [esp + 0xc]
push eax
mov eax, dword [esi + 4]
push 0
push 0x2000
push 0x2000
push 0xff
push 8
push 0x40000003
mov dword [esp + 0x30], 1
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
mov dword [esi + 8], eax
cmp eax, 0xffffffff
je 0x100371fd
lea eax, [esi + 0x3c]
mov dword [eax], 0
push eax
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne case.0x10037113.2
call ebx
cmp eax, 0x3e5
je 0x10037423
xor ecx, ecx
cmp eax, 0x217
sete cl
lea ecx, [ecx*2 - 1]
test ecx, ecx
jns case.0x10037113.2
mov eax, dword [esi + 4]
cmp byte [eax + 0x11], 0
jne 0x10037446
push 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0
push 0x40000000
push 3
push 0
push 0
push 0xc0000000
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 8], eax
cmp eax, 0xffffffff
je 0x10037439
mov eax, dword [esi + 4]
mov byte [esi + 0xd], 1
push esi
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax]
mov ecx, esi
mov dword [esi], eax
call fcn.10037070
jmp 0x1003731e
mov eax, dword [esi + 0x40]
test eax, eax
je 0x100373a2
add dword [esi + 0x24], eax
cmp dword [esi + 0x24], 4
jne 0x10037325
mov eax, dword [esi + 0x10]
test eax, eax
je 0x100373a2
cmp eax, 0x1000000
jae 0x100373a2
push dword [esi + 0x1c]
call fcn.100abd36
add esp, 4
push dword [esi + 0x10]
call fcn.100abd2b
add esp, 4
mov dword [esi + 0x1c], eax
test eax, eax
je 0x100373a2
mov dword [esi + 0x24], 0
lea eax, [esi + 0x3c]
mov dword [eax], 0
push eax
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0x24]
push 0
push eax
mov eax, dword [esi + 0x1c]
add eax, dword [esi + 0x24]
push eax
push dword [esi + 8]
call edi
test eax, eax
je 0x100373fe
mov eax, dword [esi + 0x40]
test eax, eax
je 0x100373a2
add dword [esi + 0x24], eax
mov ebx, dword [esi + 0x10]
cmp dword [esi + 0x24], ebx
jne 0x100372ab
mov ecx, dword [esi]
mov edx, dword [esi + 0x1c]
mov eax, dword [ecx]
mov edi, dword [eax]
lea eax, [ebx - 1]
push eax
lea eax, [edx + 1]
push eax
movzx eax, byte [edx]
push eax
call edi
test al, al
je 0x10037389
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [esi + 0x24], 0
lea eax, [esi + 0x3c]
mov dword [eax], 0
push eax
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov eax, 4
mov ecx, dword [esi + 0x24]
sub eax, ecx
push 0
push eax
lea eax, [ecx + 0x10]
add eax, esi
push eax
push dword [esi + 8]
call edi
test eax, eax
jne case.0x10037113.3
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x3e5
jne case.0x10037113.5
mov byte [esi + 0xe], 3
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.100908e7
mov esp, ebp
pop ebp
ret
push dword [esi + 0x4c]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
cmp dword [esi + 0x14], 0
jne 0x1003745f
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, esi
call fcn.10036fd0
mov eax, dword [esi + 4]
cmp byte [eax + 0x11], 0
jne case.default.0x10037113
mov ecx, dword [esi]
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esi + 4]
cmp byte [eax + 0x10], 0
je case.default.0x10037113
xor esi, esi
xor edx, edx
add eax, 0x36
nop
cmp byte [eax - 1], 0
jne 0x100373e8
mov cl, byte [eax]
cmp cl, 2
je case.default.0x10037113
test cl, cl
jne 0x100373e8
test esi, esi
jne 0x100373e8
lea esi, [eax - 0xe]
inc edx
add eax, 0x54
cmp edx, 2
jb 0x100373d0
test esi, esi
je case.default.0x10037113
mov byte [esi + 0xe], 1
jmp 0x10037105
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x3e5
jne case.0x10037113.5
mov byte [esi + 0xe], 4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.100908e7
mov esp, ebp
pop ebp
ret
mov byte [esi + 0xe], 2
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.100908e7
mov esp, ebp
pop ebp
ret
push str.Unable_to_connect_to_the_TunSafe_Service._Please_make_sure_its_running.
call fcn.100561a0
add esp, 4
mov ecx, esi
call fcn.10036fd0
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.100908e7
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x2c]
pop edi
mov byte [esi + 0xe], 5
pop esi
pop ebx
xor ecx, esp
call fcn.100908e7
mov esp, ebp
pop ebp
ret