Function at 0x1005588e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1001c
call fcn.10231050
mov eax, dword [0x1033bbac]
xor eax, esp
mov dword [esp + 0x10018], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 4]
cmp eax, 3
je 0x10055837
cmp eax, 1
jne 0x100559c1
mov ecx, dword [edi]
lea eax, [esp + 0x10]
push 8
push eax
call fcn.100534e0
test al, al
je 0x10055948
nop dword [eax]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1005587a
mov ecx, dword [edi]
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.100534e0
test al, al
je 0x100559da
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.0x10055887.0
jmp dword [ecx*4 + 0x10055b30]
lea esi, [eax + 8]
mov dword [esp + 0x10], 4
test esi, esi
je case.0x10055887.4
mov eax, dword [edi]
test eax, eax
jne 0x100558be
push 0x4f
push str.C:UsersAdminDesktopMEGA_2.5.4MEGA_2.5.4dsoundDiscord_SDK_srcconnection_win.cpp
push str.self
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
add esp, 0xc
jmp 0x100558f6
mov eax, dword [eax + 4]
cmp eax, 0xffffffff
je 0x100558f6
push 0
lea ecx, [esp + 0x10018]
mov dword [esp + 0x10018], 0
push ecx
push esi
lea ecx, [esp + 0x1c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
jne 0x100558f6
cmp dword [esp + 0x10014], esi
je case.0x10055887.4
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x10055916
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1005590a
cmp eax, 1
jne 0x10055916
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.100534e0
test al, al
jne 0x10055850
mov eax, dword [edi]
cmp byte [eax], 0
jne 0x100559c1
lea ebx, [edi + 0x54]
mov dword [edi + 0x50], 1
mov ecx, str.Pipe_closed
mov esi, 1
mov edx, ebx
sub esi, ecx
nop word [eax + eax]
lea eax, [esi + ecx]
cmp eax, 0x100
jae 0x10055985
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x10055970
mov byte [edx], 0
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x100559a5
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1005599c
cmp eax, 1
jne 0x100559a5
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 + 0x10018]
xor ecx, esp
call fcn.1022fc6a
mov esp, ebp
pop ebp
ret 4
mov ecx, str.Partial_data_in_frame
mov dword [edi + 0x50], 2
lea ebx, [edi + 0x54]
mov esi, 1
mov edx, ebx
sub esi, ecx
lea eax, [esi + ecx]
cmp eax, 0x100
jae 0x10055985
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x100559f2
jmp 0x10055985
lea eax, [esp + 0x18]
mov dword [esp + 0x1001c], 0
mov dword [esp + 0x10018], eax
mov ecx, ebx
mov dword [esp + 0x10020], eax
lea eax, [esp + 0x10018]
push eax
call fcn.10055b50
push ecx
mov ecx, ebx
call fcn.10053b00
add esp, 4
mov dword [edi + 0x50], eax
mov edx, str.message
mov ecx, ebx
push 0x1031c988
call fcn.10053bb0
mov edx, eax
lea esi, [edi + 0x54]
add esp, 4
test edx, edx
je 0x10055a85
mov bl, byte [edx]
mov ecx, esi
test bl, bl
je 0x10055a82
mov eax, 1
cmp eax, 0x100
jae 0x10055a82
inc edx
mov byte [ecx], bl
inc ecx
inc eax
mov bl, byte [edx]
test bl, bl
jne 0x10055a70
mov byte [ecx], 0
mov eax, dword [edi + 0xc]
test eax, eax
je 0x100559a5
mov ecx, dword [edi + 4]
cmp ecx, 3
je 0x10055aa1
cmp ecx, 1
jne 0x100559a5
push esi
push dword [edi + 0x50]
call eax
jmp 0x100559a2
lea eax, [esp + 0x18]
mov dword [esp + 0x1001c], 0
mov dword [esp + 0x10018], eax
mov ecx, ebx
mov dword [esp + 0x10020], eax
lea eax, [esp + 0x10018]
push eax
call fcn.10055b50
mov ecx, dword [esp + 0x10024]
mov al, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1022fc6a
mov esp, ebp
pop ebp
ret 4
mov ecx, str.Bad_ipc_frame
mov dword [edi + 0x50], 2
lea ebx, [edi + 0x54]
mov esi, 1
mov edx, ebx
sub esi, ecx
nop dword [eax]
lea eax, [esi + ecx]
cmp eax, 0x100
jae 0x10055985
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x10055b10
jmp 0x10055985