Function at 0x4581f0
Capabilities:
Initialize winsock library

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x1c8
mov esi, dword [ecx]
mov edi, dword [ecx + 4]
call sym.___main
mov dword [esp + 4], sym.Sig_Interupt_int_
mov dword [esp], 0xf
call sym._my_signal
mov dword [esp + 4], sym.Sig_Interupt_int_
mov dword [esp], 2
call sym._my_signal
lea eax, [ebp - 0x1a8]
mov dword [esp], 0x202
mov dword [esp + 4], eax
call dword [sym.imp.WS2_32.dll_WSAStartup]
sub esp, 8
cmp eax, 0xffffffff
je 0x4585b3
mov dword [esp + 4], 1
mov dword [esp], sym._sig_dispatcher_4
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
sub esp, 8
call sym.Iperf_initialize_active_table__
mov dword [esp + 4], 0
mov dword [esp], 0x4786d4
call sym._pthread_mutex_init
mov dword [esp + 4], 0
mov dword [esp], 0x4786d0
call sym._pthread_cond_init
mov dword [esp + 4], 0
mov dword [esp], 0x4786d8
call sym._pthread_mutex_init
mov dword [0x4786cc], 0
mov dword [0x4786c0], 0
mov dword [0x4786b0], 0
mov dword [esp + 4], 0
mov dword [esp], 0x4786c8
call sym._pthread_mutex_init
mov dword [esp + 4], 0
mov dword [esp], 0x4786c4
call sym._pthread_cond_init
mov dword [esp + 4], 0
mov dword [esp], 0x4786bc
call sym._pthread_mutex_init
mov dword [esp + 4], 0
mov dword [esp], 0x4786b8
call sym._pthread_cond_init
mov dword [esp + 4], 0
mov dword [esp], 0x4786a4
call sym._pthread_mutex_init
mov dword [esp + 4], 0
mov dword [esp], 0x4786a0
call sym._pthread_cond_init
call sym._thread_init
call sym._thread_zeroid
mov dword [0x47869c], eax
mov dword [esp], sym.cleanup__
call dbg.atexit
mov dword [esp], 0x498
call sym.operator_new_unsigned_int_
mov dword [0x4786e4], eax
mov dword [esp], eax
call sym._Settings_Initialize
mov eax, dword [0x4786e4]
mov dword [esp], eax
call sym._Settings_ParseEnvironment
mov eax, dword [0x4786e4]
mov dword [esp + 4], edi
mov dword [esp], esi
mov dword [esp + 8], eax
call sym._Settings_ParseCommandLine
mov ebx, dword [0x4786e4]
mov eax, dword [ebx + 0x84]
cmp eax, 7
je 0x4583bb
cmp eax, 2
jne 0x458616
test byte [ebx + 0x79], 2
je 0x458509
mov edx, dword [ebx + 0x68]
mov eax, 0x314
cmp edx, eax
cmovl edx, eax
mov dword [esp], edx
mov dword [ebp - 0x1bc], edx
call dbg.operator new[](unsigned int)
mov edx, dword [ebp - 0x1bc]
xor ecx, ecx
mov dword [ebx + 0x2c], eax
mov ebx, dword [0x4786e4]
mov eax, dword [ebx + 0x2c]
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
call sym._memset
mov eax, dword [ebx + 0x78]
mov edx, eax
and dh, 0xdf
mov dword [ebx + 0x78], edx
mov edx, dword [ebx + 0x84]
cmp edx, 2
je 0x4584d7
cmp edx, 7
je 0x4585d4
mov dword [esp], 2
call dword [0x459154]
mov dword [esp + 4], str.unknown_mode
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
mov ebx, dword [0x4786e4]
mov esi, 3
xor eax, eax
mov dword [ebp - 0x1b8], eax
lea eax, [ebp - 0x1b8]
mov dword [esp + 4], eax
mov dword [esp + 8], 1
mov dword [esp], ebx
call sym._Settings_Copy
mov eax, dword [ebp - 0x1b8]
xor edx, edx
mov dword [eax + 0x38], edx
mov dword [eax + 0x3c], edx
mov edx, dword [0x4786e4]
mov dword [eax + 0x84], esi
mov dword [eax + 0x40], edx
mov dword [esp], eax
call sym._thread_start_all
mov dword [esp], 0x4786bc
call sym._pthread_mutex_lock
mov dword [0x4786c0], 1
mov dword [esp], 0x4786b8
call sym._pthread_cond_signal
mov dword [esp], 0x4786bc
call sym._pthread_mutex_unlock
call sym._thread_joinall
lea esp, [ebp - 0x10]
xor eax, eax
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
test al, 4
jne 0x45867c
mov eax, dword [ebx + 0x4c]
mov esi, 4
mov dword [ebx + 0x38c], 0x4786a0
mov dword [0x4786b0], eax
mov dword [esp], ebx
call sym._client_init
mov ebx, dword [0x4786e4]
jmp 0x45844f
mov edx, dword [ebx + 0x10]
mov ebx, dword [sym.___acrt_iob_func]
mov dword [ebp - 0x1bc], edx
mov dword [esp], 1
call ebx
mov edx, dword [ebp - 0x1bc]
mov dword [esp + 4], str.Output_from_stdout__but_not_from_stderr__will_be_redirected_to_file__s_n
mov dword [esp], eax
mov dword [esp + 8], edx
call sym.fprintf__iobuf__char_const__..._
mov dword [esp], 1
call ebx
mov dword [esp], eax
call sym._fflush
mov dword [esp], 1
call ebx
mov dword [esp + 4], 0x4642b4
mov dword [esp + 8], eax
mov eax, dword [0x4786e4]
mov eax, dword [eax + 0x10]
mov dword [esp], eax
call sym._freopen
mov ebx, dword [0x4786e4]
test eax, eax
jne 0x4583c5
mov dword [esp + 8], 0xdb
mov dword [esp + 4], 0x464248
mov dword [esp], str.freopen_stdout_n
call sym._warn_errno
mov eax, dword [0x4786e4]
mov dword [esp], eax
call sym._thread_stop
mov ebx, dword [0x4786e4]
jmp 0x4583c5
mov dword [esp + 8], 0x8f
mov dword [esp + 4], 0x464248
mov dword [esp], str.WSAStartup
call sym._warn_errno
jmp 0x4584c9
test al, 0x80
jne 0x4586b5
mov ebx, dword [0x4786e4]
mov eax, dword [ebx + 0x78]
test al, 4
jne 0x45869e
test al, 0x80
jne 0x4584c9
cmp word [ebx + 0xbc], 0
je 0x45844a
mov dword [esp], ebx
call sym._listeners_init
mov ebx, dword [0x4786e4]
jmp 0x45844a
xor ebx, ebx
lea eax, [ebp - 0x1b8]
mov dword [ebp - 0x1b8], 0x46425c
mov dword [ebp - 0x1b4], sym._service_main_8
mov dword [ebp - 0x1b0], ebx
mov dword [ebp - 0x1ac], ebx
mov dword [esp], eax
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherA]
push esi
test eax, eax
jne 0x4584c9
mov ebx, dword [edi]
mov dword [esp], 2
call dword [0x459154]
mov dword [esp + 4], str.Usage:__s___s_c_host___options__nTry___s___help_for_more_information._n
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ebx
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
jmp 0x4584c9
mov dword [esp], 2
call dword [0x459154]
mov dword [esp + 4], str.Iperf_client_cannot_be_run_as_a_daemon_n
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
jmp 0x4584c9
mov dword [esp + 4], edi
mov dword [esp], esi
call sym._CmdInstallService
mov ebx, dword [0x4786e4]
jmp 0x4585f5
call sym._CmdRemoveService
test eax, eax
je 0x4585dc
mov dword [esp], 2
call dword [0x459154]
mov dword [esp + 4], str.IPerf_Service_is_removed._n
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
jmp 0x4585dc