Function at 0x40de20
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ed16a
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x51f584]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor esi, esi
push 0x28
mov dword [ebp - 0x2c], esi
call fcn.004826d0
add esp, 4
cmp eax, esi
je 0x40e01e
mov dword [ebp - 0x30], eax
mov dword [eax], eax
mov eax, dword [ebp - 0x30]
mov dword [eax + 4], eax
mov eax, dword [ebp - 0x30]
mov dword [eax + 8], eax
mov eax, dword [ebp - 0x30]
mov byte [eax + 0x20], 1
mov ecx, dword [ebp - 0x30]
mov byte [ecx + 0x21], 1
lea eax, [ebp - 0x34]
mov dword [ebp - 4], esi
call fcn.0040e130
mov ecx, dword [ebp - 0x2c]
cmp ecx, esi
jne 0x40dec5
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
push eax
push ecx
lea esi, [ebp - 0x24]
lea eax, [ebp - 0x34]
call fcn.0040e2f0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x30]
push edx
call fcn.00482674
add esp, 4
xor eax, eax
xor edx, edx
jmp 0x40df00
mov edx, dword [ebp - 0x30]
mov eax, dword [edx]
mov edi, dword [eax + 0x18]
mov ebx, dword [eax + 0x1c]
cmp ecx, 1
jne 0x40df1c
push edx
mov dword [ebp - 4], 2
push eax
lea esi, [ebp - 0x24]
lea eax, [ebp - 0x34]
call fcn.0040e2f0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x30]
push eax
call fcn.00482674
add esp, 4
mov eax, edi
mov edx, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004822c9
mov esp, ebp
pop ebp
ret
push esi
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40df54
mov dword [ebp - 4], 3
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
push eax
push ecx
lea esi, [ebp - 0x24]
lea eax, [ebp - 0x34]
call fcn.0040e2f0
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x30]
push ecx
jmp 0x40def4
xor eax, eax
mov edx, 2
mov dword [ebp - 0x20], eax
push 0x50
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov word [ebp - 0x20], dx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1e], ax
call fcn.0040e0c0
test eax, eax
jne 0x40df93
mov dword [ebp - 4], 4
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
push eax
push ecx
jmp 0x40dede
push 0x10
lea ecx, [ebp - 0x20]
push ecx
push esi
mov dword [ebp - 0x1c], eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40dfd8
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp - 4], 5
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
push eax
push ecx
lea esi, [ebp - 0x24]
lea eax, [ebp - 0x34]
call fcn.0040e2f0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x30]
push edx
jmp 0x40def4
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x20]
push ecx
push esi
mov dword [ebp - 0x38], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
mov edx, dword [ebp - 0x1c]
push esi
mov dword [ebp - 0x3c], edx
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [ebp - 0x3c]
lea ecx, [ebp - 0x34]
call fcn.0040e260
mov edi, dword [eax]
mov ebx, dword [eax + 4]
mov dword [ebp - 4], 6
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
push eax
push ecx
jmp 0x40dede
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x24], esi
call fcn.004827e9
push 0x518390
lea edx, [ebp - 0x48]
push edx
mov dword [ebp - 0x48], vtable.std::bad_alloc.0
call fcn.0048ac5f
int3