Function at 0x1002c720
Capabilities:
Check if file exists
Write file on windows

Disassembly:
mov eax, 0x8894
call fcn.1017e400
push ebx
push ebp
push esi
push edi
mov edi, dword [0x1064072c]
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1002ca0a
test eax, eax
jne 0x1002c818
mov eax, dword [0x101b6ef4]
vmovdqu ymm0, ymmword [str._pipediscord_ipc_0]
mov esi, dword [edi]
push 0
push 0
mov dword [esp + 0x48], eax
mov ax, word [0x101b6ef8]
push 3
push 0
mov word [esp + 0x54], ax
mov eax, 0x30
push 0
vmovdqu ymmword [esp + 0x2c], ymm0
vmovq xmm0, qword [0x101b6eec]
mov word [esp + 0x56], ax
lea eax, [esp + 0x2c]
push 0xc0000000
vmovq qword [esp + 0x50], xmm0
push eax
vzeroupper
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
jne 0x1002c815
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
call ebx
cmp eax, 2
jne 0x1002c7d4
mov ax, word [esp + 0x42]
cmp ax, 0x39
jae 0x1002ca0a
inc ax
mov word [esp + 0x42], ax
jmp 0x1002c7f3
cmp eax, 0xe7
jne 0x1002ca0a
push 0x2710
lea eax, [esp + 0x1c]
push eax
call ebp
test eax, eax
je 0x1002ca0a
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
je 0x1002c7b5
mov byte [esi], 1
cmp dword [edi + 4], 1
jne 0x1002c954
lea ecx, [esp + 0x48]
call fcn.1002aa40
lea eax, [esp + 0x48]
mov ecx, edi
push eax
call fcn.1002cae0
test al, al
je 0x1002c940
push 0x101b6f9c
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x50]
call fcn.1002bf40
mov eax, dword [esp + 0x48]
mov ebx, 0x1000
mov ecx, dword [esp + 0x14]
shl eax, 5
add eax, dword [esp + 0x50]
cmp ecx, eax
je 0x1002c884
mov ax, word [ecx + 0x1e]
shr ax, 0xa
test al, 1
je 0x1002c884
test word [ecx + 0x1e], bx
lea esi, [ecx + 0x10]
jne 0x1002c886
mov esi, dword [esi + 8]
jmp 0x1002c886
xor esi, esi
push 0x101b6efc
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x50]
call fcn.1002bf40
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x14]
shl eax, 5
add eax, dword [esp + 0x50]
cmp ecx, eax
je 0x1002c8c6
mov ax, word [ecx + 0x1e]
shr ax, 0xa
test al, 1
je 0x1002c8c6
add ecx, 0x10
test word [ecx + 0xe], bx
jne 0x1002c8c8
mov ecx, dword [ecx + 8]
jmp 0x1002c8c8
xor ecx, ecx
test esi, esi
je 0x1002c940
test ecx, ecx
je 0x1002c940
mov eax, str.DISPATCH
mov dl, byte [esi]
cmp dl, byte [eax]
jne 0x1002c8f5
test dl, dl
je 0x1002c8f1
mov dl, byte [esi + 1]
cmp dl, byte [eax + 1]
jne 0x1002c8f5
add esi, 2
add eax, 2
test dl, dl
jne 0x1002c8d5
xor eax, eax
jmp 0x1002c8fa
sbb eax, eax
or eax, 1
test eax, eax
jne 0x1002c940
mov eax, str.READY
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x1002c923
test dl, dl
je 0x1002c91f
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x1002c923
add ecx, 2
add eax, 2
test dl, dl
jne 0x1002c903
xor eax, eax
jmp 0x1002c928
sbb eax, eax
or eax, 1
test eax, eax
jne 0x1002c940
mov eax, dword [edi + 8]
mov dword [edi + 4], 3
test eax, eax
je 0x1002c940
lea ecx, [esp + 0x48]
call eax
lea ecx, [esp + 0x48]
call fcn.1002b6e0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8894
ret
lea eax, [edi + 0x10]
mov dword [edi + 0x154], 0
push eax
lea ebx, [edi + 0x154]
mov edx, 0xfff8
push 1
lea ecx, [edi + 0x15c]
call fcn.1002f9f0
mov dword [edi + 0x158], eax
lea esi, [eax + 8]
test esi, esi
je 0x1002ca03
mov eax, dword [edi]
test eax, eax
je 0x1002c9c0
mov eax, dword [eax + 4]
cmp eax, 0xffffffff
je 0x1002c9c0
test ebx, ebx
je 0x1002c9c0
push 0
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0
push ecx
push esi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
jne 0x1002c9c0
cmp dword [esp + 0x14], esi
je 0x1002ca03
mov esi, dword [edi + 0xc]
test esi, esi
je 0x1002c9dc
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1002c9d4
cmp eax, 1
jne 0x1002c9dc
mov ecx, dword [edi + 0x50]
lea edx, [edi + 0x54]
call esi
mov esi, dword [edi]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0xffffffff
mov byte [esi], 0
mov dword [edi + 4], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8894
ret
mov dword [edi + 4], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8894
ret