Function at 0x4045f0
Capabilities:
Convert ip address from string
Create tcp socket
Create thread
Create udp socket
Get socket status
Initialize winsock library
Read .ini file
Set socket configuration
Start tcp server
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5e4
mov eax, dword [0x437008]
xor eax, esp
mov dword [esp + 0x5e0], eax
push ebx
push esi
push edi
push str.Copyright__c__2024__Xtend_Technologies_Pvt._Ltd._n
mov dword [esp + 0x18], 1
call fcn.00403aa0
add esp, 4
mov byte [esp + 0x3d8], 0
lea eax, [esp + 0x3d8]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
xor ecx, ecx
mov al, byte [esp + ecx + 0x3d8]
lea ecx, [ecx + 1]
mov byte [esp + ecx + 0x4df], al
test al, al
jne 0x404641
lea eax, [esp + 0x4e0]
push 0x5c
push eax
call fcn.00408d60
add esp, 8
test eax, eax
je 0x404670
mov byte [eax + 1], 0
xor ecx, ecx
nop dword [eax]
nop word [eax + eax]
mov al, byte [esp + ecx + 0x3d8]
lea ecx, [ecx + 1]
mov byte [ecx + 0x43d407], al
test al, al
jne 0x404680
lea ecx, [esp + 0x3d8]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4046a0
sub ecx, edx
add ecx, 0xfffffffd
test ecx, ecx
jle 0x4046c2
cmp ecx, 0x104
jae 0x404caa
mov byte [ecx + 0x43d408], al
mov edi, 0x43d408
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x4046c8
mov eax, dword [0x433cd4]
xor ecx, ecx
mov dword [edi], eax
nop dword [eax + eax]
mov al, byte [esp + ecx + 0x3d8]
lea ecx, [ecx + 1]
mov byte [ecx + 0x43d2ff], al
test al, al
jne 0x4046e0
mov ecx, 0x43d300
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404700
sub ecx, edx
add ecx, 0xfffffffd
test ecx, ecx
jle 0x404722
cmp ecx, 0x104
jae 0x404caa
mov byte [ecx + 0x43d300], al
mov edi, 0x43d300
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x404728
mov eax, dword [0x433cd8]
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push 0x43d300
push 0x1f98
push str.Port
push str.Server
mov dword [edi], eax
call esi
push 0x43d300
push 0
push str.SwapFRKey
push str.FootPedal
mov dword [0x4390c4], eax
call esi
push 0x43d300
push 3
push str.Level
push str.Debug
mov dword [0x438d9c], eax
call esi
push 0x43d300
push 0
push str.FlushImmediate
push str.Debug
mov dword [0x4392cc], eax
call esi
mov esi, dword [0x4392cc]
test eax, eax
push 0x43d408
setne bl
push 0x104
push 0x438fa8
mov byte [0x43d405], bl
call fcn.0040fa11
add esp, 0xc
mov byte [0x438d83], bl
mov dword [0x438fa0], esi
push 0x4390ac
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x190
lea eax, [esp + 0x24c]
push 0
push eax
call fcn.00409220
add esp, 0xc
lea eax, [esp + 0x248]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov esi, eax
test esi, esi
je 0x40484e
push esi
push str.WSAStartup_failed:__d_n
call fcn.00403aa0
push esi
push str.WSAStartup_failed:__d
push 0x4390c8
call fcn.00401180
add esp, 0x14
mov ecx, 0x4390c8
call fcn.00403950
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x5e0]
xor ecx, esp
call fcn.004058fc
mov esp, ebp
pop ebp
ret
push str.WM_INVOKE_FP_EVENT_SERVER
call dword [sym.imp.USER32.dll_RegisterWindowMessageA]
push 0
push 0
push 0x404470
mov dword [0x438fa4], eax
call fcn.0040bd31
add esp, 0xc
mov dword [0x4392d0], 0
mov dword [0x43d2d4], 0
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
test edi, edi
je 0x404caf
push 4
lea eax, [esp + 0x18]
push eax
push 4
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4048c9
push str.setsockopt
call fcn.0040ff1a
add esp, 4
push str.setsockopt_failed
jmp 0x404cc1
mov eax, 2
mov word [esp + 0x28], ax
lea eax, [esp + 0x2c]
push eax
push str.127.0.0.1
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
movzx eax, word [0x4390c4]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2a], ax
lea eax, [esp + 0x28]
push 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x404921
push str.bind_failed
call fcn.0040ff1a
add esp, 4
push str.bind_failed
jmp 0x404cc1
push dword [0x4390c4]
push str.Listener_on_port__d__n
call fcn.00403aa0
push dword [0x4390c4]
push str.Listener_on_port__d
push 0x4390c8
call fcn.00401180
add esp, 0x14
mov ecx, 0x4390c8
call fcn.00403950
push 3
push edi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jns 0x404977
push str.listen
call fcn.0040ff1a
add esp, 4
push str.listen_failed
jmp 0x404cc1
push str.Waiting_for_connections_...
mov dword [esp + 0x1c], 0x10
call fcn.004101fc
add esp, 4
push str.Waiting_for_connections_...
push 0x4390c8
call fcn.00401180
add esp, 8
mov ecx, 0x4390c8
call fcn.00403950
movzx eax, byte [0x437a52]
mov byte [esp + 0x13], al
mov al, byte [esp + 0x13]
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
test al, al
je 0x404c25
mov ebx, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
nop dword [eax + eax]
mov ecx, dword [0x4392d0]
mov dword [esp + 0x140], 0
mov dword [esp + 0x3c], edi
mov dword [esp + 0x38], 1
test ecx, ecx
jle 0x404a1f
xor eax, eax
cmp dword [esp + eax*4 + 0x3c], ecx
je 0x404a0d
inc eax
cmp eax, 1
jb 0x4049f3
jne 0x404a0d
mov dword [esp + 0x40], ecx
mov dword [esp + 0x38], 2
mov dword [esp + 0x144], ecx
mov dword [esp + 0x140], 1
cmp ecx, edi
mov dword [esp + 0x1c], 5
mov eax, edi
mov dword [esp + 0x20], 0
cmovg eax, ecx
lea ecx, [esp + 0x1c]
push ecx
push 0
lea ecx, [esp + 0x148]
inc eax
push ecx
lea ecx, [esp + 0x44]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jns 0x404a8b
call fcn.00410363
cmp dword [eax], 4
je 0x404a91
push str.select_error
call fcn.00403aa0
add esp, 4
push str.select_error
push 0x4390c8
call fcn.00401180
add esp, 8
mov ecx, 0x4390c8
call fcn.00403950
jmp 0x404a91
je 0x404c08
lea eax, [esp + 0x38]
push eax
push edi
call ebx
test eax, eax
je 0x404bc8
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x2c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
test esi, esi
js 0x404c96
push dword [esp + 0x2a]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
push ecx
push dword [esp + 0x30]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push esi
push str.New_connection___socket_fd_is__d___ip_is_:__s___port_:__d__n
call fcn.00403aa0
add esp, 0x10
push dword [esp + 0x2a]
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
push eax
push dword [esp + 0x30]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push esi
push str.New_connection___socket_fd_is__d___ip_is_:__s___port_:__d
push 0x4390c8
call fcn.00401180
add esp, 0x14
mov ecx, 0x4390c8
call fcn.00403950
cmp dword [0x4392d0], 0
je 0x404bb9
push str.Closing_previous_connection
push 0x4390c8
call fcn.00401180
add esp, 8
mov ecx, 0x4390c8
call fcn.00403950
push dword [0x4392d0]
call dword [sym.imp.WS2_32.dll_closesocket]
push 0x4000
push 0
push 0x4392d4
mov dword [0x4392d0], 0
mov dword [0x43d2d4], 0
call fcn.00409220
add esp, 0xc
mov dword [0x43d2fc], 0
lea eax, [esp + 0x24]
mov byte [0x438d81], 0
mov byte [0x43d404], 0
push eax
push 0x3e8
push 0
push 0
push 0xff
push dword [0x438fa4]
push 0xffff
call dword [sym.imp.USER32.dll_SendMessageTimeoutA]
mov byte [0x437a50], 0
mov dword [0x4392d0], esi
mov byte [0x438d81], 1
jmp 0x404bce
mov esi, dword [0x4392d0]
lea eax, [esp + 0x38]
push eax
push esi
call ebx
test eax, eax
je 0x404be4
mov ecx, 0x4392d0
call fcn.00403ae0
lea eax, [esp + 0x140]
push eax
push esi
call ebx
test eax, eax
je 0x404c08
mov ecx, 0x4392d0
call fcn.004041b0
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
movzx eax, byte [0x437a52]
mov byte [esp + 0x13], al
mov al, byte [esp + 0x13]
test al, al
jne 0x4049d0
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
push dword [0x4392d0]
call esi
push edi
call esi
call dword [sym.imp.WS2_32.dll_WSACleanup]
push str.Exiting_server....
push 0x4390c8
mov byte [0x437a50], 0
call fcn.00401180
add esp, 8
mov ecx, 0x4390c8
call fcn.00403950
mov eax, dword [0x437a54]
cmp eax, 0xffffffff
je 0x404c74
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x437a54], 0xffffffff
push 0x4390ac
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov ecx, dword [esp + 0x5ec]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004058fc
mov esp, ebp
pop ebp
ret
push str.accept
call fcn.0040ff1a
add esp, 4
push str.accept_error_exiting...
jmp 0x404cc1
call fcn.00405cec
push str.socket_failed
call fcn.0040ff1a
add esp, 4
push str.socket_failed
push 0x4390c8
call fcn.00401180
add esp, 8
mov ecx, 0x4390c8
call fcn.00403950
push 1
call fcn.0040fd26
int3