Function at 0x402a00
Capabilities:
Create thread
Create udp socket
Initialize winsock library
Read .ini file
Terminate thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x300
mov eax, dword [0x443068]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x2e4], eax
jmp 0x402a31
push 1
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x404e80
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov ebx, dword [ebp - 0x2e4]
mov esi, dword [sym.imp.USER32.dll_LoadStringA]
push 0x64
push 0x44bc60
push 0x67
push ebx
mov dword [0x44bcc4], eax
call esi
push 0x64
push 0x44bbf8
push 0x6d
push ebx
call esi
mov esi, dword [sym.imp.USER32.dll_LoadImageA]
push 0
push 0x40
push 0x40
push 1
push 0x6b
push ebx
mov dword [ebp - 0x138], 0x30
mov dword [ebp - 0x134], 3
mov dword [ebp - 0x130], 0x403280
mov dword [ebp - 0x12c], 0
mov dword [ebp - 0x128], 0
mov dword [ebp - 0x124], ebx
call esi
push 0x7f00
push 0
mov dword [ebp - 0x120], eax
call dword [sym.imp.USER32.dll_LoadCursorA]
push 0
push 0x20
push 0x20
push 1
push 0x6c
push ebx
mov dword [ebp - 0x11c], eax
mov dword [ebp - 0x118], 6
mov dword [ebp - 0x114], 0x6d
mov dword [ebp - 0x110], 0x44bbf8
call esi
mov dword [ebp - 0x10c], eax
lea eax, [ebp - 0x138]
push eax
call dword [sym.imp.USER32.dll_RegisterClassExA]
push 0
push ebx
push 0
push 0
push 0
push closesocket
push 0
push closesocket
push 0xcf0000
push 0x44bc60
push 0x44bbf8
push 0
mov dword [0x44bc5c], ebx
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov esi, eax
test esi, esi
je 0x403263
push 1
push esi
mov dword [0x44bbf4], esi
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
call dword [sym.imp.USER32.dll_UpdateWindow]
sub esp, 8
call fcn.00406e00
push str.Initializing...
push 0xff
push 0x443a80
call fcn.004075c0
add esp, 0xc
push str.18:18:00
push str.Nov_11_2023
push 0x43e8ec
push str.Connect_Server_version:__s_Compiled_at:__s__s
push 0x443a80
call fcn.00407410
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
add esp, 0x14
push str..ConnectServer.ini
push 0x20
push 0x44bbd4
push 0x43ebb3
push str.CustomerName
push str.ConnectServerInfo
call ebx
push str..ConnectServer.ini
push 0x24
push 0x44bbb0
push 0x43ebb3
push str.CustomerHardwareId
push str.ConnectServerInfo
call ebx
push str.KG_Free
lea ecx, [ebp - 0x150]
call fcn.00402840
mov ecx, 0x44bbd4
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402c00
mov esi, dword [ebp - 0x140]
sub ecx, edx
cmp dword [ebp - 0x13c], 0x10
lea edx, [ebp - 0x150]
cmovae edx, dword [ebp - 0x150]
cmp esi, ecx
jne 0x402c88
mov ecx, 0x44bbd4
sub esi, 4
jb 0x402c42
mov eax, dword [edx]
cmp eax, dword [ecx]
jne 0x402c47
add edx, 4
add ecx, 4
sub esi, 4
jae 0x402c31
cmp esi, 0xfffffffc
je 0x402c7b
mov al, byte [edx]
cmp al, byte [ecx]
jne 0x402c74
cmp esi, 0xfffffffd
je 0x402c7b
mov al, byte [edx + 1]
cmp al, byte [ecx + 1]
jne 0x402c74
cmp esi, 0xfffffffe
je 0x402c7b
mov al, byte [edx + 2]
cmp al, byte [ecx + 2]
jne 0x402c74
cmp esi, 0xffffffff
je 0x402c7b
mov al, byte [edx + 3]
cmp al, byte [ecx + 3]
je 0x402c7b
sbb eax, eax
or eax, 1
jmp 0x402c7d
xor eax, eax
test eax, eax
jne 0x402c88
mov eax, str.ConnectServer_Login_Free:__s
jmp 0x402c99
push 0xd
mov ecx, 0x443a00
call fcn.004053b0
mov eax, str.ConnectServer_Login_Premium:__s
push 0x44bbd4
push eax
push 0xffff
push 0x443a80
call fcn.004075c0
add esp, 0x10
lea eax, [ebp - 0x2e0]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4030d8
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push str..ConnectServer.ini
push 0xad75
push str.ConnectServerPortTCP
push str.ConnectServerInfo
call edi
push str..ConnectServer.ini
push 0xd905
push str.ConnectServerPortUDP
push str.ConnectServerInfo
mov word [0x44baec], ax
call edi
push str..ConnectServer.ini
push 0
push str.MaxIpConnection
push str.ConnectServerInfo
mov word [0x44bae8], ax
call edi
push str..ConnectServer.ini
push 0
push str.MaxPacketsPerSecond
push str.ConnectServerInfo
mov word [0x44bbac], ax
call edi
push str..ConnectServer.ini
push 9
push 0x44bb9c
push 0x43ebb3
push str.Version
push str.ConnectServerInfo
mov word [0x44bba8], ax
call ebx
push str..ConnectServer.ini
push 0x14
push 0x44bb24
push 0x43ebb3
push str.VersionFile
push str.ConnectServerInfo
call ebx
push str..ConnectServer.ini
push 0x64
push 0x44bb38
push 0x43ebb3
push str.FTPHost
push str.ConnectServerInfo
call ebx
push str..ConnectServer.ini
push 0x15
push str.FTPPort
push str.ConnectServerInfo
call edi
push str..ConnectServer.ini
push 0x14
push 0x44bb0c
push 0x43ebb3
push str.FTPLogin
push str.ConnectServerInfo
mov word [0x44bb20], ax
call ebx
push str..ConnectServer.ini
push 0x14
push 0x44baf8
push 0x43ebb3
push str.FTPPass
push str.ConnectServerInfo
call ebx
push str.KG_Free
lea ecx, [ebp - 0x120]
call fcn.00402840
mov edx, 0x44bbd4
lea ecx, [edx + 1]
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x402e00
mov ebx, dword [ebp - 0x120]
sub edx, ecx
cmp dword [ebp - 0x10c], 0x10
lea ecx, [ebp - 0x120]
mov esi, dword [ebp - 0x110]
cmovae ecx, ebx
cmp esi, edx
jne 0x402e87
mov edx, 0x44bbd4
sub esi, 4
jb 0x402e44
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x402e49
add ecx, 4
add edx, 4
sub esi, 4
jae 0x402e33
cmp esi, 0xfffffffc
je 0x402e7d
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x402e76
cmp esi, 0xfffffffd
je 0x402e7d
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x402e76
cmp esi, 0xfffffffe
je 0x402e7d
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x402e76
cmp esi, 0xffffffff
je 0x402e7d
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
je 0x402e7d
sbb eax, eax
or eax, 1
jmp 0x402e7f
xor eax, eax
test eax, eax
je 0x402f17
push str..ConnectServer.ini
push 0
push str.AntiFlood_Enable
push str.ConnectServerInfo
call edi
push str..ConnectServer.ini
push 5
push str.AntiFlood_MaxTimeCheck
push str.ConnectServerInfo
mov dword [0x44baf4], eax
call edi
push str..ConnectServer.ini
push 5
push str.AntiFlood_MinTimeCheck
push str.ConnectServerInfo
mov dword [0x44bad8], eax
call edi
push str..ConnectServer.ini
push 0xa
push str.AntiFlood_MaxCount
push str.ConnectServerInfo
mov dword [0x44bae0], eax
call edi
push str..ConnectServer.ini
push 0x3c
push str.AntiFlood_BlockTime
push str.ConnectServerInfo
mov dword [0x44badc], eax
call edi
push str..ConnectServer.ini
push 0
push str.ShowConnectLog
push str.ConnectServerInfo
mov dword [0x44bae4], eax
call edi
mov dword [0x44baf0], eax
push ecx
call fcn.004085f0
test al, al
je 0x402fa7
movzx esi, word [0x44bae8]
push 0
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [0x4486b4], eax
cmp eax, 0xffffffff
jne 0x402fec
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._SocketManagerUdp__WSASocket___failed_with_error:__d
push 0xff
push 0x443a80
call fcn.004075c0
mov eax, dword [0x4486c8]
add esp, 0x10
test eax, eax
je 0x402f8c
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [0x4486c8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x4486c8], 0
mov eax, dword [0x4486b4]
cmp eax, 0xffffffff
je 0x402fa7
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [0x4486b4], 0xffffffff
mov edi, dword [sym.imp.USER32.dll_SetTimer]
mov eax, dword [ebp - 0x10c]
cmp eax, 0x10
jb 0x4030fc
lea ecx, [eax + 1]
mov eax, ebx
cmp ecx, 0x1000
jb 0x402fdd
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403278
push ecx
push ebx
call fcn.0040c5ae
add esp, 8
jmp 0x4030fc
mov eax, 2
push 0
mov word [0x4486b8], ax
call dword [sym.imp.WS2_32.dll_htonl]
push esi
mov dword [0x4486bc], eax
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
push 0x4486b8
push dword [0x4486b4]
mov word [0x4486ba], ax
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x40303a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str._SocketManagerUdp__bind___failed_with_error:__d
jmp 0x402f52
push 0
push 0
push 0x4486b0
push 0x409d20
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x4486c8], eax
test eax, eax
jne 0x403088
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._SocketManagerUdp__CreateThread___failed_with_error:__d
push 0xff
push 0x443a80
call fcn.004075c0
add esp, 0x10
mov ecx, 0x4486b0
call fcn.00409ac0
jmp 0x402fa7
push 0x1000
push 0
push 0x4486cc
call fcn.0040e750
add esp, 8
mov dword [0x4496cc], 0
call fcn.00407ce0
mov edi, dword [sym.imp.USER32.dll_SetTimer]
push 0
push 0x3e8
push 0x64
push dword [0x44bbf4]
call edi
push 0
push 0x1388
push 0x66
push dword [0x44bbf4]
call edi
jmp 0x402fad
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.WSAStartup___failed_with_error:__d
push 0xff
push 0x443a80
call fcn.004075c0
mov edi, dword [sym.imp.USER32.dll_SetTimer]
add esp, 0x10
push 0x448660
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [0x448688]
push 0x448660
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
movzx eax, word [0x44bae8]
push esi
push eax
movzx eax, word [0x44baec]
push eax
push 0x43e8ec
lea eax, [ebp - 0x108]
push str.__s__KG_ConnectServer__TCP_Port:__d__UDP_Port:__d__QueueSize:__d_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
lea eax, [ebp - 0x108]
push eax
push dword [0x44bbf4]
call dword [sym.imp.USER32.dll_SetWindowTextA]
push 0
push 0x7d0
push 0x65
push dword [0x44bbf4]
call edi
mov eax, dword [ebp - 0x2e4]
push 0x6d
push eax
call dword [sym.imp.USER32.dll_LoadAcceleratorsA]
push 0
push 0
mov dword [ebp - 0x2e4], eax
lea eax, [ebp - 0x300]
push 0
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x4031f2
mov ebx, dword [sym.imp.USER32.dll_TranslateAcceleratorA]
mov esi, dword [sym.imp.USER32.dll_TranslateMessage]
mov edi, dword [sym.imp.USER32.dll_DispatchMessageA]
nop word [eax + eax]
lea eax, [ebp - 0x300]
push eax
push dword [ebp - 0x2e4]
push dword [ebp - 0x300]
call ebx
test eax, eax
jne 0x4031db
lea eax, [ebp - 0x300]
push eax
call esi
lea eax, [ebp - 0x300]
push eax
call edi
push 0
push 0
push 0
lea eax, [ebp - 0x300]
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
jne 0x4031b0
push dword [0x44bcc4]
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
jmp 0x403210
mov eax, dword [ebp - 0x13c]
mov esi, dword [ebp - 0x2f8]
cmp eax, 0x10
jb 0x40324e
mov edx, dword [ebp - 0x150]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x403244
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403278
push ecx
push edx
call fcn.0040c5ae
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040c303
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040c303
mov esp, ebp
pop ebp
ret 0x10
call fcn.0041101c
int3