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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10055d0b
mov eax, dword fs:[0]
push eax
mov eax, 0x90dc
call fcn.1002fea0
mov eax, dword [0x1006e064]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [0x10099010]
mov dword [ebp - 0x90e8], edi
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1000aaf3
test eax, eax
jne 0x1000a61c
movups xmm0, xmmword [str._pipediscord_ipc_0]
mov eax, dword [0x10065994]
mov esi, dword [edi]
push 0
push 0
mov dword [ebp - 0x24], eax
mov ax, word [0x10065998]
push 3
movups xmmword [ebp - 0x4c], xmm0
push 0
movups xmm0, xmmword [0x1006597c]
mov word [ebp - 0x20], ax
mov eax, 0x30
push 0
mov word [ebp - 0x22], ax
lea eax, [ebp - 0x4c]
movups xmmword [ebp - 0x3c], xmm0
push 0xc0000000
movq xmm0, qword [0x1006598c]
push eax
movq qword [ebp - 0x2c], xmm0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
jne 0x1000a616
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x1000a5d3
mov ax, word [ebp - 0x22]
cmp ax, 0x39
jae 0x1000aaf3
inc ax
mov word [ebp - 0x22], ax
jmp 0x1000a5f5
cmp eax, 0xe7
jne 0x1000aaf3
push 0x2710
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
je 0x1000aaf3
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
je 0x1000a5b2
mov byte [esi], 1
mov eax, dword [edi + 4]
cmp eax, 1
jne 0x1000a848
lea ecx, [ebp - 0x90dc]
call fcn.10007d50
lea eax, [ebp - 0x90dc]
mov dword [ebp - 4], 0
push eax
mov ecx, edi
call fcn.1000ac10
test al, al
je 0x1000a809
push 0x100660d4
lea eax, [ebp - 0x90e0]
push eax
lea ecx, [ebp - 0x90dc]
call fcn.10009510
cmp word [ebp - 0x90ce], 3
je 0x1000a685
push 0x492
push str.C:UsersERRORDesktopLoader6609CoHookDiscordSDK_src_rapidjsondocument.h
push str.IsObject__
call fcn.10037a1a
add esp, 0xc
mov ecx, dword [ebp - 0x90dc]
mov eax, dword [ebp - 0x90e0]
shl ecx, 5
add ecx, dword [ebp - 0x90d4]
cmp eax, ecx
je 0x1000a6e3
mov cx, word [eax + 0x1e]
shr cx, 0xa
test cl, 1
je 0x1000a6e3
lea esi, [eax + 0x10]
movzx eax, word [esi + 0xe]
mov ecx, eax
shr eax, 0xa
test al, 1
jne 0x1000a6d6
push 0x6ed
push str.C:UsersERRORDesktopLoader6609CoHookDiscordSDK_src_rapidjsondocument.h
push str.IsString__
call fcn.10037a1a
movzx ecx, word [esi + 0xe]
add esp, 0xc
test ecx, 0x1000
jne 0x1000a6e5
mov esi, dword [esi + 8]
jmp 0x1000a6e5
xor esi, esi
push 0x10065c7c
lea eax, [ebp - 0x90e0]
push eax
lea ecx, [ebp - 0x90dc]
call fcn.10009510
cmp word [ebp - 0x90ce], 3
je 0x1000a71d
push 0x492
push str.C:UsersERRORDesktopLoader6609CoHookDiscordSDK_src_rapidjsondocument.h
push str.IsObject__
call fcn.10037a1a
add esp, 0xc
mov ecx, dword [ebp - 0x90dc]
mov eax, dword [ebp - 0x90e0]
shl ecx, 5
add ecx, dword [ebp - 0x90d4]
cmp eax, ecx
je 0x1000a77b
mov cx, word [eax + 0x1e]
shr cx, 0xa
test cl, 1
je 0x1000a77b
lea edi, [eax + 0x10]
movzx eax, word [edi + 0xe]
mov ecx, eax
shr eax, 0xa
test al, 1
jne 0x1000a76e
push 0x6ed
push str.C:UsersERRORDesktopLoader6609CoHookDiscordSDK_src_rapidjsondocument.h
push str.IsString__
call fcn.10037a1a
movzx ecx, word [edi + 0xe]
add esp, 0xc
test ecx, 0x1000
jne 0x1000a77d
mov edi, dword [edi + 8]
jmp 0x1000a77d
xor edi, edi
test esi, esi
je 0x1000a809
test edi, edi
je 0x1000a809
mov eax, str.DISPATCH
mov cl, byte [esi]
cmp cl, byte [eax]
jne 0x1000a7b2
test cl, cl
je 0x1000a7ae
mov cl, byte [esi + 1]
cmp cl, byte [eax + 1]
jne 0x1000a7b2
add esi, 2
add eax, 2
test cl, cl
jne 0x1000a792
xor eax, eax
jmp 0x1000a7b7
sbb eax, eax
or eax, 1
test eax, eax
jne 0x1000a809
mov eax, str.READY
mov cl, byte [edi]
cmp cl, byte [eax]
jne 0x1000a7e0
test cl, cl
je 0x1000a7dc
mov cl, byte [edi + 1]
cmp cl, byte [eax + 1]
jne 0x1000a7e0
add edi, 2
add eax, 2
test cl, cl
jne 0x1000a7c0
xor eax, eax
jmp 0x1000a7e5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x1000a809
mov eax, dword [ebp - 0x90e8]
mov dword [eax + 4], 3
mov eax, dword [eax + 8]
test eax, eax
je 0x1000a809
lea ecx, [ebp - 0x90dc]
push ecx
call eax
add esp, 4
lea ecx, [ebp - 0x10a0]
call fcn.100094b0
mov esi, dword [ebp - 0x90c8]
test esi, esi
je 0x1000a830
mov ecx, esi
call fcn.100094b0
push 0x14
push esi
call fcn.1002f0b0
add esp, 8
push 0x808
push dword [ebp - 0x90c0]
call fcn.1002f0b0
add esp, 8
jmp 0x1000aaf3
lea eax, [ebp - 0x860]
mov dword [edi + 0x154], 0
mov dword [ebp - 0x884], eax
lea ecx, [edi + 0x15c]
lea eax, [ebp - 0x854]
mov dword [ebp - 0x86c], 0x800
mov dword [ebp - 0x880], eax
xorps xmm0, xmm0
lea eax, [ecx + 0xfff8]
mov dword [ebp - 0x868], 0x144
mov dword [ebp - 0x85c], eax
lea eax, [ebp - 0x84c]
mov dword [ebp - 0x854], eax
lea eax, [ebp - 0x4c]
movups xmmword [ebp - 0x87c], xmm0
mov byte [ebp - 0x864], 0
mov dword [ebp - 0x860], ecx
mov dword [ebp - 0x858], ecx
mov dword [ebp - 0x850], eax
lea eax, [ebp - 0x884]
mov dword [ebp - 4], 1
push 3
mov ecx, eax
mov dword [ebp - 0x90e8], eax
call fcn.1000df30
push ecx
lea ecx, [ebp - 0x880]
call fcn.1000e3e0
mov dword [eax], 0
mov byte [eax + 4], 0
mov eax, dword [ebp - 0x884]
mov ecx, dword [eax + 8]
cmp ecx, dword [eax + 4]
jae 0x1000a908
mov byte [ecx], 0x7b
inc dword [eax + 8]
push 5
lea ecx, [ebp - 0x884]
call fcn.1000df30
push 1
push 0x100672bc
lea ecx, [ebp - 0x884]
call fcn.1000dff0
push 6
lea ecx, [ebp - 0x884]
call fcn.1000df30
lea edx, [ebp - 0x1c]
mov ecx, 1
call fcn.1000c9e0
lea edx, [ebp - 0x1c]
mov esi, eax
mov eax, edx
mov dword [ebp - 0x90e0], edx
cmp eax, esi
je 0x1000a992
mov ecx, dword [ebp - 0x884]
nop dword [eax + eax]
mov al, byte [edx]
mov byte [ebp - 0x90e1], al
mov eax, dword [ecx + 8]
cmp eax, dword [ecx + 4]
jae 0x1000a987
mov dl, byte [ebp - 0x90e1]
mov byte [eax], dl
inc dword [ecx + 8]
mov ecx, dword [ebp - 0x884]
mov edx, dword [ebp - 0x90e0]
inc edx
mov dword [ebp - 0x90e0], edx
cmp edx, esi
jne 0x1000a960
push 5
lea ecx, [ebp - 0x884]
call fcn.1000df30
push 9
push str.client_id
lea ecx, [ebp - 0x884]
call fcn.1000dff0
lea edx, [edi + 0x10]
mov esi, edx
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x1000a9c0
sub esi, ecx
test edx, edx
jne 0x1000a9e4
push 0xcb
push str.C:UsersERRORDesktopLoader6609CoHookDiscordSDK_src_rapidjsonwriter.h
push str.str___0
call fcn.10037a1a
add esp, 0xc
push 5
lea ecx, [ebp - 0x884]
call fcn.1000df30
push esi
lea eax, [edi + 0x10]
push eax
lea ecx, [ebp - 0x884]
call fcn.1000dff0
lea ecx, [ebp - 0x90e8]
call fcn.1000d320
mov esi, dword [ebp - 0x858]
sub esi, dword [ebp - 0x860]
mov dword [ebp - 4], 0xffffffff
push 0x808
push dword [ebp - 0x87c]
call fcn.1002f0b0
add esp, 8
mov dword [edi + 0x158], esi
add esi, 8
je 0x1000aaec
mov eax, dword [edi]
test eax, eax
jne 0x1000aa5d
push 0x4f
push str.C:UsersERRORDesktopLoader6609CoHookDiscordSDK_srcconnection_win.cpp
push str.self
call fcn.10037a1a
add esp, 0xc
jmp 0x1000aaae
mov eax, dword [eax + 4]
cmp eax, 0xffffffff
je 0x1000aaae
lea ecx, [edi + 0x154]
test ecx, ecx
jne 0x1000aa85
push 0x56
push str.C:UsersERRORDesktopLoader6609CoHookDiscordSDK_srcconnection_win.cpp
push 0x10065a44
call fcn.10037a1a
add esp, 0xc
jmp 0x1000aaae
push 0
lea edx, [ebp - 0x90e0]
mov dword [ebp - 0x90e0], 0
push edx
push esi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
jne 0x1000aaae
cmp dword [ebp - 0x90e0], esi
je 0x1000aaec
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x1000aace
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1000aac2
cmp eax, 1
jne 0x1000aace
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
jmp 0x1000aaf3
mov dword [edi + 4], 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1002eba3
mov esp, ebp
pop ebp
ret