Function at 0x100c2a60
Capabilities:
Read file on windows
Read pipe
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x10014
call fcn.100d27c0
push ebx
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 4]
cmp eax, 3
je case.0x100c2bbe.4
cmp eax, 1
jne 0x100c2f61
mov ebx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov esi, dword [edi]
test esi, esi
je 0x100c2edc
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x100c2eed
push 0
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], 0
push ecx
push 0
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x100c2ec7
cmp dword [esp + 0x1c], 8
jb 0x100c2eed
push 0
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0
push eax
push 8
lea eax, [esp + 0x2c]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, 1
jne 0x100c2ec7
cmp dword [esp + 0x10], 8
je 0x100c2b11
push 0x74
push str.C:UsersRichcieDesktopFedoraware_mainSE_OwnedTeamFortress2TeamFortress2SDKDiscord_srcconnection_win.cpp
push str.bytesToRead__bytesRead
call ebx
add esp, 0xc
mov ebx, dword [esp + 0x24]
test ebx, ebx
je 0x100c2bb1
mov esi, dword [edi]
test esi, esi
je 0x100c2c8e
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x100c2ca4
push 0
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0
push ecx
push 0
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x100c2c79
cmp dword [esp + 0x14], ebx
jb 0x100c2ca4
push 0
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0
push eax
push ebx
lea eax, [esp + 0x34]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, 1
jne 0x100c2c79
cmp ebx, dword [esp + 0x10]
je 0x100c2ba4
mov eax, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
push 0x74
push str.C:UsersRichcieDesktopFedoraware_mainSE_OwnedTeamFortress2TeamFortress2SDKDiscord_srcconnection_win.cpp
push str.bytesToRead__bytesRead
call eax
add esp, 0xc
mov eax, dword [esp + 0x24]
mov byte [esp + eax + 0x28], 0
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
cmp eax, 4
ja case.0x100c2bbe.0
jmp dword [eax*4 + 0x100c2f6c]
lea esi, [ebx + 8]
mov dword [esp + 0x20], 4
mov ebx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
test esi, esi
je 0x100c2a8c
mov eax, dword [edi]
test eax, eax
jne 0x100c2bf7
push 0x4f
push str.C:UsersRichcieDesktopFedoraware_mainSE_OwnedTeamFortress2TeamFortress2SDKDiscord_srcconnection_win.cpp
push str.self
call ebx
add esp, 0xc
jmp 0x100c2c38
mov eax, dword [eax + 4]
cmp eax, 0xffffffff
je 0x100c2c32
push 0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push ecx
push esi
lea ecx, [esp + 0x2c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
cmp eax, 1
jne 0x100c2c38
cmp dword [esp + 0x18], esi
je 0x100c2a8c
jmp 0x100c2c38
mov ebx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x100c2c58
mov eax, dword [edi + 4]
cmp eax, 3
je 0x100c2c4c
cmp eax, 1
jne 0x100c2c58
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 0x100c2a8c
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0xffffffff
mov byte [esi], 0
jmp 0x100c2ca4
mov eax, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
push 0x67
push str.C:UsersRichcieDesktopFedoraware_mainSE_OwnedTeamFortress2TeamFortress2SDKDiscord_srcconnection_win.cpp
push str.self
call eax
add esp, 0xc
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
nop dword [eax]
lea eax, [esi + ecx]
cmp eax, 0x100
jae 0x100c2f25
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x100c2cc0
jmp 0x100c2f25
mov esi, dword [ebp + 8]
lea eax, [esp + 0x28]
push eax
mov ecx, esi
call fcn.100c2f80
test esi, esi
je 0x100c2d7a
push str.code
lea eax, [esp + 0x18]
mov ecx, esi
push eax
call fcn.100c1d70
cmp word [esi + 0xe], 3
lea eax, [esi + 0xe]
mov ebx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov dword [esp + 0x10], eax
je 0x100c2d2e
push 0x492
push str.C:UsersRichcieDesktopFedoraware_mainSE_OwnedTeamFortress2TeamFortress2SDKDiscord_src_rapidjsondocument.h
push str.IsObject__
call ebx
add esp, 0xc
mov eax, dword [esi]
lea ecx, [esi + 8]
mov esi, dword [esp + 0x14]
shl eax, 5
add eax, dword [ecx]
mov dword [esp + 0x18], ecx
cmp esi, eax
je 0x100c2d77
mov al, byte [esi + 0x1e]
shr al, 5
test al, 1
je 0x100c2d77
test byte [esi + 0x1e], 0x20
jne 0x100c2d68
push 0x6c9
push str.C:UsersRichcieDesktopFedoraware_mainSE_OwnedTeamFortress2TeamFortress2SDKDiscord_src_rapidjsondocument.h
push str.data_.f.flags__kIntFlag
call ebx
add esp, 0xc
mov eax, dword [esi + 0x10]
mov esi, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
mov dword [edi + 0x50], eax
jmp 0x100c2d96
mov esi, dword [ebp + 8]
mov ecx, dword [ebp + 8]
lea eax, [esi + 8]
add esi, 0xe
mov dword [esp + 0x18], eax
mov dword [edi + 0x50], 0
test ecx, ecx
je 0x100c2e24
push str.message
lea eax, [esp + 0x18]
push eax
call fcn.100c1d70
cmp word [esi], 3
mov ebx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
je 0x100c2dc5
push 0x492
push str.C:UsersRichcieDesktopFedoraware_mainSE_OwnedTeamFortress2TeamFortress2SDKDiscord_src_rapidjsondocument.h
push str.IsObject__
call ebx
add esp, 0xc
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov eax, dword [esp + 0x18]
shl ecx, 5
add ecx, dword [eax]
mov eax, dword [esp + 0x14]
cmp eax, ecx
je 0x100c2e24
mov cx, word [eax + 0x1e]
shr cx, 0xa
test cl, 1
je 0x100c2e24
lea esi, [eax + 0x10]
mov ax, word [esi + 0xe]
shr ax, 0xa
test al, 1
jne 0x100c2e0b
push 0x6ed
push str.C:UsersRichcieDesktopFedoraware_mainSE_OwnedTeamFortress2TeamFortress2SDKDiscord_src_rapidjsondocument.h
push str.IsString__
call ebx
add esp, 0xc
mov eax, 0x1000
test word [esi + 0xe], ax
jne 0x100c2e19
mov esi, dword [esi + 8]
lea ebx, [edi + 0x54]
mov eax, esi
test esi, esi
je 0x100c2e58
jmp 0x100c2e2e
mov eax, 0x100d9027
lea ebx, [edi + 0x54]
mov esi, eax
cmp byte [eax], 0
mov ecx, ebx
je 0x100c2e55
mov edx, 1
sub edx, eax
nop dword [eax]
lea eax, [edx + esi]
cmp eax, 0x100
jae 0x100c2e55
mov al, byte [esi]
inc esi
mov byte [ecx], al
inc ecx
cmp byte [esi], 0
jne 0x100c2e40
mov byte [ecx], 0
mov eax, dword [edi + 0xc]
test eax, eax
je 0x100c2f45
mov ecx, dword [edi + 4]
cmp ecx, 3
je 0x100c2e74
cmp ecx, 1
jne 0x100c2f45
push ebx
push dword [edi + 0x50]
call eax
jmp 0x100c2f42
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x28]
push eax
call fcn.100c2f80
mov al, 1
pop edi
pop esi
pop ebx
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
lea eax, [esi + ecx]
cmp eax, 0x100
jae 0x100c2f25
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x100c2eb0
jmp 0x100c2f25
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0xffffffff
mov byte [esi], 0
jmp 0x100c2eed
push 0x67
push str.C:UsersRichcieDesktopFedoraware_mainSE_OwnedTeamFortress2TeamFortress2SDKDiscord_srcconnection_win.cpp
push str.self
call ebx
add esp, 0xc
mov eax, dword [edi]
cmp byte [eax], 0
jne 0x100c2f61
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 0x100c2f25
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x100c2f10
mov byte [edx], 0
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x100c2f45
mov eax, dword [edi + 4]
cmp eax, 3
je 0x100c2f3c
cmp eax, 1
jne 0x100c2f45
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
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 4