Function at 0x4727e0
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.0x4727f8
jmp dword [eax*4 + 0x9a2160]
mov esi, dword [edi + 0xd60]
test esi, 0x1000
mov eax, str.octet
mov ebp, str.netascii
cmove ebp, eax
cmp edx, 7
ja case.0x472821.1
jmp dword [edx*4 + 0x9a2170]
mov eax, dword [ecx + 0x18]
lea edx, [eax + 1]
mov dword [ecx + 0x18], edx
cmp eax, dword [ecx + 0x20]
jge 0x472948
test dword [edi + 0xd60], 0x20000
mov eax, dword [ecx + 0x14c]
mov byte [eax], 0
mov eax, dword [ecx + 0x14c]
jne 0x472a6a
mov byte [eax + 1], 1
jmp 0x472a92
add esp, 0x110
pop esi
pop edi
pop ebx
pop ebp
jmp 0x473070
xor eax, eax
test edi, edi
je 0x472ab8
test byte [edi + 0x6eb], 0x20
je 0x472ab8
mov ecx, dword [edi + 0xd20]
test ecx, ecx
je 0x47289c
cmp dword [ecx + 4], 0
jle 0x472ab8
push str.TFTP_finished
push 0x9a2278
push edi
call fcn.00444fd0
xor eax, eax
add esp, 0xc
jmp 0x472ab8
add esp, 0x110
pop esi
pop edi
pop ebx
pop ebp
jmp 0x472d80
push str.Internal_state_machine_error
push 0x9a2278
push edi
call fcn.00444f40
add esp, 0xc
mov eax, 0x47
jmp 0x472ab8
mov eax, dword [edi + 0x6e8]
test esi, 0x20000
jne 0x472a1d
test eax, 0x20000000
je 0x472922
mov eax, dword [edi + 0xd20]
test eax, eax
je 0x47290b
cmp dword [eax + 4], 0
jle 0x472922
push str.Connected_for_receive
push 0x9a2278
push edi
mov esi, ecx
call fcn.00444fd0
mov ecx, esi
add esp, 0xc
mov dword [ecx], 1
mov esi, ecx
call fcn.00472680
test eax, eax
jne 0x472ab8
mov ecx, esi
mov edx, 6
call 0x472d80
jmp 0x472ab8
mov dword [ecx + 8], 0xffffff9e
mov dword [ecx], 3
xor eax, eax
jmp 0x472ab8
push str.tftp_send_first:_internal_error
push edi
call fcn.00444f40
add esp, 8
xor eax, eax
jmp 0x472ab8
test byte [edi + 0x6eb], 0x20
je 0x4729a1
mov eax, dword [edi + 0xd20]
test eax, eax
je 0x47298a
cmp dword [eax + 4], 0
jle 0x4729a1
push str.Connected_for_receive
push 0x9a2278
push edi
mov esi, ecx
call fcn.00444fd0
mov ecx, esi
add esp, 0xc
mov dword [ecx], 1
mov esi, ecx
call fcn.00472680
test eax, eax
jne 0x472ab8
mov ecx, esi
mov edx, 3
call 0x472d80
jmp 0x472ab8
test byte [edi + 0x6eb], 0x20
je 0x4729f7
mov eax, dword [edi + 0xd20]
test eax, eax
je 0x4729e0
cmp dword [eax + 4], 0
jle 0x4729f7
push str.Connected_for_transmit
push 0x9a2278
push edi
mov esi, ecx
call fcn.00444fd0
mov ecx, esi
add esp, 0xc
mov dword [ecx], 2
mov esi, ecx
call fcn.00472680
test eax, eax
jne 0x472ab8
mov ecx, esi
mov edx, 4
call 0x473070
jmp 0x472ab8
test eax, 0x20000000
je 0x472a4b
mov eax, dword [edi + 0xd20]
test eax, eax
je 0x472a34
cmp dword [eax + 4], 0
jle 0x472a4b
push str.Connected_for_transmit
push 0x9a2278
push edi
mov esi, ecx
call fcn.00444fd0
mov ecx, esi
add esp, 0xc
mov dword [ecx], 2
mov esi, ecx
call fcn.00472680
test eax, eax
jne 0x472ab8
mov ecx, esi
mov edx, 6
call 0x473070
jmp 0x472ab8
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 0x472a92
push edx
push eax
push edi
mov ebx, ecx
call fcn.00415360
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.004486f0
add esp, 0x14
test eax, eax
je 0x472ac3
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 0x472b12
push str.TFTP_filename_too_long
push edi
call fcn.00444f40
add esp, 8
push str.tftp.c
push 0x1d8
jmp 0x472c78
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.0040c960
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 0x472d13
test byte [edi + 0xd62], 2
je 0x472b94
mov eax, dword [edi + 0xc68]
mov ecx, dword [edi + 0xc6c]
mov edx, eax
and edx, ecx
cmp edx, 0xffffffff
je 0x472b94
lea edx, [esp + 0x10]
push ecx
push eax
push 0x9a22d5
push 0x40
push edx
call fcn.0040c960
add esp, 0x14
jmp 0x472b9b
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.004733c0
add esp, 8
test eax, eax
je 0x472bdf
lea ecx, [esp + 0x10]
mov eax, dword [esp + 4]
push dword [eax + 0x140]
push 0x9a22e0
push 0x40
push ecx
call fcn.0040c960
add esp, 0x10
jmp 0x472c45
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.004733c0
add esp, 8
mov esi, eax
push dword [ebx + 0x140]
push 0x9a22e0
push 0x40
push ebp
call fcn.0040c960
add esp, 0x10
test esi, esi
jne 0x472c45
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.004733c0
add esp, 8
test eax, eax
je 0x472c86
lea ecx, [esp + 0x10]
mov eax, dword [esp + 4]
push dword [eax + 0x1c]
push 0x9a22e0
push 0x40
push ecx
call fcn.0040c960
add esp, 0x10
push str.TFTP_buffer_too_small_for_options
push edi
call fcn.00444f40
add esp, 8
push str.tftp.c
push 0x208
push dword [esp + 0x10]
call fcn.004075a0
jmp 0x4728d5
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.004733c0
add esp, 8
mov esi, eax
push dword [ebx + 0x1c]
push 0x9a22e0
push 0x40
push ebp
call fcn.0040c960
add esp, 0x10
test esi, esi
jne 0x472c60
mov eax, dword [esp + 4]
mov ecx, dword [eax + 0x13c]
mov eax, dword [eax + 0x14c]
add eax, dword [esp]
mov edx, esp
push 0x9a22eb
push eax
call fcn.004733c0
add esp, 8
test eax, eax
jne 0x472c60
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.004733c0
add esp, 8
test eax, eax
jne 0x472c60
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 0x472d62
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea ecx, [esp + 0x10]
push 0x100
push ecx
push eax
call fcn.0041d090
add esp, 0xc
push eax
push 0x9a2278
push edi
call fcn.00444f40
add esp, 0xc
push str.tftp.c
push 0x217
push dword [esp + 0x10]
call fcn.004075a0
add esp, 0xc
xor eax, eax
jmp 0x472ab8
push ebx
push edi
push esi
sub esp, 0x100
mov edi, dword [ecx + 0x10]
add edx, 0xfffffffd
cmp edx, 4
ja case.0x472d9a.4
mov esi, ecx
jmp dword [edx*4 + 0x9a2190]
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 0x472f88
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 0x472ff9
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 0x472eac
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 0x472ff9
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 0x473024
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 0x472f5e
mov eax, dword [esi + 0x18]
inc eax
mov dword [esi + 0x18], eax
test edi, edi
je 0x472f52
test byte [edi + 0x6eb], 0x20
je 0x472f52
mov ecx, dword [edi + 0xd20]
test ecx, ecx
je 0x472f35
cmp dword [ecx + 4], 0
jle 0x472f52
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.00444fd0
add esp, 0x10
mov eax, dword [esi + 0x18]
cmp eax, dword [esi + 0x20]
jle 0x472fd1
mov dword [esi + 8], 0xffffff9d
mov dword [esi], 3
xor eax, eax
jmp 0x473024
push str.tftp_rx:_internal_error
push 0x9a2278
push edi
call fcn.00444f40
add esp, 0xc
mov eax, 0x47
jmp 0x473024
movzx ecx, bx
cmp ax, bx
jne 0x47302e
test edi, edi
je 0x472dc8
test byte [edi + 0x6eb], 0x20
je 0x472dc8
mov eax, dword [edi + 0xd20]
test eax, eax
je 0x472fbd
cmp dword [eax + 4], 0
jle 0x472dc8
push ecx
push str.Received_last_DATA_packet_block__d_again.
push edi
call fcn.00444fd0
add esp, 0xc
jmp 0x472dc8
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 0x473024
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, esp
push 0x100
push ecx
push eax
call fcn.0041d090
add esp, 0xc
push eax
push 0x9a2278
push edi
call fcn.00444f40
add esp, 0xc
mov eax, 0x37
add esp, 0x100
pop esi
pop edi
pop ebx
ret
xor eax, eax
test edi, edi
je 0x473024
test byte [edi + 0x6eb], 0x20
je 0x473024
mov esi, dword [edi + 0xd20]
test esi, esi
je 0x47304d
cmp dword [esi + 4], 0
jle 0x473024
movzx eax, dx
push eax
push ecx
push str.Received_unexpected_DATA_packet_block__d__expecting_block__d
push edi
call fcn.00444fd0
xor eax, eax
add esp, 0x10
jmp 0x473024
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.0x47308b
mov esi, ecx
jmp dword [eax*4 + 0x9a21a4]
mov eax, dword [esi + 0x148]
movzx eax, word [eax + 2]
rol ax, 8
movzx ecx, word [esi + 0x144]
cmp ax, cx
je 0x4730be
test ecx, ecx
jne 0x473310
cmp ax, 0xffff
jne 0x473310
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 0x4730e0
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 0x473208
mov ecx, dword [esi + 0x13c]
cmp dword [esi + 0x138], ecx
jge 0x47320e
mov dword [esi], 3
jmp 0x473303
mov eax, dword [esi + 0x18]
inc eax
mov dword [esi + 0x18], eax
test edi, edi
je 0x47317f
test byte [edi + 0x6eb], 0x20
je 0x47317f
mov ecx, dword [edi + 0xd20]
test ecx, ecx
je 0x473162
cmp dword [ecx + 4], 0
jle 0x47317f
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.00444fd0
add esp, 0x10
mov eax, dword [esi + 0x18]
cmp eax, dword [esi + 0x20]
jle 0x4732be
mov dword [esi + 8], 0xffffff9d
mov dword [esi], 3
jmp 0x473303
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 0x473303
push edx
push str.tftp_tx:_internal_error__event:__i
push edi
call fcn.00444f40
jmp 0x473300
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.00418290
add esp, 0x14
test eax, eax
jne 0x473305
mov ecx, dword [esp + 4]
mov eax, dword [esi + 0x138]
add eax, ecx
mov dword [esi + 0x138], eax
test ecx, ecx
je 0x47326d
add ebx, ecx
mov ecx, dword [esi + 0x13c]
cmp eax, ecx
jl 0x473230
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 0x47337e
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 0x4732fa
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 0x47337e
push dword [edi + 0xb4]
push dword [edi + 0xb0]
push edi
call fcn.00415980
add esp, 0xc
xor eax, eax
add esp, 0x108
pop esi
pop edi
pop ebx
pop ebp
ret
test edi, edi
je 0x473340
test byte [edi + 0x6eb], 0x20
je 0x473340
mov edx, dword [edi + 0xd20]
test edx, edx
je 0x47332d
cmp dword [edx + 4], 0
jle 0x473340
movzx eax, ax
push ecx
push eax
push str.Received_ACK_for_block__d__expecting__d
push edi
call fcn.00444fd0
add esp, 0x10
mov eax, dword [esi + 0x18]
lea ecx, [eax + 1]
mov dword [esi + 0x18], ecx
cmp eax, dword [esi + 0x20]
jge 0x47339f
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 0x473305
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea ecx, [esp + 8]
push 0x100
push ecx
push eax
call fcn.0041d090
add esp, 0xc
push eax
push 0x9a2278
jmp 0x4733ac
movzx eax, word [esi + 0x144]
push eax
push str.tftp_tx:_giving_up_waiting_for_block__d_ack
push edi
call fcn.00444f40
add esp, 0xc
mov eax, 0x37
jmp 0x473305