Function at 0x406880
Capabilities:
Create thread
Get local ipv4 addresses
Get socket information
Get socket status
Set socket configuration

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43ac5d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x168
mov eax, dword [0x44a00c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
xor edi, edi
cmp byte [esi + 8], 0
jne 0x406cad
nop
cmp dword [esi + 0xc], 0
jge 0x4068fc
lea edx, [esi + 0x90]
lea ecx, [esi + 0x10]
call fcn.00406700
mov dword [esi + 0xc], eax
test eax, eax
jns 0x4068fc
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [esi + 8], 0
je 0x4068d0
mov eax, dword [esi + 0xc]
lea ecx, [ebp - 0x164]
push ecx
push 0
push 0
lea ecx, [ebp - 0x138]
mov dword [ebp - 0x134], eax
push ecx
inc eax
mov dword [ebp - 0x138], 1
push eax
mov dword [ebp - 0x164], 5
mov dword [ebp - 0x160], 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x406992
jns 0x40698b
inc edi
cmp edi, 0x1e
jl 0x406ca3
push str._FALTAL_Error._recreate_Listen_socket
call fcn.00401410
add esp, 4
cmp byte [esi + 8], 0
jne 0x40698b
lea eax, [esi + 0x10]
lea edx, [esi + 0x90]
mov ecx, eax
call fcn.00406700
mov dword [esi + 0xc], eax
test eax, eax
jns 0x40698b
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [esi + 8], 0
lea eax, [esi + 0x10]
je 0x406963
xor edi, edi
jmp 0x406ca3
push 0
push 0
push dword [esi + 0xc]
mov dword [ebp - 0x150], 0
call dword [sym.imp.WS2_32.dll_accept]
mov edi, eax
mov dword [ebp - 0x14c], edi
test edi, edi
jns 0x4069bf
mov edi, 1
jmp 0x406ca3
push 4
lea eax, [ebp - 0x154]
mov dword [ebp - 0x154], 1
push eax
push 1
push 6
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [ebp - 0x158]
mov dword [ebp - 0x158], 0x10
push eax
lea eax, [ebp - 0x148]
xorps xmm0, xmm0
push eax
push edi
movups xmmword [ebp - 0x148], xmm0
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x406a16
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x406c9d
cmp dword [esi + 0xe4], 0
mov edi, dword [ebp - 0x144]
jbe 0x406a9c
test edi, edi
je 0x406a8b
mov eax, dword [esi + 0xe0]
mov eax, dword [eax]
cmp eax, dword [esi + 0xe0]
je 0x406a8b
mov ecx, dword [esi + 0xe0]
nop
cmp dword [eax + 0x10], edi
je 0x406a9c
cmp byte [eax + 0xd], 0
jne 0x406a87
mov edx, dword [eax + 8]
cmp byte [edx + 0xd], 0
jne 0x406a6c
mov eax, edx
mov edx, dword [eax]
cmp byte [edx + 0xd], 0
jne 0x406a87
nop
mov eax, edx
mov edx, dword [eax]
cmp byte [edx + 0xd], 0
je 0x406a60
jmp 0x406a87
mov edx, dword [eax + 4]
cmp byte [edx + 0xd], 0
jne 0x406a85
cmp eax, dword [edx + 8]
jne 0x406a85
mov eax, edx
mov edx, dword [edx + 4]
cmp byte [edx + 0xd], 0
je 0x406a75
mov eax, edx
cmp eax, ecx
jne 0x406a40
push dword [ebp - 0x14c]
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x406c9d
push edi
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edx, eax
test edx, edx
jne 0x406aba
push dword [ebp - 0x14c]
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x406c9d
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
cmp byte [edx], 0
jne 0x406ad5
xor ecx, ecx
jmp 0x406ae9
mov ecx, edx
lea edi, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406ae0
sub ecx, edi
push ecx
push edx
lea ecx, [ebp - 0x2c]
call fcn.00403aa0
push 0x80
mov dword [ebp - 4], 0
call fcn.0041be73
add esp, 4
mov dword [ebp - 0x170], eax
mov byte [ebp - 4], 1
mov ecx, eax
push dword [ebp - 0x14c]
push esi
call fcn.004070b0
mov edi, eax
mov byte [ebp - 4], 0
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x15c], edi
lea ecx, [edi + 0x10]
cmp ecx, eax
je 0x406b3f
push 0xffffffffffffffff
push 0
push eax
call fcn.00403ba0
push esi
mov dword [edi], 2
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0xd0], 1
jae 0x406bfb
xor edi, edi
nop dword [eax]
nop dword [eax + eax]
lea edx, [ebp - 0x14c]
mov dword [ebp - 0x14c], 0
mov ecx, str.0.0.0.0
call fcn.00406700
test eax, eax
js 0x406beb
mov dword [ebp - 0x16c], eax
lea ecx, [ebp - 0x16c]
mov eax, dword [ebp - 0x14c]
mov dword [ebp - 0x168], eax
mov eax, dword [esi + 0xcc]
push ecx
mov dword [ebp - 0x14c], eax
push dword [eax + 4]
push eax
call fcn.00409740
mov edx, eax
mov ecx, 0xffffffe
mov eax, dword [esi + 0xd0]
sub ecx, eax
cmp ecx, 1
jb 0x406ccb
lea ecx, [eax + 1]
mov eax, dword [ebp - 0x14c]
mov dword [esi + 0xd0], ecx
mov dword [eax + 4], edx
mov eax, dword [edx + 4]
mov dword [eax], edx
inc edi
cmp edi, 0xa
jl 0x406b70
mov edi, dword [ebp - 0x15c]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 8
call fcn.0041be73
add esp, 4
lea ecx, [ebp - 0x174]
mov dword [eax], 0x406320
push ecx
push 0
push eax
push 0x403180
push 0x200000
push 0
mov dword [eax + 4], edi
call fcn.0041f92d
add esp, 0x18
test eax, eax
jne 0x406c7d
mov ecx, edi
call fcn.004071a0
push 0x80
push edi
call fcn.0041beab
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x406c84
push str._Release_ftp_server._n
call fcn.00401410
add esp, 4
mov ecx, esi
call fcn.00406570
push 0x120
push esi
call fcn.0041beab
add esp, 8
jmp 0x406c84
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x18]
cmp eax, 0x10
jb 0x406c9d
inc eax
push eax
push dword [ebp - 0x2c]
call fcn.00404100
mov edi, dword [ebp - 0x150]
cmp byte [esi + 8], 0
je 0x4068d0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0041be62
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
push str.list_T__too_long
call fcn.0041be15
int3