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

Disassembly:
mov eax, 0x90cc
call fcn.1018be20
push ebx
push ebp
push esi
push edi
mov edi, dword [0x102811c0]
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1009d69c
test eax, eax
jne 0x1009d383
movups xmm0, xmmword [str._pipediscord_ipc_0]
mov eax, dword [0x10234354]
mov esi, dword [edi]
push 0
push 0
mov dword [esp + 0x48], eax
mov ax, word [0x10234358]
push 3
movups xmmword [esp + 0x24], xmm0
push 0
movups xmm0, xmmword [0x1023433c]
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 [0x1023434c]
push eax
movq qword [esp + 0x54], xmm0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
jne 0x1009d380
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 0x1009d33f
mov ax, word [esp + 0x42]
cmp ax, 0x39
jae 0x1009d69c
inc ax
mov word [esp + 0x42], ax
jmp 0x1009d35e
cmp eax, 0xe7
jne 0x1009d69c
push 0x2710
lea eax, [esp + 0x1c]
push eax
call ebp
test eax, eax
je 0x1009d69c
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 0x1009d320
mov byte [esi], 1
cmp dword [edi + 4], 1
jne 0x1009d51c
lea ecx, [esp + 0x880]
call fcn.1009b960
lea eax, [esp + 0x880]
mov ecx, edi
push eax
call fcn.1009d770
test al, al
je 0x1009d4d4
push 0x1023456c
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x888]
call fcn.1009cde0
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 0x1009d3ff
mov cx, word [eax + 0x1e]
shr cx, 0xa
test cl, 1
je 0x1009d3ff
test word [eax + 0x1e], bx
lea esi, [eax + 0x10]
jne 0x1009d401
mov esi, dword [esi + 8]
jmp 0x1009d401
xor esi, esi
push 0x102344a0
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x888]
call fcn.1009cde0
mov ecx, dword [esp + 0x880]
mov eax, dword [esp + 0x14]
shl ecx, 5
add ecx, dword [esp + 0x888]
cmp eax, ecx
je 0x1009d44b
mov cx, word [eax + 0x1e]
shr cx, 0xa
test cl, 1
je 0x1009d44b
add eax, 0x10
test word [eax + 0xe], bx
jne 0x1009d44d
mov eax, dword [eax + 8]
jmp 0x1009d44d
xor eax, eax
test esi, esi
je 0x1009d4d4
test eax, eax
je 0x1009d4d4
mov ecx, str.DISPATCH
nop
mov dl, byte [esi]
cmp dl, byte [ecx]
jne 0x1009d480
test dl, dl
je 0x1009d47c
mov dl, byte [esi + 1]
cmp dl, byte [ecx + 1]
jne 0x1009d480
add esi, 2
add ecx, 2
test dl, dl
jne 0x1009d460
xor ecx, ecx
jmp 0x1009d485
sbb ecx, ecx
or ecx, 1
test ecx, ecx
jne 0x1009d4d4
mov ecx, str.READY
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x1009d4b0
test dl, dl
je 0x1009d4ac
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x1009d4b0
add eax, 2
add ecx, 2
test dl, dl
jne 0x1009d490
xor eax, eax
jmp 0x1009d4b5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x1009d4d4
mov eax, dword [edi + 8]
mov dword [edi + 4], 3
test eax, eax
je 0x1009d4d4
lea ecx, [esp + 0x880]
push ecx
call eax
add esp, 4
lea ecx, [esp + 0x88bc]
call fcn.1009cd90
mov esi, dword [esp + 0x894]
test esi, esi
je 0x1009d4fd
mov ecx, esi
call fcn.1009cd90
push 0x14
push esi
call fcn.1018b662
add esp, 8
push 0x808
push dword [esp + 0x8a0]
call fcn.1018b662
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.100a0380
push ecx
push 1
push 0x10235108
lea ecx, [esp + 0x54]
call fcn.100a0580
push 1
lea ecx, [esp + 0x4c]
call fcn.100a04d0
push ecx
push 9
push str.client_id
lea ecx, [esp + 0x54]
call fcn.100a0580
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1009d5c5
sub ecx, edx
push ecx
push ecx
push esi
lea ecx, [esp + 0x54]
call fcn.100a0580
mov eax, dword [esp + 0x48]
sub dword [esp + 0x58], 8
mov ecx, dword [eax + 8]
cmp ecx, dword [eax + 4]
jae 0x1009d5f1
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.1018b662
add esp, 8
mov dword [edi + 0x158], esi
add esi, 8
je 0x1009d695
mov eax, dword [edi]
test eax, eax
je 0x1009d64e
mov eax, dword [eax + 4]
cmp eax, 0xffffffff
je 0x1009d64e
test ebx, ebx
je 0x1009d64e
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 0x1009d64e
cmp dword [esp + 0x14], esi
je 0x1009d695
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x1009d66e
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1009d662
cmp eax, 1
jne 0x1009d66e
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