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

Disassembly:
mov eax, 0x90cc
call fcn.1010ed10
push ebx
push ebp
push esi
push edi
mov edi, dword [0x101f53c4]
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1004852c
test eax, eax
jne 0x10048213
movups xmm0, xmmword [str._pipediscord_ipc_0]
mov eax, dword [0x101ac50c]
mov esi, dword [edi]
push 0
push 0
mov dword [esp + 0x48], eax
mov ax, word [0x101ac510]
push 3
movups xmmword [esp + 0x24], xmm0
push 0
movups xmm0, xmmword [0x101ac4f4]
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 [0x101ac504]
push eax
movq qword [esp + 0x54], xmm0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
jne 0x10048210
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 0x100481cf
mov ax, word [esp + 0x42]
cmp ax, 0x39
jae 0x1004852c
inc ax
mov word [esp + 0x42], ax
jmp 0x100481ee
cmp eax, 0xe7
jne 0x1004852c
push 0x2710
lea eax, [esp + 0x1c]
push eax
call ebp
test eax, eax
je 0x1004852c
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 0x100481b0
mov byte [esi], 1
cmp dword [edi + 4], 1
jne 0x100483ac
lea ecx, [esp + 0x880]
call fcn.100467f0
lea eax, [esp + 0x880]
mov ecx, edi
push eax
call fcn.10048600
test al, al
je 0x10048364
push 0x101ac71c
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x888]
call fcn.10047c70
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 0x1004828f
mov cx, word [eax + 0x1e]
shr cx, 0xa
test cl, 1
je 0x1004828f
test word [eax + 0x1e], bx
lea esi, [eax + 0x10]
jne 0x10048291
mov esi, dword [esi + 8]
jmp 0x10048291
xor esi, esi
push 0x101ac650
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x888]
call fcn.10047c70
mov ecx, dword [esp + 0x880]
mov eax, dword [esp + 0x14]
shl ecx, 5
add ecx, dword [esp + 0x888]
cmp eax, ecx
je 0x100482db
mov cx, word [eax + 0x1e]
shr cx, 0xa
test cl, 1
je 0x100482db
add eax, 0x10
test word [eax + 0xe], bx
jne 0x100482dd
mov eax, dword [eax + 8]
jmp 0x100482dd
xor eax, eax
test esi, esi
je 0x10048364
test eax, eax
je 0x10048364
mov ecx, str.DISPATCH
nop
mov dl, byte [esi]
cmp dl, byte [ecx]
jne 0x10048310
test dl, dl
je 0x1004830c
mov dl, byte [esi + 1]
cmp dl, byte [ecx + 1]
jne 0x10048310
add esi, 2
add ecx, 2
test dl, dl
jne 0x100482f0
xor ecx, ecx
jmp 0x10048315
sbb ecx, ecx
or ecx, 1
test ecx, ecx
jne 0x10048364
mov ecx, str.READY
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10048340
test dl, dl
je 0x1004833c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10048340
add eax, 2
add ecx, 2
test dl, dl
jne 0x10048320
xor eax, eax
jmp 0x10048345
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10048364
mov eax, dword [edi + 8]
mov dword [edi + 4], 3
test eax, eax
je 0x10048364
lea ecx, [esp + 0x880]
push ecx
call eax
add esp, 4
lea ecx, [esp + 0x88bc]
call fcn.10047c20
mov esi, dword [esp + 0x894]
test esi, esi
je 0x1004838d
mov ecx, esi
call fcn.10047c20
push 0x14
push esi
call fcn.1010e562
add esp, 8
push 0x808
push dword [esp + 0x8a0]
call fcn.1010e562
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.1004b210
push ecx
push 1
push 0x101ad27c
lea ecx, [esp + 0x54]
call fcn.1004b410
push 1
lea ecx, [esp + 0x4c]
call fcn.1004b360
push ecx
push 9
push str.client_id
lea ecx, [esp + 0x54]
call fcn.1004b410
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10048455
sub ecx, edx
push ecx
push ecx
push esi
lea ecx, [esp + 0x54]
call fcn.1004b410
mov eax, dword [esp + 0x48]
sub dword [esp + 0x58], 8
mov ecx, dword [eax + 8]
cmp ecx, dword [eax + 4]
jae 0x10048481
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.1010e562
add esp, 8
mov dword [edi + 0x158], esi
add esi, 8
je 0x10048525
mov eax, dword [edi]
test eax, eax
je 0x100484de
mov eax, dword [eax + 4]
cmp eax, 0xffffffff
je 0x100484de
test ebx, ebx
je 0x100484de
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 0x100484de
cmp dword [esp + 0x14], esi
je 0x10048525
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x100484fe
mov eax, dword [edi + 4]
cmp eax, 3
je 0x100484f2
cmp eax, 1
jne 0x100484fe
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