Function at 0x4a4820
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x47c
mov eax, dword [0x5552b0]
xor eax, esp
mov dword [esp + 0x478], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [esp + 8], esi
cmp dword [esi + 0x48], 0
push edi
jne 0x4a4864
mov eax, 0x100
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x478]
xor ecx, esp
call fcn.004e4746
mov esp, ebp
pop ebp
ret
xor eax, eax
push 0x3f
push eax
lea ecx, [esp + 0x49]
push ecx
mov dword [esp + 0x20], 0
mov word [esp + 0x2c], ax
mov dword [esp + 0x2e], eax
mov dword [esp + 0x32], eax
mov dword [esp + 0x36], eax
mov dword [esp + 0x3a], eax
mov dword [esp + 0x3e], eax
mov dword [esp + 0x42], eax
mov dword [esp + 0x46], eax
mov word [esp + 0x4a], ax
mov byte [esp + 0x4c], al
call fcn.004e8ba0
mov eax, dword [esi + 0x48]
add esp, 0xc
lea edx, [eax + 0x20]
push edx
push eax
lea eax, [esp + 0x48]
push str._spipe_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
add esp, 0x10
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
lea ecx, [esp + 0x58]
push ecx
call esi
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4a4930
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0xe7
jne 0x4a4c6a
push 0x7530
lea edx, [esp + 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeA]
test eax, eax
je 0x4a4c86
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
lea eax, [esp + 0x58]
push eax
call esi
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4a48e6
jmp 0x4a4936
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
xor esi, esi
push esi
push esi
lea ecx, [esp + 0x20]
push ecx
push ebx
mov dword [esp + 0x28], esi
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
test eax, eax
jne 0x4a496f
call edi
push 0xa
lea edx, [esp + 0x24]
push edx
push eax
call fcn.004e534f
add esp, 0xc
lea eax, [esp + 0x20]
push eax
mov edx, 0x523548
jmp 0x4a4ca2
lea ecx, [esp + 0xc]
push ecx
call dword [0x566308]
lea edx, [esp + 0x10]
add esp, 4
push edx
call dword [0x5662f8]
lea eax, [esp + 0x10]
add esp, 4
push eax
call dword [0x5662ec]
mov eax, dword [esp + 0x10]
add esp, 4
cmp dword [eax + 0x18], esi
jbe 0x4a4a38
mov ecx, dword [eax + 0x10]
push ecx
call fcn.004e5379
mov edx, dword [esp + 0x10]
mov esi, eax
mov eax, dword [edx + 0x10]
add esp, 4
push eax
push 0
push esi
call fcn.004e8ba0
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x14]
add esp, 0xc
push ecx
push eax
push esi
call fcn.004ebc70
mov eax, dword [esp + 0x18]
mov edx, dword [eax + 0x18]
mov ecx, dword [eax + 0x20]
add esp, 0xc
push edx
mov edx, dword [eax + 0x14]
push ecx
add edx, esi
push edx
call fcn.004ebc70
mov ecx, dword [esp + 0x18]
add esp, 0xc
push 0
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x18], 0
mov edx, dword [ecx + 0x10]
push edx
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0x10]
push ecx
push 0
push esi
call fcn.004e8ba0
add esp, 0xc
push esi
call fcn.004e4fab
add esp, 4
jmp 0x4a4a56
push esi
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0x18], esi
mov ecx, dword [eax + 0x10]
push ecx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [esp + 0xc]
cmp dword [edx + 0x50], 0
je 0x4a4cc1
push 8
call fcn.004e5379
add esp, 4
test eax, eax
je 0x4a4a7d
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov esi, eax
jmp 0x4a4a7f
xor esi, esi
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
push 0x3ff
lea eax, [esp + 0x85]
push 0
push eax
mov byte [esp + 0x8c], 0
call fcn.004e8ba0
add esp, 0xc
push 0
lea ecx, [esp + 0x14]
push ecx
push 0x400
lea edx, [esp + 0x8c]
push edx
push ebx
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, eax
mov dword [esp + 0x1c], edi
test edi, edi
jne 0x4a4ae3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x4a4c4e
mov eax, dword [esi + 4]
test eax, eax
jne 0x4a4b62
cmp dword [esp + 0x10], 0x28
jbe 0x4a4b83
mov ecx, 0x502548
lea edx, [esp + 0x80]
call fcn.0047b140
test eax, eax
jne 0x4a4b83
mov ecx, dword [esp + 0x94]
add ecx, dword [esp + 0x98]
mov eax, dword [esp + 0x90]
cmp eax, ecx
jb 0x4a4b83
push eax
call fcn.004e5379
mov edx, dword [esp + 0x94]
add esp, 4
push edx
push 0
push eax
mov dword [esi], eax
call fcn.004e8ba0
mov eax, dword [esp + 0x1c]
mov edx, dword [esi]
add esp, 0xc
push eax
lea ecx, [esp + 0x84]
push ecx
push edx
call fcn.004ebc70
mov eax, dword [esp + 0x1c]
add esp, 0xc
add dword [esi + 4], eax
jmp 0x4a4b83
mov ecx, dword [esp + 0x10]
push ecx
mov ecx, dword [esi]
lea edx, [esp + 0x84]
push edx
add ecx, eax
push ecx
call fcn.004ebc70
mov edx, dword [esp + 0x1c]
add esp, 0xc
add dword [esi + 4], edx
mov eax, dword [esi + 4]
test eax, eax
je 0x4a4c26
mov edi, dword [esi]
cmp dword [edi + 0x10], eax
jne 0x4a4a86
mov eax, dword [edi + 0x8c]
mov ecx, dword [esp + 0xc]
mov dword [ecx + 0x8c], eax
cmp dword [edi + 0x18], 0
jbe 0x4a4c00
mov edx, dword [edi + 0x14]
lea eax, [esp + 0xc]
add edx, edi
push eax
mov dword [edi + 0x20], edx
call dword [0x566310]
mov ecx, dword [edi + 0x18]
add esp, 4
push ecx
lea edx, [esp + 0x10]
push edx
call dword [0x56630c]
mov eax, dword [edi + 0x18]
mov ecx, dword [edi + 0x20]
mov edx, dword [esp + 0x14]
push eax
mov eax, dword [edx + 0x20]
push ecx
push eax
call fcn.004ebc70
mov ecx, dword [edi + 0x18]
mov edx, dword [esp + 0x20]
mov dword [edx + 0x18], ecx
mov eax, dword [edi + 0x10]
mov ecx, dword [esp + 0x20]
add esp, 0x14
mov dword [ecx + 0x10], eax
mov edx, dword [esi + 4]
mov eax, dword [esi]
push edx
push 0
push eax
call fcn.004e8ba0
mov ecx, dword [esi]
add esp, 0xc
push ecx
call fcn.004e4fab
mov edi, dword [esp + 0x20]
add esp, 4
mov dword [esi], 0
test edi, edi
je 0x4a4a86
xor eax, eax
mov dword [esi], eax
push esi
mov dword [esi + 4], eax
call fcn.004e4fab
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push ebx
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
jmp 0x4a4cc1
push 0xa
lea edx, [esp + 0x24]
push edx
push eax
call fcn.004e534f
add esp, 0xc
lea eax, [esp + 0x20]
push eax
mov edx, 0x5234b0
jmp 0x4a4ca2
push 0xa
lea ecx, [esp + 0x24]
push ecx
push eax
call fcn.004e534f
lea edx, [esp + 0x2c]
add esp, 0xc
push edx
mov edx, 0x5234d4
jmp 0x4a4ca2
call edi
push 0xa
lea ecx, [esp + 0x24]
push ecx
push eax
call fcn.004e534f
lea edx, [esp + 0x2c]
add esp, 0xc
push edx
mov edx, 0x523528
push 0x56d5b8
push str.Pipe
mov ecx, str.fnPipeReceiveRequestFromProc
call fcn.004a3520
mov dword [esp + 0x20], 0x100
add esp, 0xc
lea eax, [esp + 0xc]
push eax
call dword [0x566308]
lea ecx, [esp + 0x10]
add esp, 4
push ecx
call dword [0x5662f8]
lea edx, [esp + 0x10]
add esp, 4
push edx
call dword [0x5662ec]
add esp, 4
cmp ebx, 0xffffffff
je 0x4a4cf7
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x484]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004e4746
mov esp, ebp
pop ebp
ret