Function at 0x470250
Capabilities:
Get local ipv4 addresses
Get socket information
Send data
Send data on socket

Disassembly:
sub esp, 0x72c
mov al, byte [0x5937a0]
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov byte [esp + 0x3c], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x3d]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x740]
stosw word es:[edi], ax
push ecx
mov ecx, esi
stosb byte es:[edi], al
call fcn.00470a40
test eax, eax
je 0x47063e
mov eax, dword [esi + 0x114]
or ecx, 0xffffffff
cmp eax, ecx
je 0x47063e
mov ebp, str.TYPE_I_r_n
mov dword [esp + 0x14], 0xa
mov edx, ebp
test edx, edx
je 0x47063e
mov edi, ebp
xor eax, eax
repne scasb al, byte es:[edi]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
not ecx
dec ecx
mov edi, ecx
test edi, edi
jle 0x470307
mov eax, dword [esi + 0x114]
push 0
push edi
push ebp
push eax
call sub.WS2_32.dll_send
cmp eax, 1
jge 0x4702ff
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x470307
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
js 0x47063e
push 0x32
call ebx
jmp 0x470303
add ebp, eax
sub edi, eax
test edi, edi
jg 0x4702c9
xor ebx, ebx
push ebx
call dword [sym.imp.MSVCRT.dll_time]
add esp, 4
lea ecx, [esp + 0x13c]
mov dword [esi + 0x128], eax
push 0x1ff
push ecx
mov ecx, esi
call fcn.00470c70
cmp eax, 3
jle 0x47036c
mov edi, dword [sym.imp.MSVCRT.dll_atoi]
cmp byte [esp + 0x13f], 0x2d
je 0x470353
lea edx, [esp + 0x13c]
push edx
call edi
add esp, 4
cmp eax, ebx
jne 0x4703c7
lea eax, [esp + 0x13c]
push 0x1ff
push eax
mov ecx, esi
call fcn.00470c70
cmp eax, 3
jg 0x470338
mov eax, dword [esi + 0x114]
or edi, 0xffffffff
cmp eax, edi
je 0x470393
push 2
push eax
call sub.WS2_32.dll_shutdown
mov ecx, dword [esi + 0x114]
push ecx
call sub.WS2_32.dll_closesocket
mov dword [esi + 0x114], edi
mov eax, dword [esi + 0x118]
cmp eax, edi
je 0x4703b7
push 2
push eax
call sub.WS2_32.dll_shutdown
mov edx, dword [esi + 0x118]
push edx
call sub.WS2_32.dll_closesocket
mov dword [esi + 0x118], edi
mov dword [esi + 0x128], ebx
push str.FTP:_read_answer_error
jmp 0x47062f
cmp eax, 0xc8
jne 0x47063e
mov eax, dword [esi + 0x118]
cmp eax, 0xffffffff
je 0x4703e3
push eax
call sub.WS2_32.dll_closesocket
push ebx
push 1
push 2
call sub.WS2_32.dll_socket
cmp eax, 0xffffffff
mov dword [esi + 0x118], eax
jne 0x470402
push str.FTP:_can_not_create_listening_socket
jmp 0x47062f
mov cx, word [esi + 0x100]
xor eax, eax
mov dword [esp + 0x1c], eax
push ecx
mov dword [esp + 0x24], eax
mov word [esp + 0x20], 2
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], eax
call sub.WS2_32.dll_htons
mov word [esp + 0x1e], ax
mov eax, dword [esi + 0x118]
lea edx, [esp + 0x1c]
push 0x10
push edx
push eax
call sub.WS2_32.dll_bind
cmp eax, 0xffffffff
jne 0x470453
push str.FTP:_can_not_bind_listening_socket
jmp 0x47062f
mov ecx, dword [esi + 0x118]
push 5
push ecx
call sub.WS2_32.dll_listen
cmp eax, 0xffffffff
jne 0x470470
push str.FTP:_listen_failed
jmp 0x47062f
mov ecx, dword [esi + 0x118]
lea edx, [esp + 0x10]
lea eax, [esp + 0x1c]
push edx
push eax
push ecx
mov dword [esp + 0x1c], 0x10
call sub.WS2_32.dll_getsockname
mov edx, dword [esp + 0x1e]
push edx
call sub.WS2_32.dll_ntohs
and eax, 0xffff
xor edx, edx
mov ecx, eax
mov dl, ah
and ecx, 0xff
xor eax, eax
mov al, byte [esi + 0x10b]
push ecx
push edx
xor ecx, ecx
mov cl, byte [esi + 0x10a]
push eax
xor edx, edx
xor eax, eax
mov dl, byte [esi + 0x109]
mov al, byte [esi + 0x108]
push ecx
push edx
push eax
push str.PORT__d__d__d__d__d__d_r_n
lea ecx, [esp + 0x58]
push 0xff
push ecx
call dword [sym.imp.MSVCRT.dll__snprintf]
mov eax, dword [esi + 0x114]
add esp, 0x24
cmp eax, 0xffffffff
lea ebp, [esp + 0x3c]
mov ebx, 0xa
je 0x47062a
lea edx, [esp + 0x3c]
test edx, edx
je 0x47062a
lea edi, [esp + 0x3c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
test edi, edi
jle 0x470559
mov eax, dword [esi + 0x114]
push 0
push edi
push ebp
push eax
call sub.WS2_32.dll_send
cmp eax, 1
jge 0x470551
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x470559
dec ebx
js 0x47062a
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x470555
add ebp, eax
sub edi, eax
test edi, edi
jg 0x47051f
push 0
call dword [sym.imp.MSVCRT.dll_time]
add esp, 4
lea ecx, [esp + 0x13c]
mov dword [esi + 0x128], eax
push 0x1ff
push ecx
mov ecx, esi
call fcn.00470c70
cmp eax, 3
jle 0x4705c1
mov edi, dword [sym.imp.MSVCRT.dll_atoi]
cmp byte [esp + 0x13f], 0x2d
je 0x4705a8
lea edx, [esp + 0x13c]
push edx
call edi
add esp, 4
test eax, eax
jne 0x47064d
lea eax, [esp + 0x13c]
push 0x1ff
push eax
mov ecx, esi
call fcn.00470c70
cmp eax, 3
jg 0x470589
mov eax, dword [esi + 0x114]
or edi, 0xffffffff
cmp eax, edi
je 0x4705e8
push 2
push eax
call sub.WS2_32.dll_shutdown
mov ecx, dword [esi + 0x114]
push ecx
call sub.WS2_32.dll_closesocket
mov dword [esi + 0x114], edi
mov eax, dword [esi + 0x118]
cmp eax, edi
je 0x47060c
push 2
push eax
call sub.WS2_32.dll_shutdown
mov edx, dword [esi + 0x118]
push edx
call sub.WS2_32.dll_closesocket
mov dword [esi + 0x118], edi
push str.FTP:_read_answer_error
push 1
push 0x596558
mov dword [esi + 0x128], 0
call fcn.004aa400
add esp, 0xc
push str.FTP:_PORT_command_failed
push 1
push 0x596558
call fcn.004aa400
add esp, 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x72c
ret 4
cmp eax, 0xc8
jne 0x47062a
mov edi, dword [esp + 0x740]
push 0x5c
push edi
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
test eax, eax
push 0xff
je 0x470679
inc eax
push eax
lea eax, [esp + 0x44]
push eax
jmp 0x47067f
lea ecx, [esp + 0x40]
push edi
push ecx
call dword [sym.imp.MSVCRT.dll_strncpy]
mov edx, str.STOR__s_r_n
add esp, 0xc
test edx, edx
mov byte [esp + 0x13b], 0
je 0x470805
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x33c]
push eax
push edx
push 0x3ff
push ecx
call dword [sym.imp.MSVCRT.dll__snprintf]
mov eax, dword [esi + 0x114]
add esp, 0x10
cmp eax, 0xffffffff
lea ebp, [esp + 0x33c]
mov ebx, 0xa
je 0x470805
lea edx, [esp + 0x33c]
test edx, edx
je 0x470805
lea edi, [esp + 0x33c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
test edi, edi
jle 0x470734
mov eax, dword [esi + 0x114]
push 0
push edi
push ebp
push eax
call sub.WS2_32.dll_send
cmp eax, 1
jge 0x47072c
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x470734
dec ebx
js 0x470805
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x470730
add ebp, eax
sub edi, eax
test edi, edi
jg 0x4706fa
push 0
call dword [sym.imp.MSVCRT.dll_time]
add esp, 4
lea ecx, [esp + 0x13c]
mov dword [esi + 0x128], eax
push 0x1ff
push ecx
mov ecx, esi
call fcn.00470c70
cmp eax, 3
jle 0x47079c
mov edi, dword [sym.imp.MSVCRT.dll_atoi]
cmp byte [esp + 0x13f], 0x2d
je 0x470783
lea edx, [esp + 0x13c]
push edx
call edi
add esp, 4
test eax, eax
jne 0x47080f
lea eax, [esp + 0x13c]
push 0x1ff
push eax
mov ecx, esi
call fcn.00470c70
cmp eax, 3
jg 0x470764
mov eax, dword [esi + 0x114]
or edi, 0xffffffff
cmp eax, edi
je 0x4707c3
push 2
push eax
call sub.WS2_32.dll_shutdown
mov ecx, dword [esi + 0x114]
push ecx
call sub.WS2_32.dll_closesocket
mov dword [esi + 0x114], edi
mov eax, dword [esi + 0x118]
cmp eax, edi
je 0x4707e7
push 2
push eax
call sub.WS2_32.dll_shutdown
mov edx, dword [esi + 0x118]
push edx
call sub.WS2_32.dll_closesocket
mov dword [esi + 0x118], edi
push str.FTP:_read_answer_error
push 1
push 0x596558
mov dword [esi + 0x128], 0
call fcn.004aa400
add esp, 0xc
push str.FTP:_STOR_command_failed
jmp 0x47062f
cmp eax, 0x96
jne 0x470805
mov edx, dword [esi + 0x118]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x2c]
push eax
push ecx
push edx
mov dword [esp + 0x1c], 0x10
call sub.WS2_32.dll_accept
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x18], ebx
jne 0x470849
push str.FTP:_accept_error
jmp 0x47062f
mov edi, dword [esi + 0x11c]
test edi, edi
je 0x4708f6
mov ebp, dword [esi + 0x120]
test ebp, ebp
jle 0x4708f6
xor ebx, ebx
mov dword [esp + 0x14], 0xa
test edi, edi
je 0x4708e6
test ebp, ebp
jl 0x4708e6
jle 0x4708c6
cmp ebp, 0x8000
mov eax, 0x8000
jg 0x470888
mov eax, ebp
push 0
push eax
mov eax, dword [esp + 0x20]
push edi
push eax
call sub.WS2_32.dll_send
cmp eax, 1
jge 0x4708bc
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x4708c6
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
js 0x4708e6
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4708c2
sub ebp, eax
add edi, eax
add ebx, eax
test ebp, ebp
jg 0x470879
push 0
call dword [sym.imp.MSVCRT.dll_time]
mov dword [esi + 0x128], eax
mov eax, ebx
mov ebx, dword [esp + 0x1c]
add esp, 4
mov dword [esp + 0x10], eax
or edi, 0xffffffff
jmp 0x470901
mov ebx, dword [esp + 0x18]
or eax, 0xffffffff
mov dword [esp + 0x10], eax
or edi, 0xffffffff
jmp 0x470901
mov dword [esp + 0x10], 0
or edi, 0xffffffff
mov ecx, dword [esi + 0x118]
push ecx
call sub.WS2_32.dll_closesocket
push ebx
mov dword [esi + 0x118], edi
call sub.WS2_32.dll_closesocket
mov eax, dword [esp + 0x10]
test eax, eax
jl 0x4709e0
lea edx, [esp + 0x13c]
push 0x1ff
push edx
mov ecx, esi
call fcn.00470c70
cmp eax, 3
jle 0x47097a
cmp byte [esp + 0x13f], 0x2d
je 0x470961
lea eax, [esp + 0x13c]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
test eax, eax
jne 0x470a08
lea ecx, [esp + 0x13c]
push 0x1ff
push ecx
mov ecx, esi
call fcn.00470c70
cmp eax, 3
jg 0x47093e
mov eax, dword [esi + 0x114]
cmp eax, edi
je 0x47099e
push 2
push eax
call sub.WS2_32.dll_shutdown
mov edx, dword [esi + 0x114]
push edx
call sub.WS2_32.dll_closesocket
mov dword [esi + 0x114], edi
mov eax, dword [esi + 0x118]
cmp eax, edi
je 0x4709c2
push 2
push eax
call sub.WS2_32.dll_shutdown
mov eax, dword [esi + 0x118]
push eax
call sub.WS2_32.dll_closesocket
mov dword [esi + 0x118], edi
push str.FTP:_read_answer_error
push 1
push 0x596558
mov dword [esi + 0x128], 0
call fcn.004aa400
add esp, 0xc
lea ecx, [esp + 0x3c]
push ecx
push str.FTP:__s_failed
push 1
push 0x596558
call fcn.004aa400
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x72c
ret 4
cmp eax, 0xe2
jne 0x4709e0
push 0
call dword [sym.imp.MSVCRT.dll_time]
add esp, 4
mov dword [esi + 0x128], eax
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x72c
ret 4