Function at 0x1000ac10
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1000c
call fcn.1002fea0
mov eax, dword [0x1006e064]
xor eax, esp
mov dword [esp + 0x10008], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1000ac47
cmp eax, 1
jne 0x1000adc1
mov ecx, dword [edi]
lea eax, [esp + 0x10]
push 8
push eax
call fcn.100078f0
test al, al
je 0x1000ad4e
nop dword [eax]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1000ac8a
mov ecx, dword [edi]
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.100078f0
test al, al
je 0x1000adda
mov eax, dword [esp + 0x14]
mov byte [esp + eax + 0x18], 0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
cmp ecx, 4
ja case.0x1000ac97.0
jmp dword [ecx*4 + 0x1000af50]
lea esi, [eax + 8]
mov dword [esp + 0x10], 4
test esi, esi
je case.0x1000ac97.4
mov eax, dword [edi]
test eax, eax
jne 0x1000accd
push 0x4f
push str.C:UsersERRORDesktopLoader6609CoHookDiscordSDK_srcconnection_win.cpp
push str.self
call fcn.10037a1a
add esp, 0xc
jmp 0x1000acfc
mov eax, dword [eax + 4]
cmp eax, 0xffffffff
je 0x1000acfc
push 0
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], 0
push ecx
push esi
lea ecx, [esp + 0x1c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
jne 0x1000acfc
cmp dword [esp + 0xc], esi
je case.0x1000ac97.4
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x1000ad1c
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1000ad10
cmp eax, 1
jne 0x1000ad1c
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
mov ecx, dword [edi]
lea eax, [esp + 0x10]
push 8
push eax
call fcn.100078f0
test al, al
jne 0x1000ac60
mov eax, dword [edi]
cmp byte [eax], 0
jne 0x1000adc1
lea ebx, [edi + 0x54]
mov dword [edi + 0x50], 1
mov ecx, str.Pipe_closed
mov esi, 1
mov edx, ebx
sub esi, ecx
nop dword [eax]
lea eax, [esi + ecx]
cmp eax, 0x100
jae 0x1000ad85
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x1000ad70
mov byte [edx], 0
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x1000ada5
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1000ad9c
cmp eax, 1
jne 0x1000ada5
push ebx
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
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x10008]
xor ecx, esp
call fcn.1002eba3
mov esp, ebp
pop ebp
ret 4
lea ebx, [edi + 0x54]
mov dword [edi + 0x50], 2
mov ecx, str.Partial_data_in_frame
mov esi, 1
mov edx, ebx
sub esi, ecx
lea eax, [esi + ecx]
cmp eax, 0x100
jae 0x1000ad85
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x1000adf2
jmp 0x1000ad85
lea eax, [esp + 0x18]
mov ecx, ebx
push eax
call fcn.1000af70
test ebx, ebx
je 0x1000ae87
push str.code
lea eax, [esp + 0x10]
mov ecx, ebx
push eax
call fcn.10009510
cmp word [ebx + 0xe], 3
je 0x1000ae4b
push 0x492
push str.C:UsersERRORDesktopLoader6609CoHookDiscordSDK_src_rapidjsondocument.h
push str.IsObject__
call fcn.10037a1a
add esp, 0xc
mov eax, dword [ebx]
mov esi, dword [esp + 0xc]
shl eax, 5
add eax, dword [ebx + 8]
cmp esi, eax
je 0x1000ae87
mov al, byte [esi + 0x1e]
shr al, 5
test al, 1
je 0x1000ae87
test byte [esi + 0x1e], 0x20
jne 0x1000ae82
push 0x6c9
push str.C:UsersERRORDesktopLoader6609CoHookDiscordSDK_src_rapidjsondocument.h
push str.data_.f.flags__kIntFlag
call fcn.10037a1a
add esp, 0xc
mov eax, dword [esi + 0x10]
jmp 0x1000ae89
xor eax, eax
push 0x10063fec
mov edx, str.message
mov dword [edi + 0x50], eax
mov ecx, ebx
call fcn.10007ea0
mov esi, eax
add esp, 4
test esi, esi
je 0x1000aecc
mov dl, byte [esi]
lea ecx, [edi + 0x54]
test dl, dl
je 0x1000aec9
mov eax, 1
sub esi, ecx
cmp eax, 0x100
jae 0x1000aec9
mov byte [ecx], dl
inc eax
mov dl, byte [esi + ecx + 1]
inc ecx
test dl, dl
jne 0x1000aeb6
mov byte [ecx], 0
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x1000ada5
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1000aee8
cmp eax, 1
jne 0x1000ada5
lea eax, [edi + 0x54]
push eax
jmp 0x1000ad9d
lea eax, [esp + 0x18]
mov ecx, ebx
push eax
call fcn.1000af70
mov ecx, dword [esp + 0x10014]
mov al, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1002eba3
mov esp, ebp
pop ebp
ret 4
lea ebx, [edi + 0x54]
mov dword [edi + 0x50], 2
mov ecx, str.Bad_ipc_frame
mov esi, 1
mov edx, ebx
sub esi, ecx
nop
lea eax, [ecx + esi]
cmp eax, 0x100
jae 0x1000ad85
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x1000af30
jmp 0x1000ad85