Function at 0x403840
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42bded
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x43a680]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x4c], ecx
mov ecx, dword [ebp + 8]
xor esi, esi
mov eax, dword [ebp + 0xc]
xor edi, edi
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x3c], edi
xorps xmm0, xmm0
mov dword [ebp - 4], edi
movups xmmword [ebp - 0x68], xmm0
movq qword [ebp - 0x58], xmm0
nop dword [eax]
mov eax, dword [ebp - 0x4c]
push dword [eax + 0x64]
lea eax, [ebp - 0x2c]
push 0x18
push eax
push dword [ebp - 0x50]
lea eax, [ebp - 0x68]
push eax
push ecx
call fcn.00404cc0
add esp, 0x18
test eax, eax
je 0x40393c
mov ecx, dword [ebp - 0x30]
cmp eax, 2
je 0x4038a0
cmp eax, 3
je 0x4038f0
cmp eax, 4
je 0x4038f0
push str.Error_reading_pipe
push 0x42d414
push 0x144
push str.C:BuildAgent_work1_s_agent_rcapi_sourcekvm_sourcewin32ipc_client.cpp
push 1
call fcn.00403780
add esp, 0x14
test esi, esi
je 0x40391e
sub edi, esi
mov eax, esi
cmp edi, 0x1000
jb 0x403914
mov esi, dword [eax - 4]
add edi, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403b0a
push edi
push esi
call fcn.004118c3
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004118d1
mov esp, ebp
pop ebp
ret 0xc
cmp edx, 0x18
je 0x403952
push str.Error_reading_pipe__partial_read_
push 0x42d414
push 0x148
jmp 0x4038e1
cmp dword [ebp - 0x1c], 0x77c48b54
jne 0x403af6
cmp dword [ebp - 0x18], 0x9987248
jne 0x403af6
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x34], 0
test edx, edx
je 0x403aaf
mov ecx, dword [ebp - 0x40]
mov eax, ecx
sub eax, esi
mov byte [ebp - 4], 1
mov dword [ebp - 0x34], eax
cmp edx, eax
jae 0x403998
lea eax, [esi + edx]
jmp 0x403a37
jbe 0x403a3a
mov eax, edi
sub eax, esi
cmp edx, eax
jbe 0x403a1c
lea eax, [ebp - 0x35]
push eax
push edx
lea ecx, [ebp - 0x44]
call fcn.004036a0
mov edi, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x44]
mov edx, dword [ebp - 0x20]
jmp 0x403a3a
sub edx, dword [ebp - 0x34]
push edx
push 0
push ecx
mov dword [ebp - 0x34], edx
call fcn.00412f50
mov eax, dword [ebp - 0x40]
add esp, 0xc
add eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x40], eax
push 0
lea eax, [ebp - 0x48]
mov dword [ebp - 4], 0
push eax
push edx
push esi
push dword [ebp - 0x30]
mov dword [ebp - 0x48], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x20]
cmp dword [ebp - 0x48], edx
je 0x403aac
push str.Failed_to_read_entire_payload
push 0x42d414
push 0x15c
push str.C:BuildAgent_work1_s_agent_rcapi_sourcekvm_sourcewin32ipc_client.cpp
push 1
call fcn.00403780
add esp, 0x14
test esi, esi
je 0x40391e
sub edi, esi
mov eax, esi
cmp edi, 0x1000
jb 0x403914
mov esi, dword [eax - 4]
add edi, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403b0a
jmp 0x403914
mov dword [ebp - 0x34], esi
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
test eax, eax
jne 0x403ad6
cmp dword [ebp - 0x28], 5
jne 0x4038a0
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0x60]
mov eax, dword [ecx]
call dword [eax + 8]
mov ecx, dword [ebp - 0x30]
jmp 0x4038a0
cmp eax, 1
jne 0x4038a0
mov eax, dword [ebp + 0x10]
push edx
push dword [ebp - 0x34]
mov ecx, dword [eax + 0x60]
mov eax, dword [ecx]
call dword [eax + 0x10]
mov ecx, dword [ebp - 0x30]
jmp 0x4038a0
push str.Invalid_message_key
push 0x42d414
push 0x14c
jmp 0x403a70
call fcn.0041672f
int3