Function at 0x40e490
Capabilities:
Get hostname
Get session user name
Get socket status
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x978
push ebx
push ebp
push esi
lea eax, [esp + 0x58]
push edi
xor esi, esi
push eax
mov dword [esp + 0x30], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], esi
call fcn.0041bab0
add esp, 4
test eax, eax
je 0x40e4c9
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x978
ret
push str.127.0.0.1
call sub.WSOCK32.dll_inet_addr
push 0x11
push 2
push 2
mov dword [esp + 0xac], eax
call fcn.0041cda0
add esp, 0xc
lea ecx, [esp + 0x524]
mov edi, 1
mov dword [esp + 0x68], eax
push 0x64
push ecx
mov dword [esp + 0x20], edi
call sub.WSOCK32.dll_gethostname
mov ebp, eax
cmp ebp, 0xffffffff
je 0x40e600
lea edx, [esp + 0x524]
push edx
call sub.WSOCK32.dll_gethostbyname
mov ebx, eax
test ebx, ebx
je 0x40e600
mov eax, dword [ebx + 0xc]
xor edi, edi
mov dword [esp + 0x10], edi
cmp dword [eax], 0
je 0x40e598
xor esi, esi
mov eax, dword [eax + edi*4]
mov ecx, dword [eax]
mov al, cl
mov dword [esp + esi + 0xa4], ecx
cmp al, 0x7f
jne 0x40e568
mov al, byte [esp + esi + 0xa5]
test al, al
jne 0x40e568
mov al, byte [esp + esi + 0xa6]
test al, al
jne 0x40e568
cmp byte [esp + esi + 0xa7], 1
je 0x40e586
push 0x11
push 2
push 2
call fcn.0041cda0
mov ecx, dword [esp + 0x24]
add esp, 0xc
inc ecx
mov dword [esp + esi + 0x6c], eax
mov dword [esp + 0x18], ecx
add esi, 4
mov eax, dword [ebx + 0xc]
inc edi
cmp dword [eax + edi*4], 0
jne 0x40e536
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x10], edi
mov edi, 1
push 0x11
push 2
push 2
call fcn.0041cda0
add esp, 0xc
cmp eax, 0xffffffff
mov dword [0x42cdec], eax
jne 0x40e606
mov eax, dword [0x4307e8]
test eax, eax
je 0x40e5df
push str.Server_socket_open_failed_n
push 0
call fcn.0041c060
call fcn.0041cfc0
push eax
push str.socket:_winsock_error_code_:__ld_n
push 0
call fcn.0041c060
add esp, 0x14
push 0xe5
push str.spnsrvnt.c
push 0x3f
call fcn.0041c9d0
mov esi, edi
add esp, 0xc
mov dword [esp + 0x1c], esi
mov ebp, 0x3f
jmp 0x40e625
mov dword [esp + 0x24], edi
jmp 0x40e59d
mov eax, dword [0x430420]
push edi
or eax, edi
push 0x430400
push 0x43c880
mov dword [0x430420], eax
call fcn.0041c1f0
add esp, 0xc
mov eax, dword [0x4307e8]
test eax, eax
je 0x40e640
test esi, esi
jne 0x40e640
push str.Opened_Server_socket_n
push esi
call fcn.0041c060
add esp, 8
push 0x3e8
push 2
push 6
call fcn.0041cda0
add esp, 0xc
cmp eax, 0xffffffff
mov dword [0x42cde8], eax
jne 0x40e6a4
mov eax, dword [0x4307e8]
test eax, eax
je 0x40e685
push str.Server_IPX_socket_open_failed_n
push 0
call fcn.0041c060
call fcn.0041cfc0
push eax
push str.IPX_socket:__ld_n
push 0
call fcn.0041c060
add esp, 0x14
push 0xfb
push str.spnsrvnt.c
push 0x3f
call fcn.0041c9d0
add esp, 0xc
mov dword [esp + 0x2c], edi
mov ebp, 0x3f
jmp 0x40e6b0
mov eax, dword [0x430420]
or al, 2
mov dword [0x430420], eax
mov eax, dword [0x4307e8]
mov edi, dword [esp + 0x98c]
test eax, eax
je 0x40e6d4
test esi, esi
jne 0x40e6d4
push str.Opened_Server_IPX_socket_n
push esi
call fcn.0041c060
add esp, 8
jmp 0x40e6f8
cmp esi, 1
jne 0x40e6f0
cmp dword [esp + 0x2c], esi
jne 0x40e7a3
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x978
ret
test esi, esi
jne 0x40e7a3
xor edx, edx
push edi
mov dword [esp + 0x38], edx
mov word [esp + 0x38], 2
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], edx
call sub.WSOCK32.dll_htons
mov word [esp + 0x36], ax
mov eax, dword [0x4307e8]
test eax, eax
je 0x40e73e
mov eax, dword [esp + 0x36]
and eax, 0xffff
push eax
push str.Server_will_run_on_port__d_n
push 0
call fcn.0041c060
add esp, 0xc
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x40e8da
mov eax, dword [esp + 0x18]
xor esi, esi
test eax, eax
mov dword [esp + 0x10], esi
jle 0x40e787
mov ebx, eax
mov eax, dword [esp + esi*4 + 0x68]
mov ecx, dword [esp + esi*4 + 0xa0]
lea edx, [esp + 0x34]
push 0x10
push edx
push eax
mov dword [esp + 0x44], ecx
call sub.WSOCK32.dll_bind
test eax, eax
jl 0x40e879
inc esi
cmp esi, ebx
jl 0x40e75a
mov dword [esp + 0x10], esi
mov eax, dword [0x4307e8]
test eax, eax
je 0x40e79f
push str.Bound_Server_Socket_n
push 0
call fcn.0041c060
add esp, 8
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x40e9d1
xor eax, eax
push edi
mov dword [esp + 0x48], eax
mov word [esp + 0x48], 6
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov word [esp + 0x54], ax
call fcn.0041ce40
mov word [esp + 0x54], ax
mov eax, dword [0x4307e8]
add esp, 4
test eax, eax
je 0x40e7fa
mov ecx, dword [esp + 0x50]
and ecx, 0xffff
push ecx
push str.Server_will_run_on_IPX_socket__u_n
push 0
call fcn.0041c060
add esp, 0xc
mov eax, dword [0x42cde8]
lea edx, [esp + 0x44]
push 0xe
push edx
push eax
call fcn.0041cdd0
add esp, 0xc
cmp eax, 0xffffffff
jne 0x40e9aa
mov eax, dword [0x4307e8]
test eax, eax
je 0x40e842
push str.Server_couldnt_bind_to_IPX_socket_n
push 0
call fcn.0041c060
call fcn.0041cfc0
push eax
push str.IPX_bind:__ld_n
push 0
call fcn.0041c060
add esp, 0x14
call fcn.0041ffa1
mov esi, eax
call fcn.0041cfc0
cmp eax, 0x2740
mov dword [esi], eax
jne 0x40e970
push 0x16a
push str.spnsrvnt.c
push 0x74
call fcn.0041c9d0
add esp, 0xc
mov esi, 0x74
jmp 0x40e989
mov dword [esp + 0x10], esi
call fcn.0041ffa1
mov esi, eax
call fcn.0041cfc0
cmp eax, 0x2740
mov dword [esi], eax
jne 0x40e8b6
push 0x128
push str.spnsrvnt.c
push 0x74
call fcn.0041c9d0
add esp, 0xc
mov eax, 0x74
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x978
ret
push 0x12d
push str.spnsrvnt.c
push 0x6e
call fcn.0041c9d0
add esp, 0xc
mov eax, 0x6e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x978
ret
push 0
call fcn.0041ce70
mov edx, dword [0x42cdec]
add esp, 4
lea ecx, [esp + 0x34]
mov dword [esp + 0x38], eax
push 0x10
push ecx
push edx
call sub.WSOCK32.dll_bind
test eax, eax
jge 0x40e787
mov eax, dword [0x4307e8]
test eax, eax
je 0x40e92d
push str.Server_couldnt_bind_to_socket_n
push 0
call fcn.0041c060
call fcn.0041cfc0
push eax
push str.bind:_winsock_error_code_:__ld_n
push 0
call fcn.0041c060
add esp, 0x14
call fcn.0041ffa1
mov esi, eax
call fcn.0041cfc0
cmp eax, 0x2740
mov dword [esi], eax
jne 0x40e94c
push 0x144
jmp 0x40e897
push 0x149
push str.spnsrvnt.c
push 0x6e
call fcn.0041c9d0
add esp, 0xc
mov eax, 0x6e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x978
ret
push 0x16f
push str.spnsrvnt.c
push 0x6e
call fcn.0041c9d0
add esp, 0xc
mov esi, 0x6e
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x40e99d
mov ecx, dword [0x42cdec]
push ecx
call sub.WSOCK32.dll_closesocket
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x978
ret
push 0x1e
push 0x4303e0
call fcn.0041c4c0
mov eax, dword [0x4307e8]
add esp, 8
test eax, eax
je 0x40e9d1
push str.Bound_Server_IPX_Socket_n
push 0
call fcn.0041c060
add esp, 8
cmp esi, 1
jne 0x40e9fb
mov edi, 0x4303e0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, 0x43c880
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x4303dc
call fcn.0041af30
push 0
push 0
push 0x40000004
call fcn.00402a70
add esp, 0x10
lea eax, [esp + 0x20]
lea ecx, [esp + 0xa0]
mov byte [esp + 0xa0], 0
push eax
push ecx
mov dword [esp + 0x28], 0x40
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
call fcn.0041b540
lea edx, [esp + 0x8a8]
push edx
push 0
push eax
lea eax, [esp + 0xac]
push eax
push 0x43c880
push 0
push 0
push 5
call fcn.00410a90
lea ecx, [esp + 0x8c8]
push ecx
call fcn.0041bdc0
add esp, 0x24
mov ebp, dword [esp + 0x20]
mov eax, dword [0x4307e8]
test eax, eax
je 0x40ea8d
push str.Waiting_for_connections_n
push 0
call fcn.0041c060
add esp, 8
mov esi, dword [esp + 0x2c]
mov ecx, 0x68
xor eax, eax
lea edi, [esp + 0xe0]
test esi, esi
rep stosd dword es:[edi], eax
mov dword [esp + 0x30], 0x10
mov dword [esp + 0x420], eax
jne 0x40eacd
mov edx, dword [0x42cde8]
mov eax, 1
mov dword [esp + 0x424], edx
mov dword [esp + 0x420], eax
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jne 0x40eb43
mov edi, dword [esp + 0x24]
test edi, edi
jne 0x40eb1c
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x10], edi
test ebx, ebx
jle 0x40eb4b
lea ecx, [esp + 0x68]
mov edx, ebx
mov dword [esp + 0x10], ebx
cmp eax, 0x40
jae 0x40eb10
mov esi, dword [ecx]
mov dword [esp + eax*4 + 0x424], esi
mov eax, dword [esp + 0x420]
inc eax
mov dword [esp + 0x420], eax
add ecx, 4
dec edx
jne 0x40eaf3
mov esi, dword [esp + 0x2c]
jmp 0x40eb4b
cmp eax, 0x40
jae 0x40eb3d
mov ecx, dword [0x42cdec]
mov dword [esp + eax*4 + 0x424], ecx
mov eax, dword [esp + 0x420]
inc eax
mov dword [esp + 0x420], eax
mov ebx, dword [esp + 0x18]
jmp 0x40eb4b
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x24]
mov edx, dword [0x42cdf0]
lea eax, [esp + 0x54]
push eax
mov dword [esp + 0x58], edx
mov edx, dword [esp + ebx*4 + 0x6c]
push 0
lea ecx, [esp + 0x428]
push 0
push ecx
push edx
mov dword [esp + 0x6c], 0
call sub.WSOCK32.dll_select
cmp eax, 0xffffffff
je 0x40f431
test eax, eax
je 0x40f414
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x40ec17
test esi, esi
jne 0x40ec29
mov ecx, dword [0x42cde8]
lea eax, [esp + 0x420]
push eax
push ecx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x40ebc0
mov edx, dword [0x42cde8]
jmp 0x40ec6e
cmp edi, 1
jne 0x40ebd4
mov eax, dword [0x42cdec]
mov dword [0x43c8c0], eax
jmp 0x40ec74
xor edi, edi
test ebx, ebx
mov dword [esp + 0x10], edi
jle 0x40ec74
lea esi, [esp + 0x68]
mov edx, dword [esi]
lea ecx, [esp + 0x420]
push ecx
push edx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x40ec08
inc edi
add esi, 4
cmp edi, ebx
jl 0x40ebe6
mov dword [esp + 0x10], edi
jmp 0x40ec74
mov eax, dword [esp + edi*4 + 0x68]
mov dword [esp + 0x10], edi
mov dword [0x43c8c0], eax
jmp 0x40ec74
test esi, esi
jne 0x40ec29
mov ecx, dword [0x42cde8]
mov dword [0x43c8c0], ecx
jmp 0x40ec74
cmp edi, 1
jne 0x40ec36
mov edx, dword [0x42cdec]
jmp 0x40ec6e
xor edi, edi
test ebx, ebx
mov dword [esp + 0x10], edi
jle 0x40ec74
lea esi, [esp + 0x68]
mov ecx, dword [esi]
lea eax, [esp + 0x420]
push eax
push ecx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x40ec66
inc edi
add esi, 4
cmp edi, ebx
jl 0x40ec44
mov dword [esp + 0x10], edi
jmp 0x40ec74
mov edx, dword [esp + edi*4 + 0x68]
mov dword [esp + 0x10], edi
mov dword [0x43c8c0], edx
mov ecx, 0x68
xor eax, eax
lea edi, [esp + 0x280]
lea edx, [esp + 0x280]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x30]
lea ecx, [esp + 0x90]
push eax
mov eax, dword [0x43c8c0]
push ecx
push 0
push 0x1a0
push edx
push eax
call sub.WSOCK32.dll_recvfrom
mov ebx, eax
test ebx, ebx
jge 0x40ecc6
call fcn.0041cfc0
cmp eax, 0x2738
jne 0x40ee15
mov ebx, 0x1a0
mov eax, dword [0x4307e8]
test eax, eax
je 0x40ecde
push str.Got_a_message_n
push 0
call fcn.0041c060
add esp, 8
mov ecx, 0x68
xor eax, eax
lea edi, [esp + 0xe0]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x280]
push ecx
call fcn.0041ce90
mov edx, dword [esp + 0x288]
mov dword [esp + 0xe4], eax
push edx
call fcn.0041ce90
mov dword [esp + 0xec], eax
mov eax, dword [esp + 0x290]
push eax
call fcn.0041ce90
mov ecx, dword [esp + 0x298]
mov dword [esp + 0xf4], eax
push ecx
call fcn.0041ce90
mov dword [esp + 0xfc], eax
lea edx, [esp + 0x2a0]
push 0x190
lea eax, [esp + 0x104]
push edx
push eax
call fcn.0041fe30
mov eax, dword [0x4307e8]
add esp, 0x1c
test eax, eax
je 0x40edd7
push str.Message_Received._Contents:__n
push 0
call fcn.0041c060
mov ecx, dword [esp + 0xec]
push ecx
push str._t_Seq_Num_t_t__d_n
push 0
call fcn.0041c060
mov edx, dword [esp + 0xf4]
push edx
push str._t_Msg_Ver_t_t_d_n
push 0
call fcn.0041c060
mov eax, dword [esp + 0x108]
push eax
push str._t_Code_Seq_t_t_d_n
push 0
call fcn.0041c060
mov ecx, dword [esp + 0x118]
push ecx
push str._t_Client_Pid_t_t_d_n
push 0
call fcn.0041c060
lea edx, [esp + 0x128]
push edx
push str._t_Info_t_t_t__s_n
push 0
call fcn.0041c060
add esp, 0x44
cmp dword [esp + 0xec], 0xffffffff
jne 0x40eff4
mov eax, dword [0x43c8c0]
mov ecx, 0x64
lea esi, [esp + 0xf0]
lea edi, [esp + 0x588]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [0x42cde8]
mov dword [esp + 0x14], 5
cmp eax, ecx
jne 0x40ee4d
push 2
jmp 0x40ee4f
mov eax, dword [0x4307e8]
test eax, eax
je 0x40ea8d
call fcn.0041cfc0
push eax
push str.recvfrom_failed:__winsock_error_code_:__ld_n
push 0
call fcn.0041c060
push 0x249
push str.spnsrvnt.c
push 0x70
call fcn.0041c9d0
add esp, 0x18
jmp 0x40ea75
push 1
call fcn.0040c710
add esp, 4
lea ecx, [esp + 0x28]
lea edx, [esp + 0x5c]
push ecx
push edx
push str.myServerProcLck
call fcn.0041b0f0
add esp, 0xc
test eax, eax
je 0x40ee8b
push 0x285
push str.spnsrvnt.c
push 0x72
call fcn.0041c9d0
add esp, 0xc
jmp 0x40ea75
lea eax, [esp + 0x14]
lea ecx, [esp + 0x718]
push eax
lea edx, [esp + 0x58c]
push ecx
push edx
call fcn.00405730
mov eax, dword [esp + 0x20]
add esp, 0xc
cmp eax, 1
jne 0x40efca
mov ecx, 0x64
lea esi, [esp + 0x718]
lea edi, [esp + 0xf0]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x68
lea edi, [esp + 0x280]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0xe0]
push eax
call fcn.0041ce70
mov ecx, dword [esp + 0xe8]
mov dword [esp + 0x284], eax
push ecx
call fcn.0041ce70
mov edx, dword [esp + 0xf0]
mov dword [esp + 0x28c], eax
push edx
call fcn.0041ce70
mov dword [esp + 0x294], eax
mov eax, dword [esp + 0xf8]
push eax
call fcn.0041ce70
mov dword [esp + 0x29c], eax
lea edi, [esp + 0x100]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x2a0]
mov eax, ecx
mov esi, edi
mov edi, edx
push 0x10
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [0x43c8c0]
and ecx, 3
lea edx, [esp + 0x294]
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xa4]
push ecx
push 0
push ebx
push edx
push eax
call fcn.0041ce00
add esp, 0x28
cmp eax, ebx
je 0x40efe2
push 0x298
push str.spnsrvnt.c
push 0x3e
call fcn.0041c9d0
mov ecx, dword [esp + 0x34]
push ecx
call fcn.0041b150
mov eax, dword [0x4307e8]
add esp, 0x10
test eax, eax
je 0x40efe2
call fcn.0041cfc0
push eax
push str.Warning:_Reply_to_broadcast_failed:_winsock_error_code_:__ld_n
push 0
call fcn.0041c060
mov edx, dword [esp + 0x34]
add esp, 0xc
push edx
call fcn.0041b150
add esp, 4
jmp 0x40ea75
mov eax, dword [0x4307e8]
test eax, eax
je 0x40efe2
push str.processMessage_is_asking_us_to_silently_ignore_this_msg__so_am_dropping_it__n
push 0
call fcn.0041c060
add esp, 8
mov edx, dword [esp + 0x28]
push edx
call fcn.0041b150
add esp, 4
jmp 0x40ea75
mov eax, dword [0x4307e8]
mov esi, dword [0x4303dc]
xor edi, edi
test eax, eax
je 0x40f013
push str.Not_a_broadacast__Looking_to_see_if_it_is_an_old_client__n
push edi
call fcn.0041c060
add esp, 8
push esi
call fcn.0041af00
add esp, 4
test eax, eax
jne 0x40f2a6
test edi, edi
jne 0x40f09b
push esi
call fcn.0041af10
mov ecx, dword [esp + 0xf0]
mov ebp, eax
add esp, 4
mov eax, dword [ebp + 0x14]
cmp eax, ecx
jne 0x40f075
lea ecx, [esp + 0x90]
push ecx
push ebp
call fcn.0040ca60
add esp, 8
test eax, eax
je 0x40f075
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x40f06e
mov eax, dword [esp + 0x10]
mov edx, dword [ebp + 0x1c4]
cmp edx, dword [esp + eax*4 + 0x68]
jne 0x40f075
mov edi, 1
jmp 0x40f080
push esi
call fcn.0041af20
add esp, 4
mov esi, eax
push esi
call fcn.0041af00
add esp, 4
test eax, eax
je 0x40f024
test edi, edi
mov dword [esp + 0x20], ebp
je 0x40f2a6
jmp 0x40f09f
mov dword [esp + 0x20], ebp
mov ecx, dword [ebp + 0x18]
mov eax, dword [esp + 0xe4]
inc ecx
and ecx, 0x1fff
cmp ecx, eax
je 0x40f1ef
cmp eax, 1
je 0x40f1ef
mov ecx, dword [0x4307e8]
test ecx, ecx
je 0x40f0e1
push str.Got_old_sequence_number_n
push 0
call fcn.0041c060
mov eax, dword [esp + 0xec]
add esp, 8
cmp dword [ebp + 0x28], 0xffffff9c
je 0x40ea75
cmp dword [ebp + 0x18], eax
jne 0x40ea75
mov eax, dword [0x4307e8]
test eax, eax
je 0x40f10c
push str.Resending_packet_n
push 0
call fcn.0041c060
add esp, 8
mov ecx, 0x68
xor eax, eax
lea edi, [esp + 0x280]
rep stosd dword es:[edi], eax
mov edx, dword [ebp + 0x24]
push edx
call fcn.0041ce70
mov dword [esp + 0x284], eax
mov eax, dword [ebp + 0x28]
push eax
call fcn.0041ce70
mov dword [esp + 0x28c], eax
mov ecx, dword [ebp + 0x2c]
push ecx
call fcn.0041ce70
mov dword [esp + 0x294], eax
mov edx, dword [ebp + 0x30]
push edx
call fcn.0041ce70
mov dword [esp + 0x29c], eax
lea edi, [ebp + 0x34]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
lea edx, [esp + 0x290]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x10
mov eax, ecx
mov esi, edi
mov edi, edx
push ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [0x43c8c0]
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0x20]
lea edx, [esp + 0x28c]
push ecx
push edx
push eax
call sub.WSOCK32.dll_sendto
cmp eax, dword [ebp + 0x20]
je 0x40ea75
push 0x313
push str.spnsrvnt.c
push 0x3e
call fcn.0041c9d0
mov eax, dword [0x4307e8]
add esp, 0xc
test eax, eax
je 0x40ea8d
call fcn.0041ffa1
mov ecx, dword [eax]
mov edx, dword [ecx*4 + 0x42ee80]
push edx
push str.sendto_failed:__s_n
push 0
call fcn.0041c060
add esp, 0xc
jmp 0x40ea75
mov ecx, 0x64
lea esi, [esp + 0xf0]
lea edi, [esp + 0x588]
mov dword [ebp + 0x18], eax
mov dword [ebp + 0x28], 0xffffff9c
mov eax, dword [0x43c8c0]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [0x42cde8]
mov dword [esp + 0x14], 5
cmp eax, ecx
jne 0x40f229
push 2
jmp 0x40f22b
push 1
call fcn.0040c710
add esp, 4
lea ecx, [esp + 0x28]
lea edx, [esp + 0x5c]
push ecx
push edx
push str.myServerProcLck
call fcn.0041b0f0
add esp, 0xc
test eax, eax
je 0x40f267
push 0x2f0
push str.spnsrvnt.c
push 0x72
call fcn.0041c9d0
add esp, 0xc
jmp 0x40ea75
lea eax, [esp + 0x14]
lea ecx, [esp + 0x718]
push eax
lea edx, [esp + 0x58c]
push ecx
push edx
call fcn.00405730
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x724]
push eax
push ecx
push ebp
call fcn.0040c770
mov edx, dword [esp + 0x40]
push edx
call fcn.0041b150
add esp, 0x1c
jmp 0x40ea75
push 0x1c8
call fcn.0041f87c
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40f2ef
mov eax, dword [0x4307e8]
test eax, eax
je 0x40f2d6
call fcn.0041cfc0
push eax
push str.malloc_failed:_winsock_error_code_:__ld_n
push ebp
call fcn.0041c060
add esp, 0xc
push 0x32b
push str.spnsrvnt.c
push 0x40
call fcn.0041c9d0
add esp, 0xc
jmp 0x40ea71
mov ecx, ebp
xor eax, eax
lea esi, [esp + 0x90]
mov edi, ebp
mov dword [ecx], eax
push ebp
push 0x4303dc
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov ecx, dword [esp + 0x38]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0xe8]
mov dword [ebp + 0x10], eax
mov ecx, dword [esp + 0xec]
mov dword [ebp + 0x18], ecx
mov edx, dword [esp + 0xf0]
mov ecx, dword [esp + 0x18]
mov dword [ebp + 0x1c], edx
mov eax, dword [esp + 0xf4]
mov dword [ebp + 0x28], 0xffffff9c
mov edx, dword [esp + ecx*4 + 0x70]
mov dword [ebp + 0x14], eax
mov dword [ebp + 0x20], ebx
mov dword [ebp + 0x1c4], edx
call fcn.0041af40
mov eax, dword [0x43c8c0]
mov ecx, 0x64
lea esi, [esp + 0xf8]
lea edi, [esp + 0x590]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [0x42cde8]
add esp, 8
cmp eax, ecx
mov dword [esp + 0x14], 1
jne 0x40f397
push 2
jmp 0x40f399
push 1
call fcn.0040c710
add esp, 4
lea ecx, [esp + 0x28]
lea edx, [esp + 0x5c]
push ecx
push edx
push str.myServerProcLck
call fcn.0041b0f0
add esp, 0xc
test eax, eax
je 0x40f3d5
push 0x34b
push str.spnsrvnt.c
push 0x72
call fcn.0041c9d0
add esp, 0xc
jmp 0x40ea71
lea eax, [esp + 0x14]
lea ecx, [esp + 0x718]
push eax
lea edx, [esp + 0x58c]
push ecx
push edx
call fcn.00405730
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x724]
push eax
push ecx
push ebp
call fcn.0040c770
mov edx, dword [esp + 0x40]
push edx
call fcn.0041b150
add esp, 0x1c
jmp 0x40ea71
mov ecx, 0x64
xor eax, eax
lea edi, [esp + 0x588]
mov dword [esp + 0x14], 5
rep stosd dword es:[edi], eax
jmp 0x40ea75
call fcn.0041ffa1
cmp dword [eax], 4
je 0x40ea75
mov eax, dword [0x4307e8]
test eax, eax
je 0x40f466
call fcn.0041ffa1
mov eax, dword [eax]
mov ecx, dword [eax*4 + 0x42ee80]
push ecx
push str.select_failed:__s_n
push 0
call fcn.0041c060
add esp, 0xc
push 0x1c5
push str.spnsrvnt.c
push 0x6d
call fcn.0041c9d0
add esp, 0xc
jmp 0x40ea75