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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xdc
mov ebp, dword [sym.imp.msvcrt.dll_time]
mov eax, dword [esp + 0xf0]
lea esi, [esp + 0x50]
mov ebx, dword [eax + 0x428]
mov edi, dword [eax]
mov dword [esp], esi
call ebp
mov eax, dword [esp + 0x50]
mov ecx, dword [ebx + 0x28]
cmp ecx, eax
jl 0x431b00
mov edx, dword [ebx + 0x1c]
add edx, dword [ebx + 0x2c]
cmp eax, edx
jle 0x4319e0
lea eax, [ebx + 0x2c]
mov dword [esp], eax
call ebp
mov ecx, dword [esp + 0xf4]
mov eax, dword [ebx + 0x28]
mov edx, 7
sub eax, dword [esp + 0x50]
mov byte [ecx], 0
test eax, eax
jle 0x431b17
mov eax, ebx
call sym._tftp_state_machine
mov esi, eax
test eax, eax
jne 0x4319c9
mov eax, dword [esp + 0xf4]
cmp dword [ebx], 3
sete byte [eax]
je 0x431b38
xor esi, esi
add esp, 0xdc
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [esp + 0xf4]
mov byte [edx], 0
cmp ecx, eax
je 0x431b17
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call sym._Curl_socket_check
cmp eax, 0xffffffff
je 0x431da0
test eax, eax
je 0x4319c7
mov eax, dword [esp + 0xf0]
mov dword [esp + 0x4c], pe_nt_image_headers32
mov ecx, dword [eax + 0x428]
mov edi, dword [eax]
lea eax, [esp + 0x4c]
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0
mov eax, dword [ecx + 0x144]
mov dword [esp + 0x2c], ecx
add eax, 4
mov dword [esp + 8], eax
mov eax, dword [ecx + 0x14c]
mov dword [esp + 4], eax
mov eax, dword [ecx + 0x14]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_recvfrom]
sub esp, 0x18
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + 0x138]
mov dword [ecx + 0x13c], eax
test edx, edx
je 0x431f50
cmp eax, 3
jle 0x431f28
mov esi, dword [ecx + 0x14c]
movzx edx, word [esi]
rol dx, 8
movzx ebp, dx
mov dword [ecx + 0xc], ebp
cmp dx, 5
je 0x431ea8
jg 0x431b90
cmp dx, 3
je 0x431de0
cmp dx, 4
jne 0x431e80
mov eax, dword [esp + 0xf0]
mov dword [esp + 0x2c], ecx
mov dword [esp], eax
call sym._Curl_pgrsUpdate
mov ecx, dword [esp + 0x2c]
test eax, eax
jne 0x431f0f
mov edx, dword [ebx + 0xc]
jmp 0x4319a7
mov eax, dword [esp + 0xf4]
mov dword [ebx + 8], 0xffffff9d
mov dword [ebx], 3
mov byte [eax], 0
mov dword [esp + 4], str.TFTP_response_timeout
mov esi, 0x1c
mov dword [esp], edi
call sym._Curl_failf
jmp 0x4319c9
mov eax, dword [esp + 0xf0]
mov dword [esp + 0x1c], 0
xor esi, esi
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0xffffffff
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call sym._Curl_setup_transfer
jmp 0x4319c9
cmp dx, 6
jne 0x431e80
mov edx, dword [ecx + 0x10]
add eax, esi
lea ebp, [esi + 2]
mov dword [esp + 0x2c], eax
mov edi, dword [edx]
mov dword [ecx + 0x144], 0x200
mov dword [esp + 0x30], edi
cmp ebp, eax
jae 0x431acf
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x38], ecx
jmp 0x431c5a
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0
mov dword [esp], edi
call sym._strtol
test eax, eax
je 0x43201c
cmp eax, 0xffb8
jg 0x431ff3
cmp eax, 7
jle 0x431fcd
mov edi, dword [esp + 0x38]
mov edx, dword [edi + 0x148]
cmp eax, edx
jg 0x431fab
mov edi, dword [esp + 0x38]
mov dword [edi + 0x144], eax
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], str.requested
mov dword [esp + 8], str.blksize_parsed_from_OACK
mov dword [esp + 4], str._s___d___s___d__n
mov dword [esp], eax
call sym._Curl_infof
mov eax, dword [esp + 0x2c]
cmp ebx, eax
jae 0x431f9e
mov ebp, ebx
mov esi, dword [esp + 0x2c]
mov dword [esp + 4], 0
mov dword [esp], ebp
sub esi, ebp
mov dword [esp + 8], esi
call sym._memchr
mov edi, eax
sub edi, ebp
test eax, eax
cmove edi, esi
lea ebx, [edi + 1]
cmp ebx, esi
jae 0x431f80
mov edx, esi
mov dword [esp + 4], 0
sub edx, ebx
add ebx, ebp
mov dword [esp + 8], edx
mov dword [esp], ebx
mov dword [esp + 0x34], edx
call sym._memchr
mov edx, dword [esp + 0x34]
mov ecx, eax
sub ecx, ebx
test eax, eax
cmovne edx, ecx
lea ebx, [edi + edx + 2]
cmp esi, ebx
jb 0x431f80
mov dword [esp], ebp
add ebx, ebp
call sym._strlen
mov dword [esp + 8], ebp
lea edi, [ebp + eax + 1]
mov eax, dword [esp + 0x30]
mov dword [esp + 4], str.got_option__s__value__s__n
mov dword [esp + 0xc], edi
mov dword [esp], eax
call sym._Curl_infof
mov dword [esp], ebp
call sym._strlen
mov dword [esp + 4], str.blksize
mov dword [esp + 8], eax
mov dword [esp], ebp
call sym._curl_strnequal
test eax, eax
jne 0x431bd0
mov dword [esp], ebp
call sym._strlen
mov dword [esp + 4], str.tsize
mov dword [esp + 8], eax
mov dword [esp], ebp
call sym._curl_strnequal
test eax, eax
je 0x431c4c
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0
mov dword [esp], edi
call sym._strtol
mov ebp, dword [esp + 0x30]
mov dword [esp + 8], str.tsize_parsed_from_OACK
mov dword [esp + 0xc], eax
mov esi, eax
mov dword [esp + 4], str._s___ld__n
mov dword [esp], ebp
call sym._Curl_infof
cmp byte [ebp + 0x4d9], 0
jne 0x431c4c
test esi, esi
je 0x432046
mov eax, dword [esp + 0x30]
mov dword [esp + 4], esi
sar esi, 0x1f
mov dword [esp + 8], esi
mov dword [esp], eax
call sym._Curl_pgrsSetDownloadSize
jmp 0x431c4c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
xor esi, esi
mov dword [esp + 4], eax
mov eax, dword [esp + 0xf0]
mov dword [esp], eax
call sym._Curl_strerror
mov dword [esp + 4], 0x46310a
mov dword [esp + 8], eax
mov dword [esp], edi
call sym._Curl_failf
mov dword [ebx + 0xc], 5
jmp 0x4319c9
cmp eax, 4
je 0x431acf
movzx edx, word [ecx + 0x30]
lea ebp, [edx + 1]
movzx edx, word [esi + 2]
rol dx, 8
cmp dx, bp
jne 0x431acf
sub eax, 4
add esi, 4
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xf0]
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 0x2c], ecx
call sym._Curl_client_write
mov ecx, dword [esp + 0x2c]
test eax, eax
mov esi, eax
jne 0x432035
mov eax, dword [ecx + 0x13c]
mov dword [esp + 0x2c], ecx
sub eax, 4
cdq
add eax, dword [edi + 0x90]
adc edx, dword [edi + 0x94]
mov dword [edi + 0x90], eax
mov dword [edi + 0x94], edx
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp], edi
call sym._Curl_pgrsSetDownloadCounter
mov ecx, dword [esp + 0x2c]
jmp 0x431acf
mov dword [esp + 8], str.Internal_error:_Unexpected_packet
mov dword [esp + 4], 0x46310a
mov dword [esp], edi
mov dword [esp + 0x2c], ecx
call sym._Curl_failf
mov ecx, dword [esp + 0x2c]
jmp 0x431acf
lea edx, [eax - 4]
movzx eax, word [esi + 2]
lea ebp, [esi + 4]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], edx
rol ax, 8
movzx eax, ax
mov dword [ecx + 8], eax
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], ebp
call sym._memchr
mov ecx, dword [esp + 0x2c]
test eax, eax
je 0x431acf
mov edx, dword [esp + 0x30]
sub eax, ebp
cmp eax, edx
jae 0x431acf
mov dword [esp + 8], ebp
mov dword [esp + 4], str.TFTP_error:__s_n
mov dword [esp], edi
call sym._Curl_infof
mov ecx, dword [esp + 0x2c]
jmp 0x431acf
mov edx, 5
mov eax, ecx
mov esi, 0x2a
call sym._tftp_state_machine
jmp 0x4319c9
mov dword [esp + 4], str.Received_too_short_packet
mov dword [esp], edi
mov dword [esp + 0x2c], ecx
call sym._Curl_failf
mov ecx, dword [esp + 0x2c]
mov dword [ecx + 0xc], 7
jmp 0x431aee
mov ebp, dword [esp + 0x4c]
lea eax, [ecx + 0xb8]
mov dword [esp + 4], esi
mov dword [esp], eax
mov dword [esp + 8], ebp
call sym._memcpy
mov ecx, dword [esp + 0x2c]
mov dword [ecx + 0x138], ebp
mov eax, dword [ecx + 0x13c]
jmp 0x431a8f
mov eax, dword [esp + 0x30]
mov dword [esp + 4], str.Malformed_ACK_packet__rejecting
mov dword [esp], eax
call sym._Curl_failf
mov esi, 0x47
jmp 0x4319c9
mov ebx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
jmp 0x431acf
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 8], str.server_requested_blksize_larger_than_allocated
mov dword [esp + 4], str._s___ld_
mov dword [esp], eax
call sym._Curl_failf
jmp 0x431f94
mov eax, dword [esp + 0x30]
mov dword [esp + 0xc], 8
mov dword [esp + 8], str.blksize_is_smaller_than_min_supported
mov dword [esp + 4], str._s___d_
mov dword [esp], eax
call sym._Curl_failf
jmp 0x431f94
mov eax, dword [esp + 0x30]
mov dword [esp + 0xc], 0xffb8
mov dword [esp + 8], str.blksize_is_larger_than_max_supported
mov dword [esp + 4], str._s___d_
mov dword [esp], eax
call sym._Curl_failf
jmp 0x431f94
mov eax, dword [esp + 0x30]
mov dword [esp + 4], str.invalid_blocksize_value_in_OACK_packet
mov dword [esp], eax
call sym._Curl_failf
jmp 0x431f94
mov edx, 5
mov eax, ecx
call sym._tftp_state_machine
jmp 0x4319c9
mov eax, dword [esp + 0x30]
mov dword [esp + 8], edi
mov dword [esp + 4], str.invalid_tsize__:_s:__value_in_OACK_packet
mov dword [esp], eax
call sym._Curl_failf
jmp 0x431f94