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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xdc
mov ebp, dword [esp + 0xf0]
mov edi, dword [ebp]
mov ebx, dword [ebp + 0x498]
lea esi, [esp + 0x4c]
mov dword [esp], esi
call sub.msvcrt.dll_time
mov ecx, dword [ebx + 0x28]
mov eax, dword [esp + 0x4c]
cmp ecx, eax
jl 0x42a1e8
mov edx, dword [ebx + 0x2c]
add edx, dword [ebx + 0x1c]
cmp eax, edx
jg 0x42a18c
mov edx, dword [esp + 0xf4]
mov dword [edx], 0
sub ecx, eax
test ecx, ecx
jle 0x42a202
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 fcn.0040338c
cmp eax, 0xffffffff
je 0x42a26c
test eax, eax
je 0x42a1d6
mov edx, dword [ebp]
mov dword [esp + 0x34], edx
mov eax, dword [ebp + 0x498]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x4c], pe_nt_image_headers32
mov dword [esp + 0x14], esi
lea esi, [esp + 0x50]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0
mov edx, dword [eax + 0x144]
mov eax, edx
add eax, 4
mov dword [esp + 8], eax
mov ecx, dword [esp + 0x2c]
mov eax, dword [ecx + 0x14c]
mov dword [esp + 4], eax
mov eax, dword [ecx + 0x14]
mov dword [esp], eax
call sub.WS2_32.dll_recvfrom
sub esp, 0x18
mov edi, dword [esp + 0x2c]
mov dword [edi + 0x13c], eax
mov edx, dword [edi + 0x138]
test edx, edx
je 0x42a2db
cmp eax, 3
jle 0x42a2b7
mov edx, dword [esp + 0x2c]
mov esi, dword [edx + 0x14c]
movzx ecx, byte [esi]
shl ecx, 8
movzx edx, byte [esi + 1]
or edx, ecx
movzx ecx, dx
mov edi, dword [esp + 0x2c]
mov dword [edi + 0xc], ecx
cmp dx, 4
je 0x42a175
ja 0x42a303
cmp dx, 3
je 0x42a56c
mov dword [esp + 8], str.Internal_error:_Unexpected_packet
mov dword [esp + 4], 0x5aa18a
mov edx, dword [esp + 0x34]
mov dword [esp], edx
call fcn.0040dcf0
mov dword [esp], ebp
call fcn.00419a40
test eax, eax
jne 0x42a29f
mov edx, dword [ebx + 0xc]
jmp 0x42a1b4
lea eax, [ebx + 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_time
mov eax, dword [ebx + 0x28]
sub eax, dword [esp + 0x4c]
mov edx, dword [esp + 0xf4]
mov dword [edx], 0
test eax, eax
jle 0x42a202
mov edx, 7
mov eax, ebx
call fcn.00429c1c
mov esi, eax
test eax, eax
jne 0x42a1d8
xor eax, eax
cmp dword [ebx], 3
sete al
mov ecx, dword [esp + 0xf4]
mov dword [ecx], eax
test eax, eax
jne 0x42a224
xor esi, esi
mov eax, esi
add esp, 0xdc
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebx + 8], 0xffffff9d
mov dword [ebx], 3
mov eax, dword [esp + 0xf4]
mov dword [eax], 0
mov dword [esp + 4], str.TFTP_response_timeout
mov dword [esp], edi
call fcn.0040dcf0
mov esi, 0x1c
mov eax, esi
add esp, 0xdc
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x1c], 0
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], ebp
call fcn.0043dff4
jmp 0x42a1d6
call sub.WS2_32.dll_WSAGetLastError
mov dword [esp + 4], eax
mov dword [esp], ebp
call fcn.0040227c
mov dword [esp + 8], eax
mov dword [esp + 4], 0x5aa18a
mov dword [esp], edi
call fcn.0040dcf0
mov dword [ebx + 0xc], 5
xor esi, esi
jmp 0x42a1d8
mov edx, 5
mov eax, dword [esp + 0x2c]
call fcn.00429c1c
mov esi, 0x2a
jmp 0x42a1d8
mov dword [esp + 4], str.Received_too_short_packet
mov edx, dword [esp + 0x34]
mov dword [esp], edx
call fcn.0040dcf0
mov eax, dword [esp + 0x2c]
mov dword [eax + 0xc], 7
jmp 0x42a185
mov eax, edi
add eax, 0xb8
mov ecx, dword [esp + 0x4c]
mov edi, eax
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x2c]
mov dword [edx + 0x138], eax
mov eax, dword [edx + 0x13c]
jmp 0x42a11a
cmp dx, 5
je 0x42a535
cmp dx, 6
jne 0x42a159
add esi, 2
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + 0x10]
mov edx, dword [edx]
mov dword [esp + 0x34], edx
mov dword [ecx + 0x144], 0x200
lea eax, [esi + eax - 2]
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebp
lea esi, [esi]
cmp esi, dword [esp + 0x30]
jae 0x42a612
mov ebx, dword [esp + 0x30]
sub ebx, esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], esi
call sub.msvcrt.dll_memchr
test eax, eax
je 0x42a52e
mov ecx, eax
sub ecx, esi
lea edi, [ecx + 1]
cmp ebx, edi
jbe 0x42a5f4
mov ebp, ebx
sub ebp, edi
add edi, esi
mov dword [esp + 8], ebp
mov dword [esp + 4], 0
mov dword [esp], edi
mov dword [esp + 0x20], ecx
call sub.msvcrt.dll_memchr
test eax, eax
mov ecx, dword [esp + 0x20]
je 0x42a3a9
mov ebp, eax
sub ebp, edi
lea edx, [ecx + ebp + 2]
cmp ebx, edx
jb 0x42a5f4
mov ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
lea ebx, [esi + ecx]
mov ebp, esi
add ebp, edx
je 0x42a5f4
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov dword [esp + 4], str.got_option__s__value__s__n
mov edx, dword [esp + 0x34]
mov dword [esp], edx
call fcn.0040e21c
mov ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 8], ecx
mov dword [esp + 4], str.blksize
mov dword [esp], esi
call fcn.0041520c
test eax, eax
je 0x42a498
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.msvcrt.dll_strtol
test eax, eax
je 0x42a690
cmp eax, 0xffb8
jg 0x42a667
cmp eax, 7
jle 0x42a641
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + 0x148]
cmp eax, edx
jg 0x42a61f
mov ecx, dword [esp + 0x2c]
mov dword [ecx + 0x144], eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], str.requested
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.blksize_parsed_from_OACK
mov dword [esp + 4], str._s___d___s___d__n
mov edx, dword [esp + 0x34]
mov dword [esp], edx
call fcn.0040e21c
mov esi, ebp
jmp 0x42a344
mov ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 8], ecx
mov dword [esp + 4], str.tsize
mov dword [esp], esi
call fcn.0041520c
test eax, eax
je 0x42a491
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.msvcrt.dll_strtol
mov esi, eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.tsize_parsed_from_OACK
mov dword [esp + 4], str._s___ld__n
mov edx, dword [esp + 0x34]
mov dword [esp], edx
call fcn.0040e21c
mov edx, dword [esp + 0x34]
mov eax, dword [edx + 0x354]
test eax, eax
jne 0x42a491
test esi, esi
je 0x42a6bc
mov dword [esp + 4], esi
mov ecx, esi
sar ecx, 0x1f
mov dword [esp + 8], ecx
mov edx, dword [esp + 0x34]
mov dword [esp], edx
call fcn.004199c0
mov esi, ebp
jmp 0x42a344
mov ecx, ebx
jmp 0x42a374
movzx edx, byte [esi + 2]
shl edx, 8
movzx eax, byte [esi + 3]
or eax, edx
movzx eax, ax
mov edi, dword [esp + 0x2c]
mov dword [edi + 8], eax
add esi, 4
mov dword [esp + 8], esi
mov dword [esp + 4], 0x5aa240
mov edx, dword [esp + 0x34]
mov dword [esp], edx
call fcn.0040e21c
jmp 0x42a175
cmp eax, 4
je 0x42a175
mov edx, dword [esp + 0x2c]
movzx edi, word [edx + 0x30]
inc edi
movzx ecx, byte [esi + 2]
shl ecx, 8
movzx edx, byte [esi + 3]
or edx, ecx
cmp dx, di
jne 0x42a175
sub eax, 4
mov dword [esp + 0xc], eax
add esi, 4
mov dword [esp + 8], esi
mov dword [esp + 4], 1
mov dword [esp], ebp
call fcn.0040e044
mov esi, eax
test eax, eax
jne 0x42a6a9
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 0x13c]
mov dword [esp + 0x24], eax
sub eax, 4
cdq
mov ecx, dword [esp + 0x34]
add eax, dword [ecx + 0x70]
adc edx, dword [ecx + 0x74]
mov dword [ecx + 0x70], eax
mov dword [ecx + 0x74], edx
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp], ecx
call fcn.00419988
jmp 0x42a175
mov dword [esp + 4], str.Malformed_ACK_packet__rejecting
mov edx, dword [esp + 0x34]
mov dword [esp], edx
call fcn.0040dcf0
mov esi, 0x47
jmp 0x42a1d8
mov ebx, dword [esp + 0x38]
mov ebp, dword [esp + 0x3c]
jmp 0x42a175
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.server_requested_blksize_larger_than_allocated
mov dword [esp + 4], str._s___ld_
mov edx, dword [esp + 0x34]
mov dword [esp], edx
call fcn.0040dcf0
jmp 0x42a608
mov dword [esp + 0xc], 8
mov dword [esp + 8], str.blksize_is_smaller_than_min_supported
mov dword [esp + 4], str._s___d_
mov edx, dword [esp + 0x34]
mov dword [esp], edx
call fcn.0040dcf0
jmp 0x42a608
mov dword [esp + 0xc], 0xffb8
mov dword [esp + 8], str.blksize_is_larger_than_max_supported
mov dword [esp + 4], str._s___d_
mov edx, dword [esp + 0x34]
mov dword [esp], edx
call fcn.0040dcf0
jmp 0x42a608
mov dword [esp + 4], str.invalid_blocksize_value_in_OACK_packet
mov edx, dword [esp + 0x34]
mov dword [esp], edx
call fcn.0040dcf0
jmp 0x42a608
mov edx, 5
mov eax, dword [esp + 0x2c]
call fcn.00429c1c
jmp 0x42a1d8
mov dword [esp + 8], ebx
mov dword [esp + 4], str.invalid_tsize__:_s:__value_in_OACK_packet
mov dword [esp], edx
call fcn.0040dcf0
jmp 0x42a608