Function at 0x1009cba0
Capabilities:
Check if file exists
Resolve function by parsing pe exports
Write file on windows

Disassembly:
mov eax, 0x90cc
call fcn.10183dd0
push ebx
push ebp
push esi
push edi
mov edi, dword [0x102730ac]
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1009cfbc
test eax, eax
jne 0x1009cca3
movups xmm0, xmmword [str._pipediscord_ipc_0]
mov eax, dword [0x10223380]
mov esi, dword [edi]
push 0
push 0
mov dword [esp + 0x48], eax
mov ax, word [0x10223384]
push 3
movups xmmword [esp + 0x24], xmm0
push 0
movups xmm0, xmmword [0x10223368]
mov word [esp + 0x54], ax
mov eax, 0x30
push 0
mov word [esp + 0x56], ax
lea eax, [esp + 0x2c]
movups xmmword [esp + 0x3c], xmm0
push 0xc0000000
movq xmm0, qword [0x10223378]
push eax
movq qword [esp + 0x54], xmm0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
jne 0x1009cca0
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
nop dword [eax]
call ebx
cmp eax, 2
jne 0x1009cc5f
mov ax, word [esp + 0x42]
cmp ax, 0x39
jae 0x1009cfbc
inc ax
mov word [esp + 0x42], ax
jmp 0x1009cc7e
cmp eax, 0xe7
jne 0x1009cfbc
push 0x2710
lea eax, [esp + 0x1c]
push eax
call ebp
test eax, eax
je 0x1009cfbc
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 0x1009cc40
mov byte [esi], 1
cmp dword [edi + 4], 1
jne 0x1009ce3c
lea ecx, [esp + 0x880]
call fcn.1009b250
lea eax, [esp + 0x880]
mov ecx, edi
push eax
call fcn.1009d090
test al, al
je 0x1009cdf4
push 0x10223554
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x888]
call fcn.1009c670
mov ecx, dword [esp + 0x880]
mov ebx, 0x1000
mov eax, dword [esp + 0x14]
shl ecx, 5
add ecx, dword [esp + 0x888]
cmp eax, ecx
je 0x1009cd1f
mov cx, word [eax + 0x1e]
shr cx, 0xa
test cl, 1
je 0x1009cd1f
test word [eax + 0x1e], bx
lea esi, [eax + 0x10]
jne 0x1009cd21
mov esi, dword [esi + 8]
jmp 0x1009cd21
xor esi, esi
push 0x102234bc
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x888]
call fcn.1009c670
mov ecx, dword [esp + 0x880]
mov eax, dword [esp + 0x14]
shl ecx, 5
add ecx, dword [esp + 0x888]
cmp eax, ecx
je 0x1009cd6b
mov cx, word [eax + 0x1e]
shr cx, 0xa
test cl, 1
je 0x1009cd6b
add eax, 0x10
test word [eax + 0xe], bx
jne 0x1009cd6d
mov eax, dword [eax + 8]
jmp 0x1009cd6d
xor eax, eax
test esi, esi
je 0x1009cdf4
test eax, eax
je 0x1009cdf4
mov ecx, str.DISPATCH
nop
mov dl, byte [esi]
cmp dl, byte [ecx]
jne 0x1009cda0
test dl, dl
je 0x1009cd9c
mov dl, byte [esi + 1]
cmp dl, byte [ecx + 1]
jne 0x1009cda0
add esi, 2
add ecx, 2
test dl, dl
jne 0x1009cd80
xor ecx, ecx
jmp 0x1009cda5
sbb ecx, ecx
or ecx, 1
test ecx, ecx
jne 0x1009cdf4
mov ecx, str.READY
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x1009cdd0
test dl, dl
je 0x1009cdcc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x1009cdd0
add eax, 2
add ecx, 2
test dl, dl
jne 0x1009cdb0
xor eax, eax
jmp 0x1009cdd5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x1009cdf4
mov eax, dword [edi + 8]
mov dword [edi + 4], 3
test eax, eax
je 0x1009cdf4
lea ecx, [esp + 0x880]
push ecx
call eax
add esp, 4
lea ecx, [esp + 0x88bc]
call fcn.1009c620
mov esi, dword [esp + 0x894]
test esi, esi
je 0x1009ce1d
mov ecx, esi
call fcn.1009c620
push 0x14
push esi
call fcn.10183618
add esp, 8
push 0x808
push dword [esp + 0x8a0]
call fcn.10183618
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x90cc
ret
lea eax, [esp + 0x6c]
mov dword [edi + 0x154], 0
mov dword [esp + 0x48], eax
lea ecx, [edi + 0x15c]
lea eax, [esp + 0x78]
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x4c], eax
lea ebx, [edi + 0x154]
lea eax, [ecx + 0xfff8]
mov dword [esp + 0x74], ecx
mov dword [esp + 0x70], eax
lea ecx, [esp + 0x48]
lea eax, [esp + 0x80]
mov dword [esp + 0x60], 0x800
mov dword [esp + 0x78], eax
lea esi, [edi + 0x10]
xorps xmm0, xmm0
mov dword [esp + 0x64], 0x144
lea eax, [esp + 0x880]
mov byte [esp + 0x68], 0
movups xmmword [esp + 0x50], xmm0
mov dword [esp + 0x7c], eax
call fcn.1009fce0
push ecx
push 1
push 0x10224114
lea ecx, [esp + 0x54]
call fcn.1009fee0
push 1
lea ecx, [esp + 0x4c]
call fcn.1009fe30
push ecx
push 9
push str.client_id
lea ecx, [esp + 0x54]
call fcn.1009fee0
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1009cee5
sub ecx, edx
push ecx
push ecx
push esi
lea ecx, [esp + 0x54]
call fcn.1009fee0
mov eax, dword [esp + 0x48]
sub dword [esp + 0x58], 8
mov ecx, dword [eax + 8]
cmp ecx, dword [eax + 4]
jae 0x1009cf11
mov byte [ecx], 0x7d
inc dword [eax + 8]
mov esi, dword [esp + 0x74]
sub esi, dword [esp + 0x6c]
push 0x808
push dword [esp + 0x54]
call fcn.10183618
add esp, 8
mov dword [edi + 0x158], esi
add esi, 8
je 0x1009cfb5
mov eax, dword [edi]
test eax, eax
je 0x1009cf6e
mov eax, dword [eax + 4]
cmp eax, 0xffffffff
je 0x1009cf6e
test ebx, ebx
je 0x1009cf6e
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 0x1009cf6e
cmp dword [esp + 0x14], esi
je 0x1009cfb5
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x1009cf8e
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1009cf82
cmp eax, 1
jne 0x1009cf8e
lea eax, [edi + 0x54]
push eax
push dword [edi + 0x50]
call ecx
add esp, 8
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, 0x90cc
ret
mov dword [edi + 4], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x90cc
ret