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

Disassembly:
mov eax, 0x90cc
call fcn.10110500
push ebx
push ebp
push esi
push edi
mov edi, dword [0x101f73b4]
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1004883c
test eax, eax
jne 0x10048523
movups xmm0, xmmword [str._pipediscord_ipc_0]
mov eax, dword [0x101ae518]
mov esi, dword [edi]
push 0
push 0
mov dword [esp + 0x48], eax
mov ax, word [0x101ae51c]
push 3
movups xmmword [esp + 0x24], xmm0
push 0
movups xmm0, xmmword [0x101ae500]
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 [0x101ae510]
push eax
movq qword [esp + 0x54], xmm0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
jne 0x10048520
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 0x100484df
mov ax, word [esp + 0x42]
cmp ax, 0x39
jae 0x1004883c
inc ax
mov word [esp + 0x42], ax
jmp 0x100484fe
cmp eax, 0xe7
jne 0x1004883c
push 0x2710
lea eax, [esp + 0x1c]
push eax
call ebp
test eax, eax
je 0x1004883c
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 0x100484c0
mov byte [esi], 1
cmp dword [edi + 4], 1
jne 0x100486bc
lea ecx, [esp + 0x880]
call fcn.10046b00
lea eax, [esp + 0x880]
mov ecx, edi
push eax
call fcn.10048910
test al, al
je 0x10048674
push 0x101ae728
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x888]
call fcn.10047f80
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 0x1004859f
mov cx, word [eax + 0x1e]
shr cx, 0xa
test cl, 1
je 0x1004859f
test word [eax + 0x1e], bx
lea esi, [eax + 0x10]
jne 0x100485a1
mov esi, dword [esi + 8]
jmp 0x100485a1
xor esi, esi
push 0x101ae654
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x888]
call fcn.10047f80
mov ecx, dword [esp + 0x880]
mov eax, dword [esp + 0x14]
shl ecx, 5
add ecx, dword [esp + 0x888]
cmp eax, ecx
je 0x100485eb
mov cx, word [eax + 0x1e]
shr cx, 0xa
test cl, 1
je 0x100485eb
add eax, 0x10
test word [eax + 0xe], bx
jne 0x100485ed
mov eax, dword [eax + 8]
jmp 0x100485ed
xor eax, eax
test esi, esi
je 0x10048674
test eax, eax
je 0x10048674
mov ecx, str.DISPATCH
nop
mov dl, byte [esi]
cmp dl, byte [ecx]
jne 0x10048620
test dl, dl
je 0x1004861c
mov dl, byte [esi + 1]
cmp dl, byte [ecx + 1]
jne 0x10048620
add esi, 2
add ecx, 2
test dl, dl
jne 0x10048600
xor ecx, ecx
jmp 0x10048625
sbb ecx, ecx
or ecx, 1
test ecx, ecx
jne 0x10048674
mov ecx, str.READY
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10048650
test dl, dl
je 0x1004864c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10048650
add eax, 2
add ecx, 2
test dl, dl
jne 0x10048630
xor eax, eax
jmp 0x10048655
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10048674
mov eax, dword [edi + 8]
mov dword [edi + 4], 3
test eax, eax
je 0x10048674
lea ecx, [esp + 0x880]
push ecx
call eax
add esp, 4
lea ecx, [esp + 0x88bc]
call fcn.10047f30
mov esi, dword [esp + 0x894]
test esi, esi
je 0x1004869d
mov ecx, esi
call fcn.10047f30
push 0x14
push esi
call fcn.1010fd52
add esp, 8
push 0x808
push dword [esp + 0x8a0]
call fcn.1010fd52
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.1004b520
push ecx
push 1
push 0x101af2bc
lea ecx, [esp + 0x54]
call fcn.1004b720
push 1
lea ecx, [esp + 0x4c]
call fcn.1004b670
push ecx
push 9
push str.client_id
lea ecx, [esp + 0x54]
call fcn.1004b720
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10048765
sub ecx, edx
push ecx
push ecx
push esi
lea ecx, [esp + 0x54]
call fcn.1004b720
mov eax, dword [esp + 0x48]
sub dword [esp + 0x58], 8
mov ecx, dword [eax + 8]
cmp ecx, dword [eax + 4]
jae 0x10048791
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.1010fd52
add esp, 8
mov dword [edi + 0x158], esi
add esi, 8
je 0x10048835
mov eax, dword [edi]
test eax, eax
je 0x100487ee
mov eax, dword [eax + 4]
cmp eax, 0xffffffff
je 0x100487ee
test ebx, ebx
je 0x100487ee
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 0x100487ee
cmp dword [esp + 0x14], esi
je 0x10048835
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x1004880e
mov eax, dword [edi + 4]
cmp eax, 3
je 0x10048802
cmp eax, 1
jne 0x1004880e
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