Function at 0x407d90
Capabilities:
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x18
mov eax, dword [0x420050]
xor eax, esp
mov dword [esp + 0x14], eax
xor eax, eax
push esi
mov esi, 2
push eax
push esi
mov dword [esp + 0x10], eax
push esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov word [esp + 0x14], si
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [0x42ab95], eax
je 0x408015
push 0x10
lea ecx, [esp + 0xc]
push ecx
push eax
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
je 0x408015
movzx dx, byte [0x422980]
push ebp
push edi
push edx
call sub.WSOCK32.dll_htons
cmp dword [esp + 0x28], 0
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
mov word [0x422b81], ax
mov dword [0x42ab8d], esi
jne 0x407e3c
push 0x422981
call ebp
mov esi, eax
add esi, 0x422981
cmp esi, 0x422981
jb 0x407e37
cmp byte [esi], 0x5c
je 0x407e37
sub esi, 1
cmp esi, 0x422981
jae 0x407e27
add esi, 1
jmp 0x407e41
mov esi, 0x422981
mov eax, dword [0x42ab8d]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
lea ecx, [eax + 0x422b81]
push ecx
call edi
push esi
call ebp
mov edx, dword [0x42ab8d]
lea eax, [edx + eax + 1]
mov dword [0x42ab8d], eax
push str.octet
lea eax, [eax + 0x422b81]
push eax
call edi
add dword [0x42ab8d], 6
movsx ecx, byte [ebx]
push ecx
call fcn.0040e5a0
add esp, 4
test eax, eax
je 0x407eca
mov edx, dword [0x42ab8d]
push str.blksize
lea eax, [edx + 0x422b81]
push eax
call edi
mov eax, dword [0x42ab8d]
add eax, 8
push ebx
lea ecx, [eax + 0x422b81]
push ecx
mov dword [0x42ab8d], eax
call edi
push ebx
call ebp
mov edx, dword [0x42ab8d]
lea eax, [edx + eax + 1]
mov dword [0x42ab8d], eax
mov ecx, dword [0x42ab8d]
push str.tsize
lea edx, [ecx + 0x422b81]
push edx
call edi
mov eax, dword [0x42ab8d]
mov ecx, dword [0x42abbd]
add eax, 6
push ecx
lea edx, [eax + 0x422b81]
push 0x419b78
push edx
mov dword [0x42ab8d], eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [0x42ab8d]
add esp, 0xc
lea edx, [ecx + eax + 1]
push 0x422a81
mov dword [0x42ab8d], edx
call sub.WSOCK32.dll_inet_addr
mov esi, eax
cmp esi, 0xffffffff
pop edi
mov dword [esp + 8], esi
pop ebp
jne 0x407f58
push 0x422a81
call sub.WSOCK32.dll_gethostbyname
test eax, eax
je 0x407f58
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
push ecx
push eax
lea ecx, [esp + 0xc]
push ecx
call fcn.0040ce50
mov esi, dword [esp + 0x10]
add esp, 0xc
cmp esi, 0xffffffff
mov dword [esp + 0xc], esi
jne 0x407f7e
push str.Host_is_unknown_or_invalid
call fcn.00407bc0
add esp, 4
pop esi
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.0040c6d6
add esp, 0x18
ret
mov eax, dword [0x42ab89]
test eax, eax
jne 0x407f8c
mov eax, 0x45
push eax
call sub.WSOCK32.dll_htons
mov ecx, dword [0x42ab95]
push 0x10
lea edx, [esp + 0xc]
push edx
push 0
mov word [esp + 0x16], ax
mov eax, dword [0x42ab8d]
push eax
push 0x422b81
push ecx
call sub.WSOCK32.dll_sendto
cmp eax, 0xffffffff
jne 0x408000
call sub.WSOCK32.dll_WSAGetLastError
mov esi, eax
call sub.WSOCK32.dll_WSAGetLastError
cmp esi, eax
mov esi, str.Tftp_server_may_have_been_stopped
je 0x407fd6
mov esi, 0x419fb2
call fcn.004034f0
push eax
call sub.WSOCK32.dll_WSAGetLastError
push eax
push esi
push str.can_not_send_data_packet._n_s_nError_code__d___s_
call fcn.00407bc0
add esp, 0x10
pop esi
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.0040c6d6
add esp, 0x18
ret
mov eax, 1
pop esi
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.0040c6d6
add esp, 0x18
ret
call fcn.004034f0
push eax
call sub.WSOCK32.dll_WSAGetLastError
push eax
push str.Cant_create_client_socket._nError_code__d___s_
call fcn.00407bc0
mov ecx, dword [esp + 0x24]
add esp, 0xc
pop esi
xor ecx, esp
call fcn.0040c6d6
add esp, 0x18
ret