Function at 0x4711d0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x110
mov eax, dword [ecx]
mov edi, dword [ecx + 0x10]
cmp eax, 3
ja case.default.0x4711e8
jmp dword [eax*4 + 0x977e40]
mov esi, dword [edi + 0xd60]
test esi, 0x1000
mov eax, str.octet
mov ebp, str.netascii
cmove ebp, eax
cmp edx, 7
ja case.0x471211.1
jmp dword [edx*4 + 0x977e50]
mov eax, dword [ecx + 0x18]
lea edx, [eax + 1]
mov dword [ecx + 0x18], edx
cmp eax, dword [ecx + 0x20]
jge 0x471338
test dword [edi + 0xd60], 0x20000
mov eax, dword [ecx + 0x14c]
mov byte [eax], 0
mov eax, dword [ecx + 0x14c]
jne 0x47145a
mov byte [eax + 1], 1
jmp 0x471482
add esp, 0x110
pop esi
pop edi
pop ebx
pop ebp
jmp 0x471a60
xor eax, eax
test edi, edi
je 0x4714a8
test byte [edi + 0x6eb], 0x20
je 0x4714a8
mov ecx, dword [edi + 0xd20]
test ecx, ecx
je 0x47128c
cmp dword [ecx + 4], 0
jle 0x4714a8
push str.TFTP_finished
push 0x977f58
push edi
call fcn.004439c0
xor eax, eax
add esp, 0xc
jmp 0x4714a8
add esp, 0x110
pop esi
pop edi
pop ebx
pop ebp
jmp 0x471770
push str.Internal_state_machine_error
push 0x977f58
push edi
call fcn.00443930
add esp, 0xc
mov eax, 0x47
jmp 0x4714a8
mov eax, dword [edi + 0x6e8]
test esi, 0x20000
jne 0x47140d
test eax, 0x20000000
je 0x471312
mov eax, dword [edi + 0xd20]
test eax, eax
je 0x4712fb
cmp dword [eax + 4], 0
jle 0x471312
push str.Connected_for_receive
push 0x977f58
push edi
mov esi, ecx
call fcn.004439c0
mov ecx, esi
add esp, 0xc
mov dword [ecx], 1
mov esi, ecx
call fcn.00471070
test eax, eax
jne 0x4714a8
mov ecx, esi
mov edx, 6
call 0x471770
jmp 0x4714a8
mov dword [ecx + 8], 0xffffff9e
mov dword [ecx], 3
xor eax, eax
jmp 0x4714a8
push str.tftp_send_first:_internal_error
push edi
call fcn.00443930
add esp, 8
xor eax, eax
jmp 0x4714a8
test byte [edi + 0x6eb], 0x20
je 0x471391
mov eax, dword [edi + 0xd20]
test eax, eax
je 0x47137a
cmp dword [eax + 4], 0
jle 0x471391
push str.Connected_for_receive
push 0x977f58
push edi
mov esi, ecx
call fcn.004439c0
mov ecx, esi
add esp, 0xc
mov dword [ecx], 1
mov esi, ecx
call fcn.00471070
test eax, eax
jne 0x4714a8
mov ecx, esi
mov edx, 3
call 0x471770
jmp 0x4714a8
test byte [edi + 0x6eb], 0x20
je 0x4713e7
mov eax, dword [edi + 0xd20]
test eax, eax
je 0x4713d0
cmp dword [eax + 4], 0
jle 0x4713e7
push str.Connected_for_transmit
push 0x977f58
push edi
mov esi, ecx
call fcn.004439c0
mov ecx, esi
add esp, 0xc
mov dword [ecx], 2
mov esi, ecx
call fcn.00471070
test eax, eax
jne 0x4714a8
mov ecx, esi
mov edx, 4
call 0x471a60
jmp 0x4714a8
test eax, 0x20000000
je 0x47143b
mov eax, dword [edi + 0xd20]
test eax, eax
je 0x471424
cmp dword [eax + 4], 0
jle 0x47143b
push str.Connected_for_transmit
push 0x977f58
push edi
mov esi, ecx
call fcn.004439c0
mov ecx, esi
add esp, 0xc
mov dword [ecx], 2
mov esi, ecx
call fcn.00471070
test eax, eax
jne 0x4714a8
mov ecx, esi
mov edx, 6
call 0x471a60
jmp 0x4714a8
mov byte [eax + 1], 2
mov eax, dword [edi + 0xc68]
mov edx, dword [edi + 0xc6c]
mov ebx, eax
and ebx, edx
cmp ebx, 0xffffffff
je 0x471482
push edx
push eax
push edi
mov ebx, ecx
call fcn.00413d50
mov ecx, ebx
add esp, 0xc
mov dword [esp + 4], ecx
mov eax, dword [ecx + 0x10]
mov eax, dword [eax + 0xca4]
inc eax
lea ecx, [esp + 8]
push 4
push 0
push ecx
push 0
push eax
call fcn.004470e0
add esp, 0x14
test eax, eax
je 0x4714b3
add esp, 0x110
pop esi
pop edi
pop ebx
pop ebp
ret
xor ebx, ebx
test esi, 0x1000
sete bl
mov eax, dword [esp + 8]
mov dword [esp + 0xc], eax
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov edx, dword [esp + 4]
mov ecx, dword [edx + 0x13c]
lea ebx, [ebx + ebx*2]
add ebx, ecx
add ebx, 0xfffffff4
cmp eax, ebx
jbe 0x471502
push str.TFTP_filename_too_long
push edi
call fcn.00443930
add esp, 8
push str.tftp.c
push 0x1d8
jmp 0x471668
shr esi, 0xc
and esi, 1
mov eax, dword [edx + 0x14c]
add eax, 2
push 0
push ebp
push 0
push dword [esp + 0x18]
push str._s_c_s_c
push ecx
push eax
call fcn.0040b350
add esp, 0x1c
push dword [esp + 8]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
lea ecx, [esi + esi*2]
lea esi, [eax + ecx]
add esi, 9
mov dword [esp], esi
test byte [edi + 0x6e8], 4
jne 0x471703
test byte [edi + 0xd62], 2
je 0x471584
mov eax, dword [edi + 0xc68]
mov ecx, dword [edi + 0xc6c]
mov edx, eax
and edx, ecx
cmp edx, 0xffffffff
je 0x471584
lea edx, [esp + 0x10]
push ecx
push eax
push 0x977fb5
push 0x40
push edx
call fcn.0040b350
add esp, 0x14
jmp 0x47158b
mov word [esp + 0x10], 0x30
mov eax, dword [esp + 4]
add esi, dword [eax + 0x14c]
mov ecx, dword [eax + 0x13c]
mov edx, esp
push str.tsize
push esi
call fcn.00471db0
add esp, 8
test eax, eax
je 0x4715cf
lea ecx, [esp + 0x10]
mov eax, dword [esp + 4]
push dword [eax + 0x140]
push 0x977fc0
push 0x40
push ecx
call fcn.0040b350
add esp, 0x10
jmp 0x471635
mov ebx, dword [esp + 4]
mov ecx, dword [ebx + 0x13c]
mov eax, dword [ebx + 0x14c]
add eax, dword [esp]
lea ebp, [esp + 0x10]
mov edx, esp
push ebp
push eax
call fcn.00471db0
add esp, 8
mov esi, eax
push dword [ebx + 0x140]
push 0x977fc0
push 0x40
push ebp
call fcn.0040b350
add esp, 0x10
test esi, esi
jne 0x471635
mov eax, dword [esp + 4]
mov ecx, dword [eax + 0x13c]
mov eax, dword [eax + 0x14c]
add eax, dword [esp]
mov edx, esp
push str.blksize
push eax
call fcn.00471db0
add esp, 8
test eax, eax
je 0x471676
lea ecx, [esp + 0x10]
mov eax, dword [esp + 4]
push dword [eax + 0x1c]
push 0x977fc0
push 0x40
push ecx
call fcn.0040b350
add esp, 0x10
push str.TFTP_buffer_too_small_for_options
push edi
call fcn.00443930
add esp, 8
push str.tftp.c
push 0x208
push dword [esp + 0x10]
call fcn.00405f90
jmp 0x4712c5
mov ebx, dword [esp + 4]
mov ecx, dword [ebx + 0x13c]
mov eax, dword [ebx + 0x14c]
add eax, dword [esp]
mov edx, esp
push ebp
push eax
call fcn.00471db0
add esp, 8
mov esi, eax
push dword [ebx + 0x1c]
push 0x977fc0
push 0x40
push ebp
call fcn.0040b350
add esp, 0x10
test esi, esi
jne 0x471650
mov eax, dword [esp + 4]
mov ecx, dword [eax + 0x13c]
mov eax, dword [eax + 0x14c]
add eax, dword [esp]
mov edx, esp
push 0x977fcb
push eax
call fcn.00471db0
add esp, 8
test eax, eax
jne 0x471650
mov eax, dword [esp + 4]
mov ecx, dword [eax + 0x13c]
mov eax, dword [eax + 0x14c]
add eax, dword [esp]
mov edx, esp
push ebp
push eax
call fcn.00471db0
add esp, 8
test eax, eax
jne 0x471650
mov esi, dword [esp]
mov eax, dword [edi + 0x18]
mov eax, dword [eax + 0x2c]
push dword [eax + 0xc]
add eax, 0x10
push eax
push 0
push esi
mov eax, dword [esp + 0x14]
push dword [eax + 0x14c]
push dword [eax + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, esi
je 0x471752
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea ecx, [esp + 0x10]
push 0x100
push ecx
push eax
call fcn.0041ba80
add esp, 0xc
push eax
push 0x977f58
push edi
call fcn.00443930
add esp, 0xc
push str.tftp.c
push 0x217
push dword [esp + 0x10]
call fcn.00405f90
add esp, 0xc
xor eax, eax
jmp 0x4714a8
push ebx
push edi
push esi
sub esp, 0x100
mov edi, dword [ecx + 0x10]
add edx, 0xfffffffd
cmp edx, 4
ja case.0x47178a.4
mov esi, ecx
jmp dword [edx*4 + 0x977e70]
mov eax, dword [esi + 0x144]
mov ecx, dword [esi + 0x148]
movzx ebx, word [ecx + 2]
rol bx, 8
lea edx, [eax + 1]
cmp bx, dx
jne 0x471978
mov dword [esi + 0x18], 0
mov word [esi + 0x144], bx
mov eax, dword [esi + 0x14c]
mov byte [eax], 0
mov eax, dword [esi + 0x14c]
mov byte [eax + 1], 4
movzx eax, word [esi + 0x144]
mov ecx, dword [esi + 0x14c]
mov byte [ecx + 2], ah
mov ecx, dword [esi + 0x14c]
mov byte [ecx + 3], al
lea eax, [esi + 0xb0]
push dword [esi + 0x130]
push eax
push 0
push 4
push dword [esi + 0x14c]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
js 0x4719e9
mov eax, dword [esi + 0x13c]
add eax, 4
xor ecx, ecx
cmp dword [esi + 0x134], eax
setl cl
lea eax, [ecx*2 + 1]
mov dword [esi], eax
jmp 0x47189c
mov word [esi + 0x144], 0
mov dword [esi + 0x18], 0
mov eax, dword [esi + 0x14c]
mov byte [eax], 0
mov eax, dword [esi + 0x14c]
mov byte [eax + 1], 4
movzx eax, word [esi + 0x144]
mov ecx, dword [esi + 0x14c]
mov byte [ecx + 2], ah
mov ecx, dword [esi + 0x14c]
mov byte [ecx + 3], al
lea eax, [esi + 0xb0]
push dword [esi + 0x130]
push eax
push 0
push 4
push dword [esi + 0x14c]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
js 0x4719e9
mov dword [esi], 1
push 0
call sub.api_ms_win_crt_time_l1_1_0.dll__time64
add esp, 4
mov dword [esi + 0x2c], edx
mov dword [esi + 0x28], eax
xor eax, eax
jmp 0x471a14
mov eax, dword [esi + 0x14c]
mov byte [eax], 0
mov eax, dword [esi + 0x14c]
mov byte [eax + 1], 5
movzx eax, word [esi + 0x144]
mov ecx, dword [esi + 0x14c]
mov byte [ecx + 2], ah
mov ecx, dword [esi + 0x14c]
mov byte [ecx + 3], al
lea eax, [esi + 0xb0]
push dword [esi + 0x130]
push eax
push 0
push 4
push dword [esi + 0x14c]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
jmp 0x47194e
mov eax, dword [esi + 0x18]
inc eax
mov dword [esi + 0x18], eax
test edi, edi
je 0x471942
test byte [edi + 0x6eb], 0x20
je 0x471942
mov ecx, dword [edi + 0xd20]
test ecx, ecx
je 0x471925
cmp dword [ecx + 4], 0
jle 0x471942
mov ecx, dword [esi + 0x144]
inc ecx
movzx ecx, cx
push eax
push ecx
push str.Timeout_waiting_for_block__d_ACK._Retries___d
push edi
call fcn.004439c0
add esp, 0x10
mov eax, dword [esi + 0x18]
cmp eax, dword [esi + 0x20]
jle 0x4719c1
mov dword [esi + 8], 0xffffff9d
mov dword [esi], 3
xor eax, eax
jmp 0x471a14
push str.tftp_rx:_internal_error
push 0x977f58
push edi
call fcn.00443930
add esp, 0xc
mov eax, 0x47
jmp 0x471a14
movzx ecx, bx
cmp ax, bx
jne 0x471a1e
test edi, edi
je 0x4717b8
test byte [edi + 0x6eb], 0x20
je 0x4717b8
mov eax, dword [edi + 0xd20]
test eax, eax
je 0x4719ad
cmp dword [eax + 4], 0
jle 0x4717b8
push ecx
push str.Received_last_DATA_packet_block__d_again.
push edi
call fcn.004439c0
add esp, 0xc
jmp 0x4717b8
lea eax, [esi + 0xb0]
push dword [esi + 0x130]
push eax
push 0
push 4
push dword [esi + 0x14c]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
mov ecx, eax
xor eax, eax
test ecx, ecx
jns 0x471a14
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, esp
push 0x100
push ecx
push eax
call fcn.0041ba80
add esp, 0xc
push eax
push 0x977f58
push edi
call fcn.00443930
add esp, 0xc
mov eax, 0x37
add esp, 0x100
pop esi
pop edi
pop ebx
ret
xor eax, eax
test edi, edi
je 0x471a14
test byte [edi + 0x6eb], 0x20
je 0x471a14
mov esi, dword [edi + 0xd20]
test esi, esi
je 0x471a3d
cmp dword [esi + 4], 0
jle 0x471a14
movzx eax, dx
push eax
push ecx
push str.Received_unexpected_DATA_packet_block__d__expecting_block__d
push edi
call fcn.004439c0
xor eax, eax
add esp, 0x10
jmp 0x471a14
push ebp
push ebx
push edi
push esi
sub esp, 0x108
mov edi, dword [ecx + 0x10]
lea eax, [edx - 4]
cmp eax, 3
ja case.default.0x471a7b
mov esi, ecx
jmp dword [eax*4 + 0x977e84]
mov eax, dword [esi + 0x148]
movzx eax, word [eax + 2]
rol ax, 8
movzx ecx, word [esi + 0x144]
cmp ax, cx
je 0x471aae
test ecx, ecx
jne 0x471d00
cmp ax, 0xffff
jne 0x471d00
push 0
call sub.api_ms_win_crt_time_l1_1_0.dll__time64
add esp, 4
mov dword [esi + 0x2c], edx
mov dword [esi + 0x28], eax
inc word [esi + 0x144]
jmp 0x471ad0
mov word [esi + 0x144], 1
mov dword [esi + 0x18], 0
mov eax, dword [esi + 0x14c]
mov byte [eax], 0
mov eax, dword [esi + 0x14c]
mov byte [eax + 1], 3
movzx eax, word [esi + 0x144]
mov ecx, dword [esi + 0x14c]
mov byte [ecx + 2], ah
mov ecx, dword [esi + 0x14c]
mov byte [ecx + 3], al
cmp word [esi + 0x144], 1
jbe 0x471bf8
mov ecx, dword [esi + 0x13c]
cmp dword [esi + 0x138], ecx
jge 0x471bfe
mov dword [esi], 3
jmp 0x471cf3
mov eax, dword [esi + 0x18]
inc eax
mov dword [esi + 0x18], eax
test edi, edi
je 0x471b6f
test byte [edi + 0x6eb], 0x20
je 0x471b6f
mov ecx, dword [edi + 0xd20]
test ecx, ecx
je 0x471b52
cmp dword [ecx + 4], 0
jle 0x471b6f
mov ecx, dword [esi + 0x144]
inc ecx
movzx ecx, cx
push eax
push ecx
push str.Timeout_waiting_for_block__d_ACK.__Retries___d
push edi
call fcn.004439c0
add esp, 0x10
mov eax, dword [esi + 0x18]
cmp eax, dword [esi + 0x20]
jle 0x471cae
mov dword [esi + 8], 0xffffff9d
mov dword [esi], 3
jmp 0x471cf3
mov dword [esi], 3
mov eax, dword [esi + 0x14c]
mov byte [eax], 0
mov eax, dword [esi + 0x14c]
mov byte [eax + 1], 5
movzx eax, word [esi + 0x144]
mov ecx, dword [esi + 0x14c]
mov byte [ecx + 2], ah
mov ecx, dword [esi + 0x14c]
mov byte [ecx + 3], al
lea eax, [esi + 0xb0]
push dword [esi + 0x130]
push eax
push 0
push 4
push dword [esi + 0x14c]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [esi], 3
jmp 0x471cf3
push edx
push str.tftp_tx:_internal_error__event:__i
push edi
call fcn.00443930
jmp 0x471cf0
mov ecx, dword [esi + 0x13c]
mov dword [esi + 0x138], 0
mov ebx, dword [esi + 0x14c]
add ebx, 4
xor eax, eax
lea ebp, [esp + 4]
nop word [eax + eax]
sub ecx, eax
lea eax, [esp + 3]
push eax
push ebp
push ecx
push ebx
push edi
call fcn.00416c80
add esp, 0x14
test eax, eax
jne 0x471cf5
mov ecx, dword [esp + 4]
mov eax, dword [esi + 0x138]
add eax, ecx
mov dword [esi + 0x138], eax
test ecx, ecx
je 0x471c5d
add ebx, ecx
mov ecx, dword [esi + 0x13c]
cmp eax, ecx
jl 0x471c20
add eax, 4
lea ecx, [esi + 0xb0]
push dword [esi + 0x130]
push ecx
push 0
push eax
push dword [esi + 0x14c]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
js 0x471d6e
mov eax, dword [esi + 0x138]
mov ecx, eax
sar ecx, 0x1f
add eax, dword [edi + 0xb0]
adc ecx, dword [edi + 0xb4]
mov dword [edi + 0xb0], eax
mov dword [edi + 0xb4], ecx
push ecx
push eax
jmp 0x471cea
mov eax, dword [esi + 0x138]
add eax, 4
lea ecx, [esi + 0xb0]
push dword [esi + 0x130]
push ecx
push 0
push eax
push dword [esi + 0x14c]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
js 0x471d6e
push dword [edi + 0xb4]
push dword [edi + 0xb0]
push edi
call fcn.00414370
add esp, 0xc
xor eax, eax
add esp, 0x108
pop esi
pop edi
pop ebx
pop ebp
ret
test edi, edi
je 0x471d30
test byte [edi + 0x6eb], 0x20
je 0x471d30
mov edx, dword [edi + 0xd20]
test edx, edx
je 0x471d1d
cmp dword [edx + 4], 0
jle 0x471d30
movzx eax, ax
push ecx
push eax
push str.Received_ACK_for_block__d__expecting__d
push edi
call fcn.004439c0
add esp, 0x10
mov eax, dword [esi + 0x18]
lea ecx, [eax + 1]
mov dword [esi + 0x18], ecx
cmp eax, dword [esi + 0x20]
jge 0x471d8f
mov eax, dword [esi + 0x138]
add eax, 4
lea ecx, [esi + 0xb0]
push dword [esi + 0x130]
push ecx
push 0
push eax
push dword [esi + 0x14c]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_sendto]
mov ecx, eax
xor eax, eax
test ecx, ecx
jns 0x471cf5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea ecx, [esp + 8]
push 0x100
push ecx
push eax
call fcn.0041ba80
add esp, 0xc
push eax
push 0x977f58
jmp 0x471d9c
movzx eax, word [esi + 0x144]
push eax
push str.tftp_tx:_giving_up_waiting_for_block__d_ack
push edi
call fcn.00443930
add esp, 0xc
mov eax, 0x37
jmp 0x471cf5