Function at 0x515a30
Capabilities:
Create udp socket
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x24
mov eax, dword [esp + 0x2c]
test eax, eax
push ebx
push ebp
push esi
push edi
mov di, dx
mov word [esp + 0x10], di
mov ebx, ecx
je 0x515a61
cmp eax, 1
jne 0x515a58
mov dword [esp + 0x14], 2
jmp 0x515a69
cmp eax, 2
jne 0x515d60
mov dword [esp + 0x14], 1
mov eax, dword [esp + 0x38]
test eax, eax
je 0x515a76
mov word [eax], 0
movzx eax, bx
movzx esi, di
sub esi, eax
mov dword [esp + 0x1c], eax
je 0x515abf
mov eax, dword [0x5f3554]
test eax, eax
je 0x515ab9
call fcn.00515770
inc esi
test esi, esi
mov dword [esp + 0x20], esi
fild dword [esp + 0x20]
jge 0x515aa5
fadd qword [0x5a5318]
call fcn.0059262a
fiadd dword [esp + 0x1c]
call fcn.00590ed4
mov esi, eax
mov ebp, esi
jmp 0x515ac3
mov esi, ebx
mov ebp, esi
jmp 0x515ac3
mov esi, ebx
mov ebp, ebx
cmp dword [esp + 0x40], 2
je 0x515ae4
mov eax, dword [esp + 0x44]
test eax, eax
mov eax, dword [0x5bfd64]
jne 0x515adc
mov eax, dword [0x5f3550]
test eax, eax
je 0x515c57
mov dword [esp + 0x44], 0
lea esp, [esp]
mov eax, dword [esp + 0x44]
mov ecx, dword [0x5c81a0]
inc eax
mov dword [esp + 0x44], eax
mov eax, ecx
test eax, eax
je 0x515b37
mov edx, dword [eax + 0x520]
test edx, edx
je 0x515b2d
cmp word [eax + 0x51c], si
jne 0x515b2d
inc esi
cmp si, di
jbe 0x515b20
mov esi, ebx
cmp si, bp
je 0x515c57
mov eax, ecx
jmp 0x515b33
mov eax, dword [eax + 0x890]
test eax, eax
jne 0x515b05
mov ecx, dword [0x5f4f78]
mov eax, ecx
test eax, eax
je 0x515b75
mov edx, dword [eax + 0x33c]
test edx, edx
je 0x515b6b
cmp word [eax + 0x354], si
jne 0x515b6b
inc esi
cmp si, di
jbe 0x515b5e
mov esi, ebx
cmp si, bp
je 0x515c57
mov eax, ecx
jmp 0x515b71
mov eax, dword [eax + 0x3d4]
test eax, eax
jne 0x515b43
mov ecx, dword [0x5ed44c]
mov eax, ecx
test eax, eax
je 0x515bb3
mov edx, dword [eax + 0x440]
test edx, edx
je 0x515ba9
cmp word [eax + 0x454], si
jne 0x515ba9
inc esi
cmp si, di
jbe 0x515b9c
mov esi, ebx
cmp si, bp
je 0x515c57
mov eax, ecx
jmp 0x515baf
mov eax, dword [eax + 0x4bc]
test eax, eax
jne 0x515b81
mov ecx, dword [0x5f659c]
mov eax, ecx
test eax, eax
je 0x515be8
nop
cmp word [eax + 0x12c], si
jne 0x515bde
inc esi
cmp si, di
jbe 0x515bd1
mov esi, ebx
cmp si, bp
je 0x515c57
mov eax, ecx
jmp 0x515be4
mov eax, dword [eax + 0x208]
test eax, eax
jne 0x515bc0
mov ecx, esi
call fcn.00515850
test eax, eax
jne 0x515c3e
push eax
mov eax, dword [esp + 0x18]
push eax
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x515c57
mov edx, esi
mov ecx, edi
call fcn.00515960
test eax, eax
je 0x515c32
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x515d17
push 5
push edi
call dword [sym.imp.WSOCK32.dll_listen]
test eax, eax
je 0x515d17
push edi
call dword [sym.imp.WSOCK32.dll_closesocket]
mov di, word [esp + 0x10]
inc esi
cmp si, di
jbe 0x515c46
mov esi, ebx
cmp si, bp
je 0x515c57
cmp word [esp + 0x44], 0x32
jb 0x515af0
cmp dword [esp + 0x40], 2
je 0x515d60
mov ecx, dword [esp + 0x14]
push 0
push ecx
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x515d0b
mov edi, dword [esp + 0x3c]
cmp edi, 1
je 0x515c8a
cmp edi, 2
jne 0x515ca4
mov eax, dword [0x5f3558]
test eax, eax
je 0x515c9c
mov al, byte [0x5f3560]
test al, al
jne 0x515ca4
mov eax, dword [esp + 0x38]
test eax, eax
je 0x515d0b
xor edx, edx
mov ecx, esi
call fcn.00515960
test eax, eax
je 0x515d59
cmp edi, 1
je 0x515cd8
cmp edi, 2
je 0x515cd8
test edi, edi
jne 0x515d59
push 5
push esi
call dword [sym.imp.WSOCK32.dll_listen]
test eax, eax
jne 0x515d59
mov edi, dword [esp + 0x38]
test edi, edi
je 0x515d0b
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x28]
push eax
push esi
mov dword [esp + 0x24], 0x10
call dword [sym.imp.WSOCK32.dll_getsockname]
test eax, eax
jne 0x515d0b
mov ecx, dword [esp + 0x26]
push ecx
call dword [sym.imp.WSOCK32.dll_ntohs]
mov word [edi], ax
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 0x10
mov ebx, dword [esp + 0x38]
test ebx, ebx
je 0x515d4d
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x28]
push edx
push edi
mov word [ebx], si
mov dword [esp + 0x24], 0x10
call dword [sym.imp.WSOCK32.dll_getsockname]
test eax, eax
jne 0x515d4d
mov eax, dword [esp + 0x26]
push eax
call dword [sym.imp.WSOCK32.dll_ntohs]
mov word [ebx], ax
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 0x10
push esi
call dword [sym.imp.WSOCK32.dll_closesocket]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x24
ret 0x10