Function at 0x4d9350
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
mov eax, dword [0x50d174]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x94], 0x80
mov eax, dword [ebp + 0x14]
or eax, 0x10
mov dword [ebp + 0x14], eax
cmp dword [ebp + 8], 0
je 0x4d938c
mov ecx, dword [ebp + 8]
push ecx
call fcn.00446440
add esp, 4
test eax, eax
jne 0x4d9391
jmp 0x4d9698
cmp dword [ebp + 0x18], 0
jle 0x4d93b0
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp + 0x1c]
push eax
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jge 0x4d93ae
jmp 0x4d9698
jmp 0x4d93ce
cmp dword [ebp + 0x18], 0
jge 0x4d93ce
push 0x80
mov ecx, dword [ebp + 0x1c]
push ecx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jge 0x4d93ce
jmp 0x4d9698
lea edx, [ebp - 0x94]
push edx
lea eax, [ebp - 0x84]
push eax
mov ecx, dword [ebp + 0x1c]
push ecx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4d9400
push str.getsockname
mov edx, dword [ebp + 0x1c]
push edx
call fcn.00441320
add esp, 8
jmp 0x4d9698
push 0x3c
push 1
call fcn.0042e3b0
add esp, 8
mov dword [ebp - 0x88], eax
cmp dword [ebp - 0x88], 0
jne 0x4d942d
push 0x51c1ec
call fcn.00441280
add esp, 4
jmp 0x4d9698
mov eax, dword [ebp - 0x88]
mov dword [eax], 0x4ffd44
mov ecx, dword [ebp - 0x88]
mov edx, dword [ebp + 0xc]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 0x88]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 0x10], ecx
mov edx, dword [ebp - 0x88]
mov eax, dword [ebp + 0x14]
mov dword [edx + 0x14], eax
mov ecx, 1
mov edx, dword [ebp - 0x88]
mov word [edx + 0x18], cx
mov eax, dword [ebp - 0x88]
mov ecx, dword [eax + 0x20]
or ecx, 1
mov edx, dword [ebp - 0x88]
mov dword [edx + 0x20], ecx
mov eax, dword [ebp + 8]
push eax
call fcn.00446440
add esp, 4
mov ecx, dword [ebp - 0x88]
mov dword [ecx + 0x2c], eax
mov edx, dword [ebp - 0x88]
mov eax, dword [ebp + 0x1c]
mov dword [edx + 0x24], eax
mov ecx, dword [ebp - 0x88]
mov edx, dword [ebp + 8]
mov dword [ecx + 0x28], edx
push 1
mov eax, dword [ebp + 0x1c]
push eax
mov ecx, dword [ebp - 0x88]
mov edx, dword [ecx + 0x2c]
push edx
call fcn.00446320
add esp, 0xc
test eax, eax
jge 0x4d94cf
jmp 0x4d9689
push 1
call fcn.004423b0
add esp, 4
mov ecx, dword [ebp - 0x88]
mov dword [ecx + 4], eax
mov edx, 4
mov eax, dword [ebp - 0x88]
mov word [eax + 0x30], dx
push 4
mov ecx, dword [ebp - 0x88]
movsx edx, word [ecx + 0x30]
push edx
call fcn.0042e3b0
add esp, 8
mov ecx, dword [ebp - 0x88]
mov dword [ecx + 0x38], eax
mov edx, dword [ebp - 0x88]
cmp dword [edx + 0x38], 0
jne 0x4d952d
push str.calloc
call fcn.00441280
add esp, 4
jmp 0x4d965c
mov dword [ebp - 0x8c], 0
jmp 0x4d9548
mov eax, dword [ebp - 0x8c]
add eax, 1
mov dword [ebp - 0x8c], eax
mov ecx, dword [ebp - 0x88]
movsx edx, word [ecx + 0x30]
cmp dword [ebp - 0x8c], edx
jge 0x4d9633
movzx eax, word [ebp - 0x84]
push eax
mov ecx, dword [ebp - 0x88]
push ecx
call fcn.004da020
add esp, 8
mov edx, dword [ebp - 0x88]
mov ecx, dword [edx + 0x38]
mov edx, dword [ebp - 0x8c]
mov dword [ecx + edx*4], eax
mov eax, dword [ebp - 0x88]
mov ecx, dword [eax + 0x38]
mov edx, dword [ebp - 0x8c]
cmp dword [ecx + edx*4], 0
jne 0x4d95ae
push str.Couldnt_create_accepting_socket
call fcn.004413b0
add esp, 4
jmp 0x4d964a
cmp dword [ebp + 0xc], 0
je 0x4d9616
mov eax, dword [ebp - 0x88]
mov ecx, dword [eax + 0x38]
mov edx, dword [ebp - 0x8c]
mov eax, dword [ecx + edx*4]
push eax
call fcn.004da130
add esp, 4
test eax, eax
jge 0x4d9616
push str.Couldnt_start_accepting_on_socket
call fcn.004413b0
add esp, 4
mov ecx, dword [ebp - 0x88]
mov edx, dword [ecx + 0x38]
mov eax, dword [ebp - 0x8c]
mov ecx, dword [edx + eax*4]
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [ebp - 0x88]
mov eax, dword [edx + 0x38]
mov ecx, dword [ebp - 0x8c]
mov edx, dword [eax + ecx*4]
push edx
call fcn.004da0f0
add esp, 4
jmp 0x4d964a
mov eax, dword [ebp - 0x88]
mov cx, word [eax + 0x18]
add cx, 1
mov edx, dword [ebp - 0x88]
mov word [edx + 0x18], cx
jmp 0x4d9539
mov eax, dword [ebp - 0x88]
push eax
call fcn.004d9fa0
add esp, 4
mov eax, dword [ebp - 0x88]
jmp 0x4d969a
mov ecx, dword [ebp - 0x88]
mov edx, dword [ecx + 0x38]
push edx
call fcn.0042e530
add esp, 4
mov eax, dword [ebp - 0x88]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x90], ecx
cmp dword [ebp - 0x90], 0
je 0x4d9685
push 1
mov edx, dword [ebp - 0x90]
push edx
call fcn.004423e0
add esp, 8
xor eax, eax
jne 0x4d965c
mov ecx, dword [ebp - 0x88]
push ecx
call fcn.0042e530
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042a04a
mov esp, ebp
pop ebp
ret