Function at 0x402b00
Capabilities:
Connect pipe
Create pipe

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x8c8
call fcn.004018e0
mov dword [ebp - 0x8a0], 0
mov dword [esp + 4], str..pipediscord_ipc_0
mov dword [esp], str.Pipe_Server:_Main_thread_awaiting_client_connection_on__s_n
call sub.msvcrt.dll_printf
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x800
mov dword [esp + 0x10], 0x800
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 3
mov dword [esp], str..pipediscord_ipc_0
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
mov dword [0x403004], eax
sub esp, 0x20
cmp eax, 0xffffffff
je 0x402e6b
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
sub esp, 8
mov ebx, eax
test eax, eax
jne 0x402bd4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
je 0x402bd4
mov eax, dword [0x403004]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
lea esp, [ebp - 0x10]
mov eax, ebx
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp], str.Client_connected
xor edi, edi
lea esi, [ebp - 0x818]
call sub.msvcrt.dll_puts
mov dword [esp], str.Creating_socket
call sub.msvcrt.dll_puts
mov dword [ebp - 0x810], edi
mov dword [ebp - 0x818], 1
mov dword [ebp - 0x814], 1
mov dword [esp + 4], esi
mov dword [esp], 1
call fcn.00401530
mov dword [0x506044], eax
test eax, eax
js 0x402e5d
mov word [ebp - 0x886], 1
mov dword [esp], str.XDG_RUNTIME_DIR
call fcn.00401630
mov edx, eax
test eax, eax
je 0x402ec0
mov dword [ebp - 0x898], str._s_discord_ipc__d
lea ecx, [ebp - 0x898]
lea edi, [ebp - 0x884]
mov dword [ebp - 0x894], str._s_app_com.discordapp.Discord_discord_ipc__d
mov dword [ebp - 0x890], str._s_snap.discord_canary_discord_ipc__d
mov dword [ebp - 0x88c], str._s_snap.discord_discord_ipc__d
mov dword [ebp - 0x8b0], edx
mov eax, dword [ecx]
mov dword [ebp - 0x8b4], ecx
xor ebx, ebx
mov dword [ebp - 0x8ac], eax
lea esi, [esi]
mov dword [esp + 0x10], ebx
mov eax, dword [ebp - 0x8b0]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x8ac]
mov dword [esp + 4], 0x6c
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.004014f0
mov dword [esp + 4], edi
mov dword [esp], str.Attempting_to_connect_to__s_n
call sub.msvcrt.dll_printf
mov eax, dword [0x506044]
mov dword [ebp - 0x810], 0x6e
mov dword [ebp - 0x818], eax
lea eax, [ebp - 0x886]
mov dword [ebp - 0x814], eax
mov dword [esp + 4], esi
mov dword [esp], 3
call fcn.00401530
test eax, eax
jns 0x402d45
mov dword [esp], str.Failed_to_connect
add ebx, 1
call sub.msvcrt.dll_puts
cmp ebx, 0xa
jne 0x402c98
mov ecx, dword [ebp - 0x8b4]
lea eax, [ebp - 0x888]
add ecx, 4
cmp ecx, eax
jne 0x402c84
mov dword [esp], str.Could_not_connect_to_discord_client
call sub.msvcrt.dll_puts
jmp 0x402e53
mov dword [esp], str.Connected_successfully
call sub.msvcrt.dll_puts
xor edx, edx
xor ecx, ecx
lea eax, [ebp - 0x8a0]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0x401710
mov dword [esp + 4], ecx
mov dword [esp], ecx
call dword [sym.imp.KERNEL32.dll_CreateThread]
sub esp, 0x18
test eax, eax
je 0x402f0c
lea edi, [ebp - 0x89c]
xor eax, eax
mov dword [ebp - 0x89c], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x800
mov dword [esp + 4], esi
mov eax, dword [0x403004]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
test eax, eax
je 0x402f27
mov eax, dword [ebp - 0x89c]
mov dword [esp], str._d_bytes_w__l_n
mov dword [esp + 4], eax
call sub.msvcrt.dll_printf
mov dword [esp], str.WDB_DEBUG
call fcn.00401630
test eax, eax
je 0x402e02
mov dword [esp + 4], 0x4042c2
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
mov ebx, eax
test eax, eax
je 0x402e89
mov eax, dword [ebp - 0x89c]
xor ebx, ebx
xor edx, edx
test eax, eax
jne 0x402e2a
jmp 0x402d8d
add ebx, eax
mov eax, dword [ebp - 0x89c]
mov edx, ebx
cmp ebx, eax
jae 0x402d8d
sub eax, edx
add edx, esi
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov eax, dword [0x506044]
mov dword [esp], eax
call fcn.00401570
test eax, eax
jns 0x402e18
mov dword [esp], str.Failed_to_write_to_socket
call sub.msvcrt.dll_puts
mov ebx, 1
jmp 0x402bc6
mov dword [esp], str.Failed_to_create_socket
call sub.msvcrt.dll_puts
jmp 0x402e53
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.CreateNamedPipe_failed__GLE_d._n
or ebx, 0xffffffff
mov dword [esp + 4], eax
call sub.msvcrt.dll_printf
jmp 0x402bc6
cmp dword [ebp - 0x89c], 0
je 0x402eaf
lea esi, [esi]
movsx eax, byte [esi + ebx]
add ebx, 1
mov dword [esp], eax
call sub.msvcrt.dll_putchar
cmp ebx, dword [ebp - 0x89c]
jb 0x402e98
mov dword [esp], 0xa
call sub.msvcrt.dll_putchar
jmp 0x402e02
mov dword [esp], str.TMPDIR
call fcn.00401630
mov edx, eax
test eax, eax
jne 0x402c4a
mov dword [esp], 0x404171
call fcn.00401630
mov edx, eax
test eax, eax
jne 0x402c4a
mov dword [esp], str.TEMP
call fcn.00401630
mov edx, eax
test eax, eax
jne 0x402c4a
mov edx, str._tmp
jmp 0x402c4a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.CreateThread_failed__GLE_d._n
mov dword [esp + 4], eax
call sub.msvcrt.dll_printf
jmp 0x402e53
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x402f45
mov dword [esp], str.Failed_to_read_from_pipe
call sub.msvcrt.dll_puts
jmp 0x402e53
mov dword [esp], str.winread_EOF
call sub.msvcrt.dll_puts
jmp 0x402bc6