Function at 0x1010dd25
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.10123320
push ebx
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 4]
cmp eax, 3
je case.0x1010dd1e.4
cmp eax, 1
jne 0x1010e0c1
mov ebx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov esi, dword [edi]
test esi, esi
je 0x1010e03c
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x1010e04d
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 0x1010e027
cmp dword [esp + 0x1c], 8
jb 0x1010e04d
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 0x1010e027
cmp dword [esp + 0x10], 8
je 0x1010dc71
push 0x74
push str.D:_aFedorawareFedorawareFedorawareTeamFortress2TeamFortress2SDKDiscord_srcconnection_win.cpp
push str.bytesToRead__bytesRead
call ebx
add esp, 0xc
mov ebx, dword [esp + 0x24]
test ebx, ebx
je 0x1010dd11
mov esi, dword [edi]
test esi, esi
je 0x1010ddee
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x1010de04
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 0x1010ddd9
cmp dword [esp + 0x14], ebx
jb 0x1010de04
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 0x1010ddd9
cmp ebx, dword [esp + 0x10]
je 0x1010dd04
mov eax, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
push 0x74
push str.D:_aFedorawareFedorawareFedorawareTeamFortress2TeamFortress2SDKDiscord_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.0x1010dd1e.0
jmp dword [eax*4 + 0x1010e0cc]
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 0x1010dbec
mov eax, dword [edi]
test eax, eax
jne 0x1010dd57
push 0x4f
push str.D:_aFedorawareFedorawareFedorawareTeamFortress2TeamFortress2SDKDiscord_srcconnection_win.cpp
push str.self
call ebx
add esp, 0xc
jmp 0x1010dd98
mov eax, dword [eax + 4]
cmp eax, 0xffffffff
je 0x1010dd92
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 0x1010dd98
cmp dword [esp + 0x18], esi
je 0x1010dbec
jmp 0x1010dd98
mov ebx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x1010ddb8
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1010ddac
cmp eax, 1
jne 0x1010ddb8
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 0x1010dbec
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0xffffffff
mov byte [esi], 0
jmp 0x1010de04
mov eax, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
push 0x67
push str.D:_aFedorawareFedorawareFedorawareTeamFortress2TeamFortress2SDKDiscord_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 0x1010e085
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x1010de20
jmp 0x1010e085
mov esi, dword [ebp + 8]
lea eax, [esp + 0x28]
push eax
mov ecx, esi
call fcn.1010e0e0
test esi, esi
je 0x1010deda
push str.code
lea eax, [esp + 0x18]
mov ecx, esi
push eax
call fcn.1010ced0
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 0x1010de8e
push 0x492
push str.D:_aFedorawareFedorawareFedorawareTeamFortress2TeamFortress2SDKDiscord_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 0x1010ded7
mov al, byte [esi + 0x1e]
shr al, 5
test al, 1
je 0x1010ded7
test byte [esi + 0x1e], 0x20
jne 0x1010dec8
push 0x6c9
push str.D:_aFedorawareFedorawareFedorawareTeamFortress2TeamFortress2SDKDiscord_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 0x1010def6
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 0x1010df84
push str.message
lea eax, [esp + 0x18]
push eax
call fcn.1010ced0
cmp word [esi], 3
mov ebx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
je 0x1010df25
push 0x492
push str.D:_aFedorawareFedorawareFedorawareTeamFortress2TeamFortress2SDKDiscord_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 0x1010df84
mov cx, word [eax + 0x1e]
shr cx, 0xa
test cl, 1
je 0x1010df84
lea esi, [eax + 0x10]
mov ax, word [esi + 0xe]
shr ax, 0xa
test al, 1
jne 0x1010df6b
push 0x6ed
push str.D:_aFedorawareFedorawareFedorawareTeamFortress2TeamFortress2SDKDiscord_src_rapidjsondocument.h
push str.IsString__
call ebx
add esp, 0xc
mov eax, 0x1000
test word [esi + 0xe], ax
jne 0x1010df79
mov esi, dword [esi + 8]
lea ebx, [edi + 0x54]
mov eax, esi
test esi, esi
je 0x1010dfb8
jmp 0x1010df8e
mov eax, 0x10131d30
lea ebx, [edi + 0x54]
mov esi, eax
cmp byte [eax], 0
mov ecx, ebx
je 0x1010dfb5
mov edx, 1
sub edx, eax
nop dword [eax]
lea eax, [edx + esi]
cmp eax, 0x100
jae 0x1010dfb5
mov al, byte [esi]
inc esi
mov byte [ecx], al
inc ecx
cmp byte [esi], 0
jne 0x1010dfa0
mov byte [ecx], 0
mov eax, dword [edi + 0xc]
test eax, eax
je 0x1010e0a5
mov ecx, dword [edi + 4]
cmp ecx, 3
je 0x1010dfd4
cmp ecx, 1
jne 0x1010e0a5
push ebx
push dword [edi + 0x50]
call eax
jmp 0x1010e0a2
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x28]
push eax
call fcn.1010e0e0
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 0x1010e085
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x1010e010
jmp 0x1010e085
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0xffffffff
mov byte [esi], 0
jmp 0x1010e04d
push 0x67
push str.D:_aFedorawareFedorawareFedorawareTeamFortress2TeamFortress2SDKDiscord_srcconnection_win.cpp
push str.self
call ebx
add esp, 0xc
mov eax, dword [edi]
cmp byte [eax], 0
jne 0x1010e0c1
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 0x1010e085
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x1010e070
mov byte [edx], 0
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x1010e0a5
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1010e09c
cmp eax, 1
jne 0x1010e0a5
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