Function at 0x52da30
Capabilities:
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
sub esp, 0x80
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 4]
xor esi, esi
cmp eax, esi
mov ebp, edx
mov dword [esp + 0x18], ebp
mov ebx, 1
mov dword [esp + 0x14], esi
je 0x52da93
cmp byte [eax], 0x2d
jne 0x52da93
push 0x64
push eax
call fcn.005912e0
add esp, 8
test eax, eax
je 0x52da6a
mov esi, ebx
test esi, esi
mov ebx, 2
je 0x52da93
mov eax, dword [edi + 8]
test eax, eax
je 0x52da9a
push eax
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x52db34
mov dword [esp + 0x14], ebx
mov ebx, 3
mov ecx, dword [edi + ebx*4]
test ecx, ecx
jne 0x52dab2
mov edx, dword [edi]
push 0
push 0
xor ecx, ecx
call fcn.004803b0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x80
ret
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x52dab7
sub eax, esi
cmp eax, 0x5a
jbe 0x52daf6
xor edx, edx
mov ecx, 0x1452
call fcn.0041f1a0
push eax
mov eax, dword [edi + ebx*4]
push eax
push str.__socklisten:__s__s
push 0x5cbac0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x80
ret
call fcn.0052cde0
test eax, eax
je 0x52db12
xor edx, edx
mov ecx, 0x1453
call fcn.0041f1a0
mov ecx, dword [edi + ebx*4]
push eax
push ecx
jmp 0x52dad6
mov eax, dword [edi + ebx*4 + 4]
test eax, eax
mov dword [esp + 0x10], 0
je 0x52db4c
push eax
call fcn.005915c3
add esp, 4
test ax, ax
mov dword [esp + 0x10], eax
ja 0x52db4c
mov edx, dword [edi]
push 3
push 0
xor ecx, ecx
call fcn.004803b0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x80
ret
call fcn.0052cb80
mov esi, eax
test esi, esi
jne 0x52db6e
mov edx, dword [edi]
push 2
push eax
xor ecx, ecx
call fcn.004803b0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x80
ret
mov edx, dword [edi + ebx*4]
push edx
mov edx, 0x64
mov ecx, esi
call fcn.00420d70
lea ebx, [ebp + 0x15d8]
push ebx
lea ecx, [esi + 0x64]
mov edx, 0x64
call fcn.00420d70
lea ebp, [esi + 0xc8]
push ebx
mov edx, 0x64
mov ecx, ebp
call fcn.00420d70
mov ax, word [esp + 0x10]
push 0
mov word [esi + 0x12c], ax
mov dword [esi + 0x1b0], 1
call fcn.00591e16
mov ebx, dword [esp + 0x18]
add esp, 4
test ebx, ebx
mov dword [esi + 0x1e0], eax
mov dword [esi + 0x1e4], eax
je 0x52dbfd
mov ecx, dword [edi + ebx*4]
push ecx
mov edx, 0x64
mov ecx, ebp
call fcn.00420d70
mov edx, dword [edi + ebx*4]
push edx
lea ecx, [esi + 0x12e]
mov edx, 0x64
call fcn.00420d70
cmp word [esp + 0x10], 0
mov eax, dword [esp + 0x18]
mov dword [esi + 0x204], eax
jne 0x52dcb4
push 0x5f3560
mov edx, 0x64
lea ecx, [esp + 0x30]
call fcn.00420d70
mov al, byte [esi + 0x12e]
test al, al
mov ebx, dword [0x5f3558]
lea edi, [esi + 0x12e]
je 0x52dc56
push edi
mov edx, 0x64
mov ecx, 0x5f3560
call fcn.00420d70
mov dword [0x5f3558], 2
mov dx, word [0x5bfd6c]
mov cx, word [0x5bfd68]
push 0
push 0
push 0
lea eax, [esi + 0x12c]
push eax
call fcn.00515a30
lea ecx, [esp + 0x2c]
push ecx
mov edx, 0x64
mov ecx, 0x5f3560
mov dword [esi + 0x200], eax
call fcn.00420d70
mov dword [0x5f3558], ebx
cmp dword [esi + 0x200], 0xffffffff
jne 0x52dda6
mov ecx, esi
call fcn.0052ccd0
mov ecx, 0x1454
jmp 0x52dd7e
push 0
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 0x200], eax
jne 0x52dcdc
mov ecx, esi
call fcn.0052ccd0
mov ecx, 0x1455
jmp 0x52dd7e
push 0x5f3560
mov edx, 0x64
lea ecx, [esp + 0x30]
call fcn.00420d70
mov al, byte [esi + 0x12e]
test al, al
mov ebp, dword [0x5f3558]
lea edi, [esi + 0x12e]
je 0x52dd1f
push edi
mov edx, 0x64
mov ecx, 0x5f3560
call fcn.00420d70
mov dword [0x5f3558], 2
mov dx, word [esi + 0x12c]
mov ecx, dword [esi + 0x200]
call fcn.00515960
lea edx, [esp + 0x2c]
push edx
mov edx, 0x64
mov ecx, 0x5f3560
mov ebx, eax
call fcn.00420d70
test ebx, ebx
mov dword [0x5f3558], ebp
jne 0x52dd5f
mov ecx, esi
call fcn.0052ccd0
mov ecx, 0x1456
jmp 0x52dd7e
mov eax, dword [esi + 0x200]
push 5
push eax
call dword [sym.imp.WSOCK32.dll_listen]
test eax, eax
je 0x52dda6
mov ecx, esi
call fcn.0052ccd0
mov ecx, 0x145a
xor edx, edx
call fcn.0041f1a0
push eax
push str.__socklisten:__s
push 0x5cbac0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x80
ret
mov ecx, dword [0x5f92ec]
mov edx, dword [esi + 0x200]
push 8
push 0x8037
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
mov eax, dword [esi + 0x200]
cmp eax, 0xffffffff
je 0x52de13
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x20]
push edx
push eax
mov dword [esp + 0x24], 0x10
call dword [sym.imp.WSOCK32.dll_getsockname]
test eax, eax
jne 0x52de13
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.WSOCK32.dll_inet_ntoa]
push eax
mov edx, 0x64
mov ecx, edi
call fcn.00420d70
mov ecx, dword [esp + 0x1e]
push ecx
call dword [sym.imp.WSOCK32.dll_ntohs]
mov word [esi + 0x192], ax
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x80
ret