Function at 0x450750
Capabilities:
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49d706
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x4c3c64]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
pushal
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1c], eax
call fcn.0047727e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x45079c
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 - 0x10], esi
mov ecx, str..pipeMyDbg
mov dword [ebp - 4], 0
test ecx, 0xffff0000
jne 0x450890
mov edx, ecx
movzx ebx, dx
push ebx
call fcn.0047f19d
mov edi, eax
test edi, edi
je 0x4508ae
mov eax, ebx
shr eax, 4
inc eax
movzx ecx, ax
push 6
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x4508ae
push ebx
push eax
push edi
call fcn.004206df
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x4508ae
movzx edi, word [ebx]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x450828
push edi
lea ecx, [ebp - 0x10]
call fcn.0042051d
mov esi, dword [ebp - 0x10]
movzx eax, word [ebx]
add ebx, 2
cmp eax, 0xffffffff
jne 0x45083d
push ebx
call fcn.0048550b
add esp, 4
inc eax
lea edx, [eax + eax]
push edx
lea ecx, [edi + edi]
push ebx
push ecx
push esi
mov dword [ebp - 0x14], ecx
call fcn.00485242
add esp, 0x10
cmp eax, 0x50
ja case.0x45085e.1
movzx eax, byte [eax + 0x450af0]
jmp dword [eax*4 + 0x450ae0]
call fcn.004777e6
call fcn.0047781e
test edi, edi
jl 0x450886
cmp edi, dword [esi - 8]
jg 0x450886
mov edx, dword [ebp - 0x14]
xor ecx, ecx
mov dword [esi - 0xc], edi
mov word [edx + esi], cx
jmp 0x4508ae
push 0x80070057
call fcn.00420000
push str..pipeMyDbg
call fcn.0048550b
add esp, 4
push eax
push str..pipeMyDbg
lea ecx, [ebp - 0x10]
call fcn.004214bc
mov esi, dword [ebp - 0x10]
mov dword [ebp - 4], 1
cmp dword [0x4c86fc], 0
jne 0x45094f
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0
push 3
push 0
push 0
push 0x40000000
push esi
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x4c86fc], eax
call edi
mov ecx, eax
mov eax, dword [0x4c86fc]
cmp eax, 0xffffffff
jne 0x450939
cmp ecx, 0xe7
jne 0x450a75
push 0xbb8
push esi
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
je 0x45092b
push 0
push SysReAllocStringLen
push 2
push 0
push 0
push 0x40000000
push esi
call ebx
mov dword [0x4c86fc], eax
jmp 0x450930
mov eax, dword [0x4c86fc]
cmp eax, 0xffffffff
je 0x450a7e
push 0
push 0
lea ecx, [ebp - 0x14]
push ecx
push eax
mov dword [ebp - 0x14], 2
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
cmp dword [0x4c86fc], 0xffffffff
je 0x450a32
test byte [0x4c8a28], 1
mov dword [ebp - 0x18], 0
jne 0x4509a3
or dword [0x4c8a28], 1
push 0x5c
push ecx
mov byte [ebp - 4], 2
mov edx, esp
mov dword [ebp - 0x14], esp
push edx
call fcn.00451660
add esp, 4
push 0x4c8a24
call fcn.00452880
push 0x4a3010
call fcn.00486225
add esp, 0x10
mov byte [ebp - 4], 1
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov edx, dword [0x4c8a24]
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 - 0x14]
push str.PID_d:TID_d:_dms:_s:_s:_s
push eax
call fcn.00452370
add esp, 0x20
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x14]
cmp dword [eax - 4], 1
mov esi, dword [eax - 0xc]
jle 0x4509f6
mov ecx, esi
push ecx
lea ecx, [ebp - 0x14]
call fcn.00420593
mov eax, dword [ebp - 0x14]
push 0
lea edx, [ebp - 0x18]
push edx
mov edx, dword [0x4c86fc]
lea ecx, [esi + esi + 2]
push ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x450a32
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
popal
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x450a63
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
je 0x450939
call edi
push eax
lea eax, [ebp - 0x14]
push 0x4a9b84
push eax
call fcn.00452370
mov eax, dword [eax]
add esp, 0xc
push 6
push eax
push str.Cannot_connect_to_Debug_pipe_
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov edi, eax
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x450ac5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp edi, 0xa
je 0x4508c8
cmp edi, 2
jne 0x45094f
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]