Function at 0x46fd30
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.0x46fd48
jmp dword [eax*4 + 0xa28470]
mov esi, dword [edi + 0xd60]
test esi, 0x1000
mov eax, str.octet
mov ebp, str.netascii
cmove ebp, eax
cmp edx, 7
ja case.0x46fd71.1
jmp dword [edx*4 + 0xa28480]
mov eax, dword [ecx + 0x18]
lea edx, [eax + 1]
mov dword [ecx + 0x18], edx
cmp eax, dword [ecx + 0x20]
jge 0x46fe98
test dword [edi + 0xd60], 0x20000
mov eax, dword [ecx + 0x14c]
mov byte [eax], 0
mov eax, dword [ecx + 0x14c]
jne 0x46ffba
mov byte [eax + 1], 1
jmp 0x46ffe2
add esp, 0x110
pop esi
pop edi
pop ebx
pop ebp
jmp 0x4705c0
xor eax, eax
test edi, edi
je 0x470008
test byte [edi + 0x6eb], 0x20
je 0x470008
mov ecx, dword [edi + 0xd20]
test ecx, ecx
je 0x46fdec
cmp dword [ecx + 4], 0
jle 0x470008
push str.TFTP_finished
push 0xa28588
push edi
call fcn.00442520
xor eax, eax
add esp, 0xc
jmp 0x470008
add esp, 0x110
pop esi
pop edi
pop ebx
pop ebp
jmp 0x4702d0
push str.Internal_state_machine_error
push 0xa28588
push edi
call fcn.00442490
add esp, 0xc
mov eax, 0x47
jmp 0x470008
mov eax, dword [edi + 0x6e8]
test esi, 0x20000
jne 0x46ff6d
test eax, 0x20000000
je 0x46fe72
mov eax, dword [edi + 0xd20]
test eax, eax
je 0x46fe5b
cmp dword [eax + 4], 0
jle 0x46fe72
push str.Connected_for_receive
push 0xa28588
push edi
mov esi, ecx
call fcn.00442520
mov ecx, esi
add esp, 0xc
mov dword [ecx], 1
mov esi, ecx
call fcn.0046fbd0
test eax, eax
jne 0x470008
mov ecx, esi
mov edx, 6
call 0x4702d0
jmp 0x470008
mov dword [ecx + 8], 0xffffff9e
mov dword [ecx], 3
xor eax, eax
jmp 0x470008
push str.tftp_send_first:_internal_error
push edi
call fcn.00442490
add esp, 8
xor eax, eax
jmp 0x470008
test byte [edi + 0x6eb], 0x20
je 0x46fef1
mov eax, dword [edi + 0xd20]
test eax, eax
je 0x46feda
cmp dword [eax + 4], 0
jle 0x46fef1
push str.Connected_for_receive
push 0xa28588
push edi
mov esi, ecx
call fcn.00442520
mov ecx, esi
add esp, 0xc
mov dword [ecx], 1
mov esi, ecx
call fcn.0046fbd0
test eax, eax
jne 0x470008
mov ecx, esi
mov edx, 3
call 0x4702d0
jmp 0x470008
test byte [edi + 0x6eb], 0x20
je 0x46ff47
mov eax, dword [edi + 0xd20]
test eax, eax
je 0x46ff30
cmp dword [eax + 4], 0
jle 0x46ff47
push str.Connected_for_transmit
push 0xa28588
push edi
mov esi, ecx
call fcn.00442520
mov ecx, esi
add esp, 0xc
mov dword [ecx], 2
mov esi, ecx
call fcn.0046fbd0
test eax, eax
jne 0x470008
mov ecx, esi
mov edx, 4
call 0x4705c0
jmp 0x470008
test eax, 0x20000000
je 0x46ff9b
mov eax, dword [edi + 0xd20]
test eax, eax
je 0x46ff84
cmp dword [eax + 4], 0
jle 0x46ff9b
push str.Connected_for_transmit
push 0xa28588
push edi
mov esi, ecx
call fcn.00442520
mov ecx, esi
add esp, 0xc
mov dword [ecx], 2
mov esi, ecx
call fcn.0046fbd0
test eax, eax
jne 0x470008
mov ecx, esi
mov edx, 6
call 0x4705c0
jmp 0x470008
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 0x46ffe2
push edx
push eax
push edi
mov ebx, ecx
call fcn.004128b0
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.00445c40
add esp, 0x14
test eax, eax
je 0x470013
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 0x470062
push str.TFTP_filename_too_long
push edi
call fcn.00442490
add esp, 8
push str.tftp.c
push 0x1d8
jmp 0x4701c8
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.00409eb0
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 0x470263
test byte [edi + 0xd62], 2
je 0x4700e4
mov eax, dword [edi + 0xc68]
mov ecx, dword [edi + 0xc6c]
mov edx, eax
and edx, ecx
cmp edx, 0xffffffff
je 0x4700e4
lea edx, [esp + 0x10]
push ecx
push eax
push 0xa285e5
push 0x40
push edx
call fcn.00409eb0
add esp, 0x14
jmp 0x4700eb
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.00470910
add esp, 8
test eax, eax
je 0x47012f
lea ecx, [esp + 0x10]
mov eax, dword [esp + 4]
push dword [eax + 0x140]
push 0xa285f0
push 0x40
push ecx
call fcn.00409eb0
add esp, 0x10
jmp 0x470195
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.00470910
add esp, 8
mov esi, eax
push dword [ebx + 0x140]
push 0xa285f0
push 0x40
push ebp
call fcn.00409eb0
add esp, 0x10
test esi, esi
jne 0x470195
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.00470910
add esp, 8
test eax, eax
je 0x4701d6
lea ecx, [esp + 0x10]
mov eax, dword [esp + 4]
push dword [eax + 0x1c]
push 0xa285f0
push 0x40
push ecx
call fcn.00409eb0
add esp, 0x10
push str.TFTP_buffer_too_small_for_options
push edi
call fcn.00442490
add esp, 8
push str.tftp.c
push 0x208
push dword [esp + 0x10]
call fcn.00404af0
jmp 0x46fe25
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.00470910
add esp, 8
mov esi, eax
push dword [ebx + 0x1c]
push 0xa285f0
push 0x40
push ebp
call fcn.00409eb0
add esp, 0x10
test esi, esi
jne 0x4701b0
mov eax, dword [esp + 4]
mov ecx, dword [eax + 0x13c]
mov eax, dword [eax + 0x14c]
add eax, dword [esp]
mov edx, esp
push 0xa285fb
push eax
call fcn.00470910
add esp, 8
test eax, eax
jne 0x4701b0
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.00470910
add esp, 8
test eax, eax
jne 0x4701b0
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 0x4702b2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea ecx, [esp + 0x10]
push 0x100
push ecx
push eax
call fcn.0041a5e0
add esp, 0xc
push eax
push 0xa28588
push edi
call fcn.00442490
add esp, 0xc
push str.tftp.c
push 0x217
push dword [esp + 0x10]
call fcn.00404af0
add esp, 0xc
xor eax, eax
jmp 0x470008
push ebx
push edi
push esi
sub esp, 0x100
mov edi, dword [ecx + 0x10]
add edx, 0xfffffffd
cmp edx, 4
ja case.0x4702ea.4
mov esi, ecx
jmp dword [edx*4 + 0xa284a0]
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 0x4704d8
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 0x470549
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 0x4703fc
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 0x470549
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 0x470574
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 0x4704ae
mov eax, dword [esi + 0x18]
inc eax
mov dword [esi + 0x18], eax
test edi, edi
je 0x4704a2
test byte [edi + 0x6eb], 0x20
je 0x4704a2
mov ecx, dword [edi + 0xd20]
test ecx, ecx
je 0x470485
cmp dword [ecx + 4], 0
jle 0x4704a2
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.00442520
add esp, 0x10
mov eax, dword [esi + 0x18]
cmp eax, dword [esi + 0x20]
jle 0x470521
mov dword [esi + 8], 0xffffff9d
mov dword [esi], 3
xor eax, eax
jmp 0x470574
push str.tftp_rx:_internal_error
push 0xa28588
push edi
call fcn.00442490
add esp, 0xc
mov eax, 0x47
jmp 0x470574
movzx ecx, bx
cmp ax, bx
jne 0x47057e
test edi, edi
je 0x470318
test byte [edi + 0x6eb], 0x20
je 0x470318
mov eax, dword [edi + 0xd20]
test eax, eax
je 0x47050d
cmp dword [eax + 4], 0
jle 0x470318
push ecx
push str.Received_last_DATA_packet_block__d_again.
push edi
call fcn.00442520
add esp, 0xc
jmp 0x470318
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 0x470574
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, esp
push 0x100
push ecx
push eax
call fcn.0041a5e0
add esp, 0xc
push eax
push 0xa28588
push edi
call fcn.00442490
add esp, 0xc
mov eax, 0x37
add esp, 0x100
pop esi
pop edi
pop ebx
ret
xor eax, eax
test edi, edi
je 0x470574
test byte [edi + 0x6eb], 0x20
je 0x470574
mov esi, dword [edi + 0xd20]
test esi, esi
je 0x47059d
cmp dword [esi + 4], 0
jle 0x470574
movzx eax, dx
push eax
push ecx
push str.Received_unexpected_DATA_packet_block__d__expecting_block__d
push edi
call fcn.00442520
xor eax, eax
add esp, 0x10
jmp 0x470574
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.0x4705db
mov esi, ecx
jmp dword [eax*4 + 0xa284b4]
mov eax, dword [esi + 0x148]
movzx eax, word [eax + 2]
rol ax, 8
movzx ecx, word [esi + 0x144]
cmp ax, cx
je 0x47060e
test ecx, ecx
jne 0x470860
cmp ax, 0xffff
jne 0x470860
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 0x470630
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 0x470758
mov ecx, dword [esi + 0x13c]
cmp dword [esi + 0x138], ecx
jge 0x47075e
mov dword [esi], 3
jmp 0x470853
mov eax, dword [esi + 0x18]
inc eax
mov dword [esi + 0x18], eax
test edi, edi
je 0x4706cf
test byte [edi + 0x6eb], 0x20
je 0x4706cf
mov ecx, dword [edi + 0xd20]
test ecx, ecx
je 0x4706b2
cmp dword [ecx + 4], 0
jle 0x4706cf
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.00442520
add esp, 0x10
mov eax, dword [esi + 0x18]
cmp eax, dword [esi + 0x20]
jle 0x47080e
mov dword [esi + 8], 0xffffff9d
mov dword [esi], 3
jmp 0x470853
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 0x470853
push edx
push str.tftp_tx:_internal_error__event:__i
push edi
call fcn.00442490
jmp 0x470850
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.004157e0
add esp, 0x14
test eax, eax
jne 0x470855
mov ecx, dword [esp + 4]
mov eax, dword [esi + 0x138]
add eax, ecx
mov dword [esi + 0x138], eax
test ecx, ecx
je 0x4707bd
add ebx, ecx
mov ecx, dword [esi + 0x13c]
cmp eax, ecx
jl 0x470780
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 0x4708ce
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 0x47084a
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 0x4708ce
push dword [edi + 0xb4]
push dword [edi + 0xb0]
push edi
call fcn.00412ed0
add esp, 0xc
xor eax, eax
add esp, 0x108
pop esi
pop edi
pop ebx
pop ebp
ret
test edi, edi
je 0x470890
test byte [edi + 0x6eb], 0x20
je 0x470890
mov edx, dword [edi + 0xd20]
test edx, edx
je 0x47087d
cmp dword [edx + 4], 0
jle 0x470890
movzx eax, ax
push ecx
push eax
push str.Received_ACK_for_block__d__expecting__d
push edi
call fcn.00442520
add esp, 0x10
mov eax, dword [esi + 0x18]
lea ecx, [eax + 1]
mov dword [esi + 0x18], ecx
cmp eax, dword [esi + 0x20]
jge 0x4708ef
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 0x470855
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea ecx, [esp + 8]
push 0x100
push ecx
push eax
call fcn.0041a5e0
add esp, 0xc
push eax
push 0xa28588
jmp 0x4708fc
movzx eax, word [esi + 0x144]
push eax
push str.tftp_tx:_giving_up_waiting_for_block__d_ack
push edi
call fcn.00442490
add esp, 0xc
mov eax, 0x37
jmp 0x470855