Function at 0x404e2a
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x248
push ebx
push esi
push edi
push 0x10
pop esi
xor edi, edi
push edi
push 1
push 2
mov dword [ebp - 8], esi
mov dword [ebp - 0x38], esi
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x404e5d
mov eax, 0xc8
jmp 0x405301
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x516], edi
jne 0x405000
mov ebx, dword [ebp + 8]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
call sub.WSOCK32.dll_getsockname
lea eax, [ebp - 0x1c]
push esi
push eax
mov word [ebp - 0x1a], di
push dword [ebp - 4]
call sub.WSOCK32.dll_bind
test eax, eax
je 0x404e9c
mov esi, 0xc9
jmp 0x405152
push 5
push dword [ebp - 4]
call sub.WSOCK32.dll_listen
test eax, eax
je 0x404eb4
mov esi, 0xca
jmp 0x405152
lea eax, [ebp - 8]
mov dword [ebp - 8], esi
push eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 4]
call sub.WSOCK32.dll_getsockname
push dword [ebp - 0x18]
call sub.WSOCK32.dll_ntohl
push dword [ebp - 0x1a]
mov dword [ebp + 8], eax
call sub.WSOCK32.dll_ntohs
movsx ecx, ax
mov edx, ecx
mov eax, 0xff
and edx, eax
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
push edx
xor edx, edx
mov dl, ch
mov ecx, dword [ebp + 8]
and ecx, eax
xor eax, eax
mov al, byte [ebp + 9]
push edx
push ecx
push eax
xor eax, eax
mov al, byte [ebp + 0xa]
push eax
xor eax, eax
mov al, byte [ebp + 0xb]
push eax
lea eax, [ebp - 0x248]
push str.PORT__d__d__d__d__d__d_r_n
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
add esp, 0x20
lea eax, [ebp - 0x248]
push eax
call edi
push eax
lea eax, [ebp - 0x248]
push eax
push ebx
call fcn.00404cdc
push 0
push 0
push ebx
call fcn.00404d1d
add esp, 0x18
cdq
push 0x64
pop ecx
idiv ecx
dec eax
dec eax
je 0x404f59
mov esi, 0xcb
jmp 0x405152
mov eax, dword [ebp + 0xc]
add eax, 0x30e
mov dword [ebp + 8], eax
push eax
lea eax, [ebp - 0x248]
push str.STOR__s.wctemp_r_n
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0x248]
push eax
call edi
push eax
lea eax, [ebp - 0x248]
push eax
push ebx
call fcn.00404cdc
push 0
push 0
push ebx
call fcn.00404d1d
add esp, 0x18
cdq
push 0x64
pop ecx
idiv ecx
test eax, eax
jle 0x404ff6
cmp eax, 2
jg 0x404ff6
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 4]
call sub.WSOCK32.dll_accept
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
jne 0x404fcb
mov esi, 0xcd
jmp 0x405152
mov eax, dword [ebp + 0xc]
lea ecx, [eax + 0x562]
push ecx
push dword [ebp - 0xc]
push eax
call fcn.00404bab
add esp, 0xc
push dword [ebp - 0xc]
call sub.WSOCK32.dll_closesocket
push dword [ebp - 4]
call sub.WSOCK32.dll_closesocket
jmp 0x4051ad
mov esi, 0xcc
jmp 0x405152
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x248]
push str.PASV_r_n
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
pop ecx
pop ecx
lea eax, [ebp - 0x248]
push eax
call edi
mov ebx, dword [ebp + 8]
push eax
lea eax, [ebp - 0x248]
push eax
push ebx
call fcn.00404cdc
lea eax, [ebp - 0x248]
push 0x200
push eax
push ebx
call fcn.00404d1d
add esp, 0x18
cdq
push 0x64
pop ecx
idiv ecx
dec eax
dec eax
je 0x40505f
mov esi, 0xce
jmp 0x405152
lea eax, [ebp - 0x248]
push 0x28
push eax
call dword [sym.imp.MSVCRT.dll_strchr]
pop ecx
test eax, eax
pop ecx
jne 0x40507c
push 1
pop esi
jmp 0x405152
lea ecx, [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x34]
push ecx
push str.__d__d__d__d__d__d_
push eax
call dword [sym.imp.MSVCRT.dll_sscanf]
add esp, 0x20
cmp eax, 6
je 0x4050b2
mov esi, 0xcf
jmp 0x405152
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x34]
mov eax, 0xff
mov word [ebp - 0x1c], 2
and ecx, eax
shl edx, 8
add ecx, edx
mov edx, dword [ebp - 0x2c]
shl ecx, 8
and edx, eax
add ecx, edx
mov edx, dword [ebp - 0x28]
shl ecx, 8
and edx, eax
add ecx, edx
mov dl, byte [ebp - 0x20]
and edx, eax
mov eax, dword [ebp - 0x24]
shl eax, 8
add edx, eax
push ecx
mov dword [ebp + 8], edx
call sub.WSOCK32.dll_htonl
push dword [ebp + 8]
mov dword [ebp - 0x18], eax
call sub.WSOCK32.dll_htons
mov word [ebp - 0x1a], ax
mov eax, dword [ebp + 0xc]
add eax, 0x30e
mov dword [ebp + 8], eax
push eax
lea eax, [ebp - 0x248]
push str.STOR__s.wctemp_r_n
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0x248]
push eax
call edi
push eax
lea eax, [ebp - 0x248]
push eax
push ebx
call fcn.00404cdc
add esp, 0xc
lea eax, [ebp - 0x1c]
push 0x10
push eax
push dword [ebp - 4]
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
jne 0x405161
mov esi, 0xd0
push dword [ebp - 4]
call sub.WSOCK32.dll_closesocket
mov eax, esi
jmp 0x405301
push 0
push 0
push ebx
call fcn.00404d1d
mov eax, dword [ebp + 0xc]
lea ecx, [eax + 0x562]
push ecx
push dword [ebp - 4]
push eax
call fcn.00404bab
add esp, 0x18
push dword [ebp - 4]
call sub.WSOCK32.dll_closesocket
push 0
push 0
push ebx
call fcn.00404d1d
add esp, 0xc
cdq
push 0x64
pop ecx
idiv ecx
test eax, eax
jle 0x4052fc
cmp eax, 2
jg 0x4052fc
lea eax, [ebp - 0x248]
push str.NOOP_r_n
push eax
call esi
pop ecx
lea eax, [ebp - 0x248]
pop ecx
push eax
call edi
push eax
lea eax, [ebp - 0x248]
push eax
push ebx
call fcn.00404cdc
push 0
push 0
push ebx
call fcn.00404d1d
add esp, 0x18
cdq
push 0x64
pop ecx
idiv ecx
dec eax
dec eax
je 0x4051f5
mov eax, 0xd2
jmp 0x405301
push dword [ebp + 8]
lea eax, [ebp - 0x248]
push str.DELE__s_r_n
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0x248]
push eax
call edi
push eax
lea eax, [ebp - 0x248]
push eax
push ebx
call fcn.00404cdc
push 0
push 0
push ebx
call fcn.00404d1d
add esp, 0x18
cmp eax, 0x1c2
je 0x4051f5
push dword [ebp + 8]
lea eax, [ebp - 0x248]
push str.RNFR__s.wctemp_r_n
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0x248]
push eax
call edi
push eax
lea eax, [ebp - 0x248]
push eax
push ebx
call fcn.00404cdc
push 0
push 0
push ebx
call fcn.00404d1d
add esp, 0x18
mov dword [ebp + 0xc], eax
cdq
push 0x64
pop ecx
idiv ecx
cmp eax, 2
jl 0x4052f5
cmp eax, 3
jle 0x40528f
cmp eax, 4
jne 0x4052f5
cmp dword [ebp + 0xc], 0x1c2
jne 0x4052f5
jmp 0x405234
push dword [ebp + 8]
lea eax, [ebp - 0x248]
push str.RNTO__s_r_n
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0x248]
push eax
call edi
push eax
lea eax, [ebp - 0x248]
push eax
push ebx
call fcn.00404cdc
push 0
push 0
push ebx
call fcn.00404d1d
add esp, 0x18
mov dword [ebp + 0xc], eax
cdq
push 0x64
pop ecx
idiv ecx
cmp eax, 2
jl 0x4052ee
cmp eax, 3
jle 0x4052ea
cmp eax, 4
jne 0x4052ee
cmp dword [ebp + 0xc], 0x1c2
jne 0x4052ee
jmp 0x40528f
xor eax, eax
jmp 0x405301
mov eax, 0xd4
jmp 0x405301
mov eax, 0xd3
jmp 0x405301
mov eax, 0xd1
pop edi
pop esi
pop ebx
leave
ret