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

Disassembly:
sub esp, 0x7c
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x90]
mov eax, dword [edi + 4]
xor ebp, ebp
xor esi, esi
cmp eax, ebp
mov ebx, 1
mov dword [esp + 0x14], ebp
je 0x547dde
cmp byte [eax], 0x2d
jne 0x547dde
push 0x64
push eax
call fcn.005cbf10
add esp, 8
test eax, eax
je 0x547d88
mov esi, ebx
cmp esi, ebp
mov ebx, 2
je 0x547dde
mov eax, dword [edi + 8]
cmp eax, ebp
jne 0x547dae
mov eax, dword [edi]
push ebp
push ebp
push eax
push ebp
call fcn.0048a440
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
push eax
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x547dd1
mov ecx, dword [edi]
push 3
push ebp
push ecx
push ebp
call fcn.0048a440
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
mov dword [esp + 0x14], 2
mov ebx, 3
mov edx, dword [edi + ebx*4]
cmp edx, ebp
jne 0x547dfb
mov edx, dword [edi]
push ebp
push ebp
push edx
push ebp
call fcn.0048a440
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x547e00
sub eax, esi
cmp eax, 0x5a
jbe 0x547e49
push ebp
push 0x1452
call fcn.00421db0
push eax
mov eax, dword [edi + ebx*4]
push eax
push str.__socklisten:__s__s
push 0x615410
call dword [sym.imp.USER32.dll_wsprintfA]
push 6
push ebp
push 0x615410
push ebp
call fcn.0048a440
add esp, 0x28
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x7c
ret
push edx
call fcn.00547030
add esp, 4
test eax, eax
je 0x547e68
push ebp
push 0x1453
call fcn.00421db0
mov ecx, dword [edi + ebx*4]
push eax
push ecx
jmp 0x547e1e
mov eax, dword [edi + ebx*4 + 4]
cmp eax, ebp
mov dword [esp + 0x10], ebp
je 0x547e9d
push eax
call fcn.005cbdc9
add esp, 4
cmp ax, bp
mov dword [esp + 0x10], eax
ja 0x547e9d
mov edx, dword [edi]
push 3
push ebp
push edx
push ebp
call fcn.0048a440
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
call fcn.00546dd0
mov esi, eax
cmp esi, ebp
jne 0x547ebf
mov eax, dword [edi]
push 2
push ebp
push eax
push ebp
call fcn.0048a440
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
mov ecx, dword [edi + ebx*4]
push ecx
push 0x64
push esi
call fcn.00423900
mov ebx, dword [esp + 0xa0]
add ebx, 0x15d4
push ebx
lea edx, [esi + 0x64]
push 0x64
push edx
call fcn.00423900
push ebx
lea ebp, [esi + 0xc8]
push 0x64
push ebp
call fcn.00423900
mov ax, word [esp + 0x34]
push 0
mov word [esi + 0x12c], ax
mov dword [esi + 0x1b0], 1
call fcn.005cce76
mov ebx, dword [esp + 0x3c]
add esp, 0x28
test ebx, ebx
mov dword [esi + 0x1e0], eax
mov dword [esi + 0x1e4], eax
je 0x547f48
mov ecx, dword [edi + ebx*4]
push ecx
push 0x64
push ebp
call fcn.00423900
mov edx, dword [edi + ebx*4]
push edx
lea eax, [esi + 0x12e]
push 0x64
push eax
call fcn.00423900
add esp, 0x18
cmp word [esp + 0x10], 0
mov ecx, dword [esp + 0x94]
mov dword [esi + 0x204], ecx
jne 0x54800b
push 0x63fb20
lea edx, [esp + 0x2c]
push 0x64
push edx
call fcn.00423900
mov al, byte [esi + 0x12e]
mov ebx, dword [0x63fb18]
lea edi, [esi + 0x12e]
add esp, 0xc
test al, al
je 0x547fa5
push edi
push 0x64
push 0x63fb20
call fcn.00423900
add esp, 0xc
mov dword [0x63fb18], 2
push 0
push 0
push 0
lea eax, [esi + 0x12c]
push eax
xor eax, eax
mov ax, word [0x609e28]
xor ecx, ecx
mov cx, word [0x609e24]
push eax
push ecx
call fcn.005285b0
lea edx, [esp + 0x40]
push edx
push 0x64
push 0x63fb20
mov dword [esi + 0x200], eax
call fcn.00423900
mov dword [0x63fb18], ebx
mov eax, dword [esi + 0x200]
add esp, 0x24
cmp eax, 0xffffffff
jne 0x54810f
push esi
call fcn.00546f20
push 0
push 0x1454
jmp 0x5480dc
push 0
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 0x200], eax
jne 0x548034
push esi
call fcn.00546f20
push 0
push 0x1455
jmp 0x5480dc
push 0x63fb20
lea eax, [esp + 0x2c]
push 0x64
push eax
call fcn.00423900
mov al, byte [esi + 0x12e]
mov ebp, dword [0x63fb18]
lea edi, [esi + 0x12e]
add esp, 0xc
test al, al
je 0x548078
push edi
push 0x64
push 0x63fb20
call fcn.00423900
add esp, 0xc
mov dword [0x63fb18], 2
mov edx, dword [esi + 0x200]
xor ecx, ecx
mov cx, word [esi + 0x12c]
push ecx
push edx
call fcn.005284e0
mov ebx, eax
lea eax, [esp + 0x30]
push eax
push 0x64
push 0x63fb20
call fcn.00423900
add esp, 0x14
test ebx, ebx
mov dword [0x63fb18], ebp
jne 0x5480bc
push esi
call fcn.00546f20
push ebx
push 0x1456
jmp 0x5480dc
mov ecx, dword [esi + 0x200]
push 5
push ecx
call dword [sym.imp.WSOCK32.dll_listen]
test eax, eax
je 0x54810f
push esi
call fcn.00546f20
push 0
push 0x145a
call fcn.00421db0
push eax
push str.__socklisten:__s
push 0x615410
call dword [sym.imp.USER32.dll_wsprintfA]
push 6
push 0
push 0x615410
push 0
call fcn.0048a440
add esp, 0x28
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x7c
ret
mov edx, dword [0x645324]
mov eax, dword [esi + 0x200]
push 8
push 0x8037
push edx
push eax
call dword [sym.imp.WSOCK32.dll_WSAAsyncSelect]
mov eax, dword [esi + 0x200]
cmp eax, 0xffffffff
je 0x54817b
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x1c]
push edx
push eax
mov dword [esp + 0x20], 0x10
call dword [sym.imp.WSOCK32.dll_getsockname]
test eax, eax
jne 0x54817b
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.WSOCK32.dll_inet_ntoa]
push eax
push 0x64
push edi
call fcn.00423900
mov ecx, dword [esp + 0x26]
add esp, 0xc
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, 0x7c
ret