Function at 0x405620
Capabilities:
Connect pipe

Disassembly:
sub esp, 0x124
mov eax, dword [0x40b100]
xor eax, esp
mov dword [esp + 0x120], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebp
push esi
push edi
mov edi, dword [esp + 0x138]
or ebp, 0xffffffff
jmp 0x405650
cmp dword [edi + 8], 0
jge 0x405872
lea ebx, [ebx]
cmp dword [0x40b160], 0
jne 0x405969
cmp dword [edi + 4], 0
je 0x405765
mov eax, dword [edi]
push eax
call dword [sym.imp.MSVCR90.dll__get_osfhandle]
mov esi, eax
mov eax, dword [0x40b0fc]
add esp, 4
mov dword [esp + 0x10], 0x108
cmp eax, ebp
je 0x4056da
push 0x3e8
push eax
call ebx
cmp eax, 0x102
jne 0x4056d2
jmp 0x4056b0
cmp dword [0x40b160], 0
jne 0x405969
mov ecx, dword [0x40b0fc]
push 0x3e8
push ecx
call ebx
cmp eax, 0x102
je 0x4056b0
cmp eax, ebp
je 0x405951
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x2c]
push eax
push esi
call dword [sym.imp.WS2_32.dll_accept]
mov dword [edi + 8], eax
mov eax, dword [0x40b0fc]
cmp eax, ebp
je 0x4056fe
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
cmp dword [edi + 8], 0
jl 0x40585a
mov edx, dword [0x40b164]
test edx, edx
je 0x405854
mov eax, dword [edx]
mov esi, dword [esp + 0x2c]
xor ecx, ecx
cmp eax, ebp
je 0x405733
cmp eax, esi
je 0x405854
mov eax, dword [edx + ecx*4 + 4]
inc ecx
cmp eax, ebp
jne 0x405722
push esi
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push str.Connection_from_disallowed_IP_address__s_is_dropped._n
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
mov ecx, dword [edi + 8]
add esp, 0xc
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 8], ebp
jmp 0x405660
mov edx, dword [edi]
push edx
call dword [sym.imp.MSVCR90.dll__get_osfhandle]
mov esi, eax
mov eax, dword [0x40b0fc]
add esp, 4
cmp eax, ebp
je 0x4057b9
push 0x3e8
push eax
call ebx
cmp eax, 0x102
jne 0x4057b1
jmp 0x405790
cmp dword [0x40b160], 0
jne 0x405969
mov eax, dword [0x40b0fc]
push 0x3e8
push eax
call ebx
cmp eax, 0x102
je 0x405790
cmp eax, ebp
je 0x405951
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
lea ecx, [esp + 0x14]
push ecx
push esi
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x405834
call dword [sym.imp.MSVCR90.dll__errno]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
mov esi, dword [sym.imp.MSVCR90.dll__errno]
call esi
cmp dword [eax], 0x3e5
jne 0x405832
mov edx, dword [esp + 0x24]
push 0x3e8
push edx
call ebx
cmp eax, 0x102
jne 0x405834
mov edi, edi
cmp dword [0x40b160], 0
mov eax, dword [esp + 0x24]
jne 0x40596d
push 0x3e8
push eax
call ebx
cmp eax, 0x102
je 0x405810
jmp 0x405834
call esi
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x40b0fc]
mov edx, dword [edi]
mov dword [edi + 8], edx
cmp eax, ebp
je 0x405854
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
cmp dword [edi + 8], 0
jge 0x40587f
cmp dword [0x40b160], 0
jne 0x405969
call dword [sym.imp.MSVCR90.dll__errno]
cmp dword [eax], 4
jmp 0x405879
cmp dword [0x40b160], 0
jne 0x405969
call fcn.00404930
test eax, eax
je 0x405937
cmp dword [0x40b154], 0
je 0x405988
cmp dword [edi + 4], 0
jne 0x405988
mov eax, dword [edi + 8]
push eax
call dword [sym.imp.MSVCR90.dll__get_osfhandle]
add esp, 4
push eax
call dword [sym.imp.ADVAPI32.dll_ImpersonateNamedPipeClient]
test eax, eax
jne 0x405988
mov eax, dword [edi + 0x2038]
test eax, eax
je 0x4058ea
push eax
call dword [sym.imp.php5ts.dll_zend_hash_destroy]
mov ecx, dword [edi + 0x2038]
push ecx
call dword [sym.imp.php5ts.dll__efree]
add esp, 8
mov dword [edi + 0x2038], 0
cmp dword [0x40b154], 0
je 0x4058ff
cmp dword [edi + 4], 0
jne 0x4058ff
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov eax, dword [edi + 8]
test eax, eax
jl 0x405650
cmp dword [edi + 4], 0
push eax
jne 0x405929
call dword [sym.imp.MSVCR90.dll__get_osfhandle]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov dword [edi + 8], ebp
jmp 0x405650
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 8], ebp
jmp 0x405650
mov eax, dword [edi + 0x2038]
test eax, eax
je 0x4058ea
push eax
call dword [sym.imp.php5ts.dll_zend_hash_destroy]
mov edx, dword [edi + 0x2038]
push edx
jmp 0x4058d7
push str.WaitForSingleObject___failed_n
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 8
mov eax, ebp
jmp 0x40598b
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x40b0fc]
cmp eax, ebp
je 0x405984
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, ebp
jmp 0x40598b
mov eax, dword [edi + 8]
mov ecx, dword [esp + 0x130]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00406814
add esp, 0x124
ret