Function at 0x475890
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4eced6
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x541100]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
pushal
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
mov dword [ebp - 0x1c], eax
call fcn.004bdbe3
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4758de
push 0x80004005
call fcn.00420000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x14], esi
mov ecx, str..pipeMyDbg
mov dword [ebp - 4], 0
test ecx, 0xffff0000
jne 0x47591c
mov edx, ecx
movzx edi, dx
push edi
call fcn.004c5d7f
test eax, eax
je 0x47593a
push edi
push eax
lea ecx, [ebp - 0x14]
call fcn.00422eb3
jmp 0x475937
push str..pipeMyDbg
call fcn.004ccd1a
add esp, 4
push eax
push str..pipeMyDbg
lea ecx, [ebp - 0x14]
call fcn.00423404
mov esi, dword [ebp - 0x14]
mov edi, 1
mov dword [ebp - 4], edi
cmp dword [0x546f34], 0
jne 0x475a1f
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0
push 3
push 0
push 0
push 0x40000000
push esi
call edi
mov dword [0x546f34], eax
call ebx
mov ecx, eax
mov eax, dword [0x546f34]
cmp eax, 0xffffffff
jne 0x475a04
cmp ecx, 0xe7
jne 0x4759ff
push 0xbb8
push esi
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
je 0x4759b2
push 0
push SysReAllocStringLen
push 2
push 0
push 0
push 0x40000000
push esi
call edi
mov dword [0x546f34], eax
jmp 0x4759b7
mov eax, dword [0x546f34]
cmp eax, 0xffffffff
jne 0x475a04
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
popal
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4759ed
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp ecx, 2
jne 0x4759bc
push 0
push 0
lea ecx, [ebp - 0x10]
push ecx
push eax
mov dword [ebp - 0x10], 2
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
mov edi, 1
cmp dword [0x546f34], 0xffffffff
je 0x4759bc
test byte [0x547840], 1
mov dword [ebp - 0x18], 0
jne 0x475a6e
or dword [0x547840], edi
push 0x5c
push ecx
mov byte [ebp - 4], 2
mov edx, esp
mov dword [ebp - 0x10], esp
push edx
call fcn.004766c0
add esp, 4
push 0x54783c
call fcn.00477b10
push 0x4f8ea0
call fcn.004cd8dc
add esp, 0x10
mov byte [ebp - 4], 1
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov edx, dword [0x54783c]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [ebp - 0x10]
push str.PID_d:TID_d:_dms:_s:_s:_s
push eax
call fcn.004777e0
add esp, 0x20
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x10]
cmp dword [eax - 4], edi
mov esi, dword [eax - 0xc]
jle 0x475ac0
mov ecx, esi
push ecx
lea ecx, [ebp - 0x10]
call fcn.004205a0
mov eax, dword [ebp - 0x10]
push 0
lea edx, [ebp - 0x18]
push edx
mov edx, dword [0x546f34]
lea ecx, [esi + esi + 2]
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.004cccfb
add esp, 8
test eax, eax
jl 0x475b2d
mov ecx, dword [ebp - 0x10]
cmp eax, dword [ecx - 8]
jg 0x475b2d
mov dword [ecx - 0xc], eax
mov edx, dword [ebp - 0x10]
xor ecx, ecx
mov word [edx + eax*2], cx
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4759bc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4759bc
push 0x80070057
call fcn.00420000
int3