Function at 0x46f560
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x130
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov edi, dword [eax + 0x308]
xor eax, eax
cmp dword [edi], 0
sete al
push eax
push 0
push dword [edi + 0x10]
call fcn.0043c040
add esp, 0xc
test edx, edx
js 0x46f5f3
push 0
call sub.api_ms_win_crt_time_l1_1_0.dll__time64
add esp, 4
mov ecx, dword [edi + 0x1c]
mov esi, ecx
sar esi, 0x1f
add ecx, dword [edi + 0x28]
adc esi, dword [edi + 0x2c]
cmp ecx, eax
sbb esi, edx
jge 0x46f600
push 0
call sub.api_ms_win_crt_time_l1_1_0.dll__time64
add esp, 4
mov dword [edi + 0x2c], edx
mov dword [edi + 0x28], eax
mov byte [ebx], 0
mov ecx, edi
mov edx, 7
call fcn.0046fd30
test eax, eax
jne 0x46f873
xor eax, eax
cmp dword [edi], 3
sete byte [ebx]
jne 0x46f873
push dword [ebp + 8]
jmp 0x46f869
mov dword [edi + 8], 0xffffff9d
mov dword [edi], 3
mov byte [ebx], 0
mov eax, dword [edi + 0x14]
sub esp, 0x14
movsd xmm0, qword [0xa282a0]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
call fcn.00414390
add esp, 0x14
test eax, eax
je 0x46f873
cmp eax, 0xffffffff
jne 0x46f666
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea ecx, [esp + 0x28]
push 0x100
push ecx
push eax
call fcn.0041a5e0
add esp, 0xc
push eax
push 0xa28588
push dword [ebp + 8]
call fcn.00442490
add esp, 0xc
mov dword [edi + 0xc], 5
xor eax, eax
jmp 0x46f873
mov dword [esp + 0xc], edi
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x18]
mov esi, dword [eax + 0x308]
mov dword [esp + 0x1c], pe_nt_image_headers32
mov eax, dword [esi + 0x13c]
add eax, 4
lea ecx, [esp + 0x1c]
lea edi, [esp + 0x28]
push ecx
push edi
push 0
push eax
push dword [esi + 0x148]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edx, eax
mov dword [esi + 0x134], eax
cmp dword [esi + 0x130], 0
je 0x46f6d7
cmp edx, 3
jg 0x46f704
push str.Received_too_short_packet
push ebx
call fcn.00442490
add esp, 8
mov dword [esi + 0xc], 7
mov esi, dword [esp + 0xc]
jmp 0x46f84d
lea eax, [esi + 0xb0]
mov ebx, esi
mov esi, dword [esp + 0x1c]
push esi
push edi
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov dword [ebx + 0x130], esi
mov esi, ebx
mov ebx, dword [ebp + 8]
mov edx, dword [esi + 0x134]
cmp edx, 3
jle 0x46f6b9
mov edi, dword [esi + 0x148]
movzx eax, word [edi]
rol ax, 8
movzx eax, ax
mov dword [esp + 4], esi
mov dword [esi + 0xc], eax
add eax, 0xfffffffd
cmp eax, 3
ja case.default.0x46f72b
mov esi, dword [esp + 0xc]
jmp dword [eax*4 + 0xa282b0]
cmp edx, 4
je case.0x46f72b.4
mov eax, dword [esp + 4]
mov eax, dword [eax + 0x144]
inc eax
movzx ecx, word [edi + 2]
rol cx, 8
cmp ax, cx
jne case.0x46f72b.4
add edi, 4
add edx, 0xfffffffc
push edx
push edi
push 1
push ebx
call fcn.00414bc0
add esp, 0x10
test eax, eax
je case.0x46f72b.4
mov ecx, dword [esp + 4]
mov edx, 5
mov esi, eax
call fcn.0046fd30
mov eax, esi
jmp 0x46f873
movzx eax, word [edi + 2]
rol ax, 8
movzx eax, ax
add edi, 4
mov dword [esp + 8], edi
add edx, 0xfffffffc
mov ecx, dword [esp + 4]
mov dword [ecx + 8], eax
push edx
push 0
push edi
mov edi, edx
call sub.api_ms_win_crt_private_l1_1_0.dll_memchr
mov edx, dword [esp + 0x14]
add esp, 0xc
test eax, eax
je case.0x46f72b.4
sub eax, edx
cmp eax, edi
jae case.0x46f72b.4
test byte [ebx + 0x6eb], 0x20
je case.0x46f72b.4
mov eax, dword [ebx + 0xd20]
test eax, eax
je 0x46f7da
cmp dword [eax + 4], 0
jle case.0x46f72b.4
push edx
push str.TFTP_error:__s
push ebx
call fcn.00442520
add esp, 0xc
jmp case.0x46f72b.4
lea eax, [edi + 2]
mov dword [esp + 8], eax
mov eax, dword [esp + 4]
mov ecx, edi
mov edi, dword [eax + 0x10]
mov dword [eax + 0x13c], 0x200
add edx, ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x18], edi
jmp 0x46f8a9
push str.Internal_error:_Unexpected_packet
push 0xa28588
push ebx
call fcn.00442490
add esp, 0xc
mov esi, dword [esp + 0xc]
push ebx
call fcn.00411e90
add esp, 4
test eax, eax
je 0x46f84d
mov ecx, dword [esp + 4]
mov edx, 5
call fcn.0046fd30
mov eax, 0x2a
jmp 0x46f873
mov edx, dword [esi + 0xc]
mov ecx, esi
call fcn.0046fd30
test eax, eax
jne 0x46f873
xor eax, eax
cmp dword [esi], 3
mov ecx, dword [ebp + 0xc]
sete byte [ecx]
jne 0x46f873
push ebx
call fcn.0041c4a0
xor eax, eax
add esp, 4
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push ecx
push str.requested
push eax
push str.blksize_parsed_from_OACK
push str._s___d___s___d_
push edi
call fcn.00442520
add esp, 0x18
add esi, dword [esp + 0x14]
mov edx, dword [esp + 0x24]
mov dword [esp + 8], esi
cmp esi, edx
mov esi, dword [esp + 0xc]
jae case.0x46f72b.4
mov esi, edx
mov edi, dword [esp + 8]
sub esi, edi
push esi
push 0
push edi
call sub.api_ms_win_crt_private_l1_1_0.dll_memchr
add esp, 0xc
mov ebx, eax
sub ebx, edi
test eax, eax
cmove ebx, esi
lea eax, [ebx + 1]
mov edi, esi
sub edi, eax
jbe 0x46fa64
add eax, dword [esp + 8]
mov dword [esp + 0x14], eax
push edi
push 0
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memchr
add esp, 0xc
mov ecx, eax
sub ecx, dword [esp + 0x14]
test eax, eax
cmove ecx, edi
lea eax, [ebx + ecx]
add eax, 2
cmp eax, esi
ja 0x46fa64
mov dword [esp + 0x14], eax
mov esi, dword [esp + 8]
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
lea ebx, [esi + eax]
inc ebx
mov edi, dword [esp + 0x18]
test edi, edi
je 0x46f946
test byte [edi + 0x6eb], 0x20
je 0x46f946
mov eax, dword [edi + 0xd20]
test eax, eax
je 0x46f936
cmp dword [eax + 4], 0
jle 0x46f946
push ebx
push esi
push str.got_option__s__value__s_
push edi
call fcn.00442520
add esp, 0x10
mov dword [esp + 0x10], ebx
push 7
push str.blksize
push esi
call fcn.0041a290
add esp, 0xc
test eax, eax
mov ebx, dword [ebp + 8]
mov eax, esi
je 0x46f9db
mov esi, eax
push 0xa
push 0
push dword [esp + 0x18]
call sub.api_ms_win_crt_convert_l1_1_0.dll_strtol
add esp, 0xc
test eax, eax
je 0x46fa6f
cmp eax, 0xffb9
jge 0x46fa87
cmp eax, 7
jle 0x46fa93
mov edx, dword [esp + 4]
mov ecx, dword [edx + 0x140]
cmp eax, ecx
jg 0x46faa1
mov dword [edx + 0x13c], eax
test edi, edi
je 0x46f895
test byte [edi + 0x6eb], 0x20
je 0x46f895
mov edx, dword [edi + 0xd20]
test edx, edx
je 0x46f87b
cmp dword [edx + 4], 0
jg 0x46f87b
jmp 0x46f895
push 5
push str.tsize
mov esi, eax
push eax
call fcn.0041a290
add esp, 0xc
test eax, eax
je 0x46f895
push 0xa
push 0
push dword [esp + 0x18]
call sub.api_ms_win_crt_convert_l1_1_0.dll_strtol
add esp, 0xc
test edi, edi
je 0x46fa3e
test byte [edi + 0x6eb], 0x20
je 0x46fa3e
mov ecx, dword [edi + 0xd20]
test ecx, ecx
je 0x46fa22
cmp dword [ecx + 4], 0
jle 0x46fa3e
push eax
push str.tsize_parsed_from_OACK
push str._s___ld_
push edi
mov dword [esp + 0x30], eax
call fcn.00442520
mov eax, dword [esp + 0x30]
add esp, 0x10
test byte [edi + 0xd62], 2
jne 0x46f895
test eax, eax
je 0x46fabf
mov ecx, eax
sar ecx, 0x1f
push ecx
push eax
push edi
call fcn.00412860
add esp, 0xc
jmp 0x46f895
push str.Malformed_ACK_packet__rejecting
push dword [esp + 0x1c]
jmp 0x46fa75
push str.invalid_blocksize_value_in_OACK_packet
push edi
call fcn.00442490
add esp, 8
mov eax, 0x47
jmp 0x46f873
push 0xffb8
push str.blksize_is_larger_than_max_supported
jmp 0x46fa9a
push 8
push str.blksize_is_smaller_than_min_supported
push str._s___d_
jmp 0x46faac
push eax
push str.server_requested_blksize_larger_than_allocated
push str._s___ld_
push edi
call fcn.00442490
add esp, 0x10
mov eax, 0x47
jmp 0x46f873
push dword [esp + 0x10]
push str.invalid_tsize__:_s:__value_in_OACK_packet
push edi
call fcn.00442490
add esp, 0xc
mov eax, 0x47
jmp 0x46f873