Function at 0x4162c0
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55e607
mov eax, dword fs:[0]
push eax
sub esp, 0x2dc
mov eax, dword [0x5b7de4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x2c0], ecx
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x2c4], edi
mov dword [ebp - 0x2b8], eax
call fcn.00408a50
mov esi, eax
mov dword [ebp - 0x2ac], esi
mov dword [ebp - 0x2b0], esi
push dword [ebp - 0x2b8]
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 0
push edi
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], 0
call fcn.0040a4a0
cmp dword [ebp - 0x2c], 0x10
lea edi, [ebp - 0x40]
mov ecx, dword [ebp - 0x30]
cmovae edi, dword [ebp - 0x40]
mov byte [ebp - 4], 1
mov dword [ebp - 0x2bc], ecx
test esi, esi
je 0x416381
cmp dword [esi + 4], 0xffffffff
je 0x416381
mov eax, dword [esi + 4]
add eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x416381
push dword [ebp - 0x2ac]
call fcn.004088f0
mov ecx, dword [ebp - 0x2bc]
add esp, 4
lea eax, [ebp - 0x1ac]
push eax
push 0
push ecx
push edi
call fcn.00407080
add esp, 0x10
mov dword [ebp - 0x18], 0
mov esi, eax
mov dword [ebp - 0x14], 0xf
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x2bc], esi
mov dword [ebp - 0x2ac], esi
push 0
push 0x5707b4
mov dword [ebp - 0x2b0], esi
mov byte [ebp - 0x28], 0
call fcn.0040a4a0
mov byte [ebp - 4], 2
call fcn.00415370
mov edi, eax
mov dword [ebp - 0x2c8], edi
sub esp, 0x18
mov byte [ebp - 4], 3
mov ecx, esp
mov dword [ebp - 0x2b4], esp
push 0xc
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0xf
push str.UDPBroadcast
mov byte [ecx], 0
call fcn.0040a4a0
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 4
push eax
sub esp, 0x18
mov ecx, esp
push 8
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0xf
push str.ServerId
mov byte [ecx], 0
call fcn.0040a4a0
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.00414a30
push 0
push 0x5707b4
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0xf
mov byte [ebp - 0x58], 0
call fcn.0040a4a0
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 5
push eax
push str.ServerId
lea ecx, [ebp - 0x2b0]
call fcn.00413500
push 0
push 0x5707b4
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0xf
mov byte [ebp - 0x70], 0
call fcn.0040a4a0
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 6
push eax
push str.ServerIp
lea ecx, [ebp - 0x2b0]
call fcn.00413500
cmp dword [ebp - 0x5c], 0x10
lea eax, [ebp - 0x70]
lea ecx, [ebp - 0x2cc]
cmovae eax, dword [ebp - 0x70]
push ecx
push eax
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x4167df
mov ecx, dword [ebp - 0x2c0]
xorps xmm0, xmm0
movups xmmword [ebp - 0x98], xmm0
mov eax, 2
mov word [ebp - 0x98], ax
mov eax, dword [ebp - 0x2cc]
mov dword [ebp - 0x94], eax
lea eax, [ebp - 0x98]
push eax
push 0
push 0x418f60
lea eax, [ebp - 0x88]
push eax
call fcn.00414040
mov edx, dword [ebp - 0x74]
xor eax, eax
cmp eax, dword [ebp - 0x78]
sbb eax, eax
neg eax
mov dword [ebp - 0x2b4], eax
cmp edx, 0x10
jb 0x41655e
mov ecx, dword [ebp - 0x88]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x41654e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41693e
push edx
push ecx
call fcn.005189ee
mov eax, dword [ebp - 0x2b4]
add esp, 8
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], 0xf
mov byte [ebp - 0x88], 0
test eax, eax
je 0x4167df
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 5
call fcn.00408f00
lea eax, [ebp - 0x28]
push eax
push str.ServerIp
lea ecx, [ebp - 0x2b0]
call fcn.00413500
lea ecx, [ebp - 0x2d0]
call fcn.0040fa30
push 1
sub esp, 0x18
mov byte [ebp - 4], 7
mov eax, esp
lea ecx, [ebp - 0x28]
push ecx
push 0x571f6c
push eax
call fcn.0040e870
mov esi, dword [ebp - 0x2d0]
add esp, 0xc
mov ecx, esi
call fcn.004097a0
mov byte [ebp - 4], 5
test esi, esi
je 0x41661c
push 0x5c8608
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x5c8624]
test eax, eax
je 0x416610
sub eax, 1
mov dword [0x5c8624], eax
jne 0x416610
mov ecx, dword [0x5c8620]
test ecx, ecx
je 0x416610
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [0x5c8620], 0
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x5c8608
call eax
mov esi, dword [ebp - 0x2c0]
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x2d4]
push eax
lea ecx, [esi + 0x1c]
call fcn.0041aaf0
mov eax, dword [esi + 0x1c]
mov esi, dword [ebp - 0x2d4]
mov dword [ebp - 0x2b4], eax
mov dword [ebp - 0x2dc], eax
cmp esi, eax
je 0x416670
lea eax, [esi + 0x10]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.0040e7a0
add esp, 8
test al, al
mov eax, dword [ebp - 0x2b4]
jne 0x416670
mov dword [ebp - 0x2e0], esi
jmp 0x416678
mov dword [ebp - 0x2e4], eax
mov esi, eax
mov dword [ebp - 0x2e8], eax
cmp esi, eax
je 0x4167ab
push dword [ebp - 0x2b8]
lea ecx, [ebp - 0xb0]
mov dword [ebp - 0xa0], 0
push dword [ebp - 0x2c4]
mov dword [ebp - 0x9c], 0xf
mov byte [ebp - 0xb0], 0
call fcn.0040a4a0
mov eax, dword [esi + 0x38]
add esi, 0x28
mov byte [ebp - 4], 8
mov dword [ebp - 0x2c4], eax
cmp dword [esi + 0x14], 0x10
jb 0x4166d0
mov esi, dword [esi]
mov ecx, dword [ebp - 0x2bc]
test ecx, ecx
je 0x4166ff
cmp dword [ecx + 4], 0xffffffff
je 0x4166f9
mov eax, dword [ecx + 4]
add eax, 0xffffffff
mov dword [ecx + 4], eax
jne 0x4166f9
push dword [ebp - 0x2ac]
call fcn.004088f0
add esp, 4
mov edi, dword [ebp - 0x2c8]
lea eax, [ebp - 0x2a8]
push eax
push 0
push dword [ebp - 0x2c4]
push esi
call fcn.00407080
add esp, 0x10
lea ecx, [ebp - 0x2b0]
mov esi, eax
lea eax, [ebp - 0x28]
mov dword [ebp - 0x2ac], esi
mov dword [ebp - 0x2b0], esi
push eax
push str.ServerIp
call fcn.00413500
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
push 9
cmovae eax, dword [ebp - 0x28]
push str.localhost
push dword [ebp - 0x18]
push eax
call fcn.0040f850
add esp, 0x10
test al, al
jne 0x416787
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
push 9
cmovae eax, dword [ebp - 0x28]
push str.127.0.0.1
push dword [ebp - 0x18]
push eax
call fcn.0040f850
add esp, 0x10
mov dword [ebp - 0x2b8], 1
test al, al
je 0x416791
mov dword [ebp - 0x2b8], 0
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 5
call fcn.00408f00
cmp dword [ebp - 0x2b8], 0
je 0x4167e7
jmp 0x4167b1
mov esi, dword [ebp - 0x2bc]
mov ecx, dword [ebp - 0x2c0]
lea eax, [ebp - 0x58]
push eax
lea ecx, [ecx + 0x1c]
call fcn.00410a10
lea ecx, [ebp - 0x40]
cmp eax, ecx
je 0x4167e7
cmp dword [ebp - 0x2c], 0x10
push dword [ebp - 0x30]
cmovae ecx, dword [ebp - 0x40]
push ecx
mov ecx, eax
call fcn.0040a4a0
jmp 0x4167e7
lea ecx, [ebp - 0x70]
call fcn.00408f00
mov edx, dword [ebp - 0x44]
cmp edx, 0x10
jb 0x41681b
mov ecx, dword [ebp - 0x58]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x416811
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416943
push edx
push ecx
call fcn.005189ee
add esp, 8
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0xf
mov byte [ebp - 0x58], 0
test edi, edi
je 0x416874
push 0x5c8668
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x5c8684]
test eax, eax
je 0x416869
sub eax, 1
mov dword [0x5c8684], eax
jne 0x416869
mov ecx, dword [0x5c8680]
test ecx, ecx
je 0x416869
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [0x5c8680], 0
push 0x5c8668
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x4168a8
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x41689e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416948
push edx
push ecx
call fcn.005189ee
add esp, 8
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
cmp edx, 0x10
jb 0x4168ea
mov ecx, dword [ebp - 0x40]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4168e0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41694d
push edx
push ecx
call fcn.005189ee
add esp, 8
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], 0
test esi, esi
je 0x41691f
cmp dword [esi + 4], 0xffffffff
je 0x41691f
mov eax, dword [esi + 4]
add eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x41691f
push dword [ebp - 0x2ac]
call fcn.004088f0
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005189ad
mov esp, ebp
pop ebp
ret 0xc
call fcn.00545078
call fcn.00545078
call fcn.00545078
call fcn.00545078
int3