Function at 0x412190
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xc]
mov edx, dword [ecx + 4]
mov dword [ebp - 8], edx
mov dword [ebp - 4], 0
test al, 1
je 0x4121b4
mov dword [ebp - 4], 0x29
test al, 2
je 0x4121bc
or dword [ebp - 4], 0x32
test al, 4
je 0x4121c4
or dword [ebp - 4], 4
mov eax, dword [edx + 0x10]
push ebx
push esi
push edi
mov dword [ecx + 8], eax
cmp eax, 0xffffffff
jne 0x41225b
test byte [0x4805a8], 0x80
je 0x412252
mov esi, dword [sym.imp.MSVCR100.dll__errno]
call esi
mov edi, dword [eax]
push 0x480590
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [sym.imp.MSVCR100.dll___iob_func]
push str._event_socket_start
push str.sysdeps_win32.cpp
push str._s::_s__:
call ebx
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0x10
call esi
mov dword [eax], edi
mov eax, dword [ebp - 8]
add eax, 0x18
push eax
push str._event_socket_start:_no_event_for__s_n
call ebx
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
call ebx
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 0x10
push 0x480590
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call esi
mov dword [eax], edi
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
cmp eax, dword [edx + 0x14]
je 0x4123b5
test byte [0x4805a8], 0x80
mov esi, dword [sym.imp.MSVCR100.dll__errno]
mov ebx, dword [sym.imp.MSVCR100.dll_fprintf]
mov edi, dword [sym.imp.MSVCR100.dll___iob_func]
je 0x4122fb
call esi
mov ecx, dword [eax]
push 0x480590
mov dword [ebp - 0xc], ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push str._event_socket_start
push str.sysdeps_win32.cpp
push str._s::_s__:
call edi
add eax, 0x40
push eax
call ebx
add esp, 0x10
call esi
mov edx, dword [ebp - 0xc]
mov dword [eax], edx
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 4]
push ecx
add edx, 0x18
push edx
push str._event_socket_start:_hooking__s_for__x__flags__ld__n
call edi
add eax, 0x40
push eax
call ebx
call edi
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 0x18
push 0x480590
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call esi
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov dword [eax], ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 4]
mov ecx, dword [ecx + 8]
mov edx, dword [edx + 0xc]
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
je 0x4123ac
test byte [0x4805a8], 0x80
je 0x412390
call esi
mov eax, dword [eax]
push 0x480590
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push str._event_socket_start
push str.sysdeps_win32.cpp
push str._s::_s__:
call edi
add eax, 0x40
push eax
call ebx
add esp, 0x10
call esi
mov ecx, dword [ebp - 0xc]
mov dword [eax], ecx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [ebp + 8]
push eax
mov eax, dword [edx + 4]
add eax, 0x18
push eax
push str._event_socket_start:_WSAEventSelect___for__s_failed__error__d_n
call edi
add eax, 0x40
push eax
call ebx
call edi
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 0x14
push 0x480590
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call esi
mov ecx, dword [ebp - 0xc]
mov dword [eax], ecx
mov esi, dword [ebp + 8]
mov edx, dword [esi + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 1
mov dword [esi + 8], 0xffffffff
call dword [sym.imp.MSVCR100.dll_exit]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov dword [ecx + 0x14], eax
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret