Function at 0x525530
Capabilities:
Create tcp socket
Create udp socket
Initialize winsock library
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x298
mov eax, dword [0x5ed284]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0x10]
mov ecx, edi
mov dword [ebp - 0x298], 0
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x525560
sub ecx, edx
cmp ecx, 3
jg case.default.0x5255be
cmp dword [0x5ed188], 0
mov esi, dword [ebp + 0xc]
je 0x5255b4
cmp esi, 1
je 0x5255b4
lea eax, [ebp - 0x294]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne case.default.0x5255be
push 0x515290
call fcn.0052c654
add esp, 4
mov dword [0x5ed188], 0
dec esi
cmp esi, 3
ja case.default.0x5255be
jmp dword [esi*4 + 0x5257a8]
push 0x77
push edi
call sub.VCRUNTIME140.dll_strchr
add esp, 8
test eax, eax
je 0x5255db
push 0x5c0dbc
jmp 0x5255f3
push 0x72
push edi
call sub.VCRUNTIME140.dll_strchr
add esp, 8
test eax, eax
je case.default.0x5255be
push 0x5c0db8
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
add esp, 8
mov dword [ebp - 0x298], eax
test eax, eax
je case.default.0x5255be
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
add esp, 4
mov ebx, eax
jmp 0x52570f
push 0
push 0
push 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov ebx, eax
cmp ebx, 0xffffffff
je case.default.0x5255be
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
push 0x5aa84c
push 8
push 0xffff
push ebx
call esi
push 4
push 0x5aa84c
push 1
push 6
push ebx
call esi
jmp 0x52570f
push 0
push 0
push 0
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov ebx, eax
cmp ebx, 0xffffffff
je case.default.0x5255be
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
push 0x5aa84c
push 0x20
push 0xffff
push ebx
call esi
test eax, eax
je 0x5256dc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
lea eax, [ebp - 0x104]
push str.FSECommOpen:_Unable_to_make_socket_broadcast__d._n
push eax
call fcn.004f9620
lea eax, [ebp - 0x104]
push eax
push 0
push 0
call sym.FLAMESLauncher.exe_FMHAnnounceError
add esp, 0x18
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052bfb9
mov esp, ebp
pop ebp
ret
push 4
push 0x5aa84c
push 8
push 0xffff
push ebx
call esi
jmp 0x52570f
push 0
push 0
push 0
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov ebx, eax
cmp ebx, 0xffffffff
je case.default.0x5255be
mov dword [ebp + 0xc], 3
push 0x4da
push 0x5aa964
push 0x1c
push 1
call sym.FLAMESLauncher.exe_FUtilityMemAllocateWithTag
mov edx, dword [ebp + 0xc]
mov esi, eax
mov eax, dword [ebp - 0x298]
mov ecx, esi
add esp, 0x10
sub ecx, edi
mov dword [esi], edx
mov dword [esi + 4], ebx
mov dword [esi + 0xc], 1
mov dword [esi + 0x10], eax
mov al, byte [edi]
lea edi, [edi + 1]
mov byte [ecx + edi + 7], al
test al, al
jne 0x525743
cmp edx, 1
je 0x525795
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [esi + 0x18], eax
test eax, eax
jne 0x525795
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
push 0x4f5
push 0x5aa964
push esi
call sym.FLAMESLauncher.exe_FUtilityMemFreeWithTag
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052bfb9
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0052bfb9
mov esp, ebp
pop ebp
ret