Function at 0x470a00
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.0043d4e0
add esp, 0xc
test edx, edx
js 0x470a93
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 0x470aa0
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.004711d0
test eax, eax
jne 0x470d13
xor eax, eax
cmp dword [edi], 3
sete byte [ebx]
jne 0x470d13
push dword [ebp + 8]
jmp 0x470d09
mov dword [edi + 8], 0xffffff9d
mov dword [edi], 3
mov byte [ebx], 0
mov eax, dword [edi + 0x14]
sub esp, 0x14
movsd xmm0, qword [0xa079f0]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
call fcn.00415830
add esp, 0x14
test eax, eax
je 0x470d13
cmp eax, 0xffffffff
jne 0x470b06
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
lea ecx, [esp + 0x28]
push 0x100
push ecx
push eax
call fcn.0041ba80
add esp, 0xc
push eax
push 0xa07cd8
push dword [ebp + 8]
call fcn.00443930
add esp, 0xc
mov dword [edi + 0xc], 5
xor eax, eax
jmp 0x470d13
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 0x470b77
cmp edx, 3
jg 0x470ba4
push str.Received_too_short_packet
push ebx
call fcn.00443930
add esp, 8
mov dword [esi + 0xc], 7
mov esi, dword [esp + 0xc]
jmp 0x470ced
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 0x470b59
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.0x470bcb
mov esi, dword [esp + 0xc]
jmp dword [eax*4 + 0xa07a00]
cmp edx, 4
je case.0x470bcb.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.0x470bcb.4
add edi, 4
add edx, 0xfffffffc
push edx
push edi
push 1
push ebx
call fcn.00416060
add esp, 0x10
test eax, eax
je case.0x470bcb.4
mov ecx, dword [esp + 4]
mov edx, 5
mov esi, eax
call fcn.004711d0
mov eax, esi
jmp 0x470d13
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.0x470bcb.4
sub eax, edx
cmp eax, edi
jae case.0x470bcb.4
test byte [ebx + 0x6eb], 0x20
je case.0x470bcb.4
mov eax, dword [ebx + 0xd20]
test eax, eax
je 0x470c7a
cmp dword [eax + 4], 0
jle case.0x470bcb.4
push edx
push str.TFTP_error:__s
push ebx
call fcn.004439c0
add esp, 0xc
jmp case.0x470bcb.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 0x470d49
push str.Internal_error:_Unexpected_packet
push 0xa07cd8
push ebx
call fcn.00443930
add esp, 0xc
mov esi, dword [esp + 0xc]
push ebx
call fcn.00413330
add esp, 4
test eax, eax
je 0x470ced
mov ecx, dword [esp + 4]
mov edx, 5
call fcn.004711d0
mov eax, 0x2a
jmp 0x470d13
mov edx, dword [esi + 0xc]
mov ecx, esi
call fcn.004711d0
test eax, eax
jne 0x470d13
xor eax, eax
cmp dword [esi], 3
mov ecx, dword [ebp + 0xc]
sete byte [ecx]
jne 0x470d13
push ebx
call fcn.0041d940
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.004439c0
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.0x470bcb.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 0x470f04
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 0x470f04
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 0x470de6
test byte [edi + 0x6eb], 0x20
je 0x470de6
mov eax, dword [edi + 0xd20]
test eax, eax
je 0x470dd6
cmp dword [eax + 4], 0
jle 0x470de6
push ebx
push esi
push str.got_option__s__value__s_
push edi
call fcn.004439c0
add esp, 0x10
mov dword [esp + 0x10], ebx
push 7
push str.blksize
push esi
call fcn.0041b730
add esp, 0xc
test eax, eax
mov ebx, dword [ebp + 8]
mov eax, esi
je 0x470e7b
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 0x470f0f
cmp eax, 0xffb9
jge 0x470f27
cmp eax, 7
jle 0x470f33
mov edx, dword [esp + 4]
mov ecx, dword [edx + 0x140]
cmp eax, ecx
jg 0x470f41
mov dword [edx + 0x13c], eax
test edi, edi
je 0x470d35
test byte [edi + 0x6eb], 0x20
je 0x470d35
mov edx, dword [edi + 0xd20]
test edx, edx
je 0x470d1b
cmp dword [edx + 4], 0
jg 0x470d1b
jmp 0x470d35
push 5
push str.tsize
mov esi, eax
push eax
call fcn.0041b730
add esp, 0xc
test eax, eax
je 0x470d35
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 0x470ede
test byte [edi + 0x6eb], 0x20
je 0x470ede
mov ecx, dword [edi + 0xd20]
test ecx, ecx
je 0x470ec2
cmp dword [ecx + 4], 0
jle 0x470ede
push eax
push str.tsize_parsed_from_OACK
push str._s___ld_
push edi
mov dword [esp + 0x30], eax
call fcn.004439c0
mov eax, dword [esp + 0x30]
add esp, 0x10
test byte [edi + 0xd62], 2
jne 0x470d35
test eax, eax
je 0x470f5f
mov ecx, eax
sar ecx, 0x1f
push ecx
push eax
push edi
call fcn.00413d00
add esp, 0xc
jmp 0x470d35
push str.Malformed_ACK_packet__rejecting
push dword [esp + 0x1c]
jmp 0x470f15
push str.invalid_blocksize_value_in_OACK_packet
push edi
call fcn.00443930
add esp, 8
mov eax, 0x47
jmp 0x470d13
push 0xffb8
push str.blksize_is_larger_than_max_supported
jmp 0x470f3a
push 8
push str.blksize_is_smaller_than_min_supported
push str._s___d_
jmp 0x470f4c
push eax
push str.server_requested_blksize_larger_than_allocated
push str._s___ld_
push edi
call fcn.00443930
add esp, 0x10
mov eax, 0x47
jmp 0x470d13
push dword [esp + 0x10]
push str.invalid_tsize__:_s:__value_in_OACK_packet
push edi
call fcn.00443930
add esp, 0xc
mov eax, 0x47
jmp 0x470d13