Function at 0x40a45b
Capabilities:
Get file size
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x438
mov eax, dword [0x42a43c]
xor eax, esp
mov dword [esp + 0x434], eax
push ebx
push esi
push edi
mov edi, dword [esp + 0x448]
movzx eax, word [edi + 0x4278]
xor ebx, ebx
push eax
mov dword [esp + 0x1c], ebx
mov byte [edi + 0x4475], bl
call dword [sym.imp.WS2_32.dll_ntohs]
movzx esi, ax
mov dword [esp + 0x14], esi
cmp esi, 1
je 0x40a4d0
cmp esi, 2
je 0x40a4d0
push esi
push str.Unexpected_request__d_from_peer
push ebx
call fcn.004010eb
push str.Returning_EBADOP_to_Peer
push ebx
call fcn.004010eb
push 4
push edi
call fcn.0040a0ad
add esp, 0x1c
mov eax, 0x3ec
jmp 0x40ab22
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [edi + 0x427a]
push ebx
call ebp
cmp eax, 0x104
jge 0x40a662
push 0x25
push ebx
call fcn.0040ec60
pop ecx
pop ecx
test eax, eax
je 0x40a50c
push str.Error:_Tftpd32_does_not_handle_filenames_with_a_percent_sign
push 1
call fcn.004010eb
push 2
jmp 0x40a670
push ebx
push str.FileName_is___s_
push 9
call fcn.004010eb
add esp, 0xc
cmp esi, 1
jne 0x40a52f
cmp dword [0x429c0c], 0
je 0x40a52f
call fcn.0040b5dc
push ebx
call ebp
mov esi, eax
inc esi
push str.netascii
lea ebx, [esi + edi + 0x427a]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40a5b5
push str.ascii
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40a5b5
push str.mail
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40a575
mov dword [edi + 0x50], 2
jmp 0x40a5bc
push str.octet
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40a5af
push str.binary
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40a5af
push str.OCTET
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40a5af
push str.Uncorrect_message
jmp 0x40a667
and dword [edi + 0x50], 0
jmp 0x40a5bc
mov dword [edi + 0x50], 1
push ebx
push str.Mode_is___s_
push 0xc
call fcn.004010eb
add esp, 0xc
push ebx
call ebp
cmp dword [esp + 0x18], 1
lea eax, [esi + eax + 1]
mov dword [esp + 0x10], eax
mov eax, str.Read
je 0x40a5e8
mov eax, str.Write
push ebx
lea esi, [edi + 0x427a]
push esi
push eax
push str._s_request_for_file___s_._Mode__s
push 1
call fcn.004010eb
push esi
call fcn.0040a148
push dword [esp + 0x30]
push esi
call fcn.00409ff9
add esp, 0x20
test eax, eax
jne 0x40a637
call fcn.0040c636
push eax
push esi
push str.Error_EACCESS_on_file__s._Ext_error__s
push 1
call fcn.004010eb
push 2
push edi
call fcn.0040a0ad
add esp, 0x18
jmp 0x40a6d5
push esi
lea esi, [esp + 0x240]
call fcn.0040a1a3
mov eax, esi
push eax
push str.final_name_:___s_
push 0xa
call fcn.004010eb
add esp, 0x10
mov eax, esi
push eax
call ebp
cmp eax, 0x104
jl 0x40a67b
push str.File_name_too_long__return_EBADOP_to_peer
push 0
call fcn.004010eb
push 4
push edi
call fcn.0040a0ad
add esp, 0x10
jmp 0x40a6d5
mov esi, dword [esp + 0x18]
xor ebx, ebx
push ebx
mov eax, esi
dec eax
neg eax
sbb eax, eax
add eax, 3
push 0x8000020
push eax
mov eax, esi
dec eax
neg eax
sbb eax, eax
push ebx
and eax, 0xc0000000
push 1
add eax, 0x80000000
push eax
lea eax, [esp + 0x254]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [edi + 0x24], eax
cmp eax, 0xffffffff
jne 0x40a6df
xor eax, eax
cmp esi, 1
setne al
push str.CreateFile
mov esi, edi
inc eax
push eax
call fcn.0040a3bb
pop ecx
pop ecx
mov eax, 0x3ec
jmp 0x40ab21
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0x204
lea esi, [edi + 0x4064]
push ebx
push esi
mov dword [edi + 0x448c], eax
call fcn.0040ed20
add esp, 0xc
push 6
call dword [sym.imp.WS2_32.dll_htons]
mov word [esi], ax
add esi, 2
mov dword [esp + 0x28], esi
cmp dword [0x429c00], 0
jne 0x40a72a
cmp dword [0x429c04], 0
je 0x40aa42
mov eax, dword [esp + 0x10]
cmp eax, 0x200
jge 0x40aa42
lea ebx, [edi + eax + 0x427a]
cmp byte [ebx], 0
jne 0x40a74b
inc dword [esp + 0x10]
jmp 0x40a714
push ebx
push str.Option_is___s_
push 0xc
call fcn.004010eb
add esp, 0xc
mov eax, dword [esp + 0x10]
cmp byte [edi + eax + 0x427a], 0
je 0x40a775
inc eax
cmp eax, 0x200
mov dword [esp + 0x10], eax
jl 0x40a75b
lea ecx, [eax + edi + 0x427b]
inc eax
cmp eax, 0x200
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
jge 0x40a714
mov eax, dword [esp + 0x10]
cmp byte [edi + eax + 0x427a], 0
je 0x40a7a6
inc eax
cmp eax, 0x200
mov dword [esp + 0x10], eax
jl 0x40a78c
cmp eax, 0x200
jge 0x40a714
mov eax, dword [esp + 0x10]
cmp byte [edi + eax + 0x427a], 0
jne 0x40a714
push ecx
push ebx
push str.Option___s_:_value___s_
push 0xc
call fcn.004010eb
add esp, 0x10
cmp dword [0x429c04], 0
jne 0x40a90f
push str.blksize
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40a89c
push dword [esp + 0x14]
call fcn.0040f13b
pop ecx
mov dword [esp + 0x20], eax
cmp eax, 8
jae 0x40a81d
push eax
push ebx
push str.__s__proposed_by_client__d__refused_by_Tftpd32
push 9
call fcn.004010eb
mov eax, dword [esp + 0x30]
add esp, 0x10
mov ecx, 0x4000
cmp eax, ecx
jbe 0x40a848
push ecx
push eax
push ebx
push str.__s__proposed_by_client__d__reply_with__d
push 2
call fcn.004010eb
mov eax, dword [esp + 0x34]
add esp, 0x14
mov dword [edi + 0x48], 0x4000
mov ecx, 0x4000
cmp eax, 8
jb 0x40a89c
cmp eax, ecx
ja 0x40a86c
push dword [esp + 0x14]
push ebx
push str.__s__changed_to___s_
push 9
call fcn.004010eb
mov eax, dword [esp + 0x30]
add esp, 0x10
mov dword [edi + 0x48], eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
call ebp
push dword [edi + 0x48]
lea esi, [esi + eax + 1]
push 0x423c84
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push esi
call ebp
lea esi, [esi + eax + 1]
mov dword [esp + 0x1c], 1
cmp dword [0x429c04], 0
jne 0x40a90f
push str.timeout
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40a90f
push dword [esp + 0x14]
call fcn.0040f13b
mov dword [esp + 0x24], eax
dec eax
pop ecx
cmp eax, 0xfe
ja 0x40a90f
push dword [esp + 0x14]
push ebx
push str.__s__changed_to___s_
push 9
call fcn.004010eb
add esp, 0x10
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
call ebp
push dword [esp + 0x14]
lea esi, [esi + eax + 1]
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
call ebp
lea esi, [esi + eax + 1]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x1c], 1
mov dword [edi + 0x4c], eax
push str.tsize
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40a99c
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push ebx
call ebp
cmp dword [esp + 0x18], 1
lea esi, [esi + eax + 1]
jne 0x40a959
push dword [edi + 0x448c]
push 0x423c84
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push esi
call ebp
lea esi, [esi + eax + 1]
mov eax, dword [edi + 0x448c]
jmp 0x40a97b
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
call ebp
push dword [esp + 0x14]
lea esi, [esi + eax + 1]
call fcn.0040f13b
pop ecx
mov dword [edi + 0x448c], eax
push dword [edi + 0x448c]
mov dword [edi + 0x58], eax
push ebx
push str.__s__changed_to___u_
push 0xa
call fcn.004010eb
add esp, 0x10
mov dword [esp + 0x1c], 1
cmp dword [0x429e88], 0
je 0x40a714
push str.udpport
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40a714
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x30]
push eax
push dword [edi + 0x20]
mov dword [esp + 0x30], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jl 0x40a714
push dword [esp + 0x2e]
call dword [sym.imp.WS2_32.dll_htons]
movzx eax, ax
push eax
push str.using_udpport_option______d
call fcn.0040c69d
pop ecx
pop ecx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push ebx
call ebp
push dword [esp + 0x2e]
lea esi, [esi + eax + 1]
call dword [sym.imp.WS2_32.dll_htons]
movzx eax, ax
push eax
push 0x423c84
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push esi
call ebp
lea esi, [esi + eax + 1]
mov eax, dword [0x429bf8]
mov dword [edi + 0x44], eax
mov dword [esp + 0x1c], 1
jmp 0x40a714
lea eax, [edi + 0x4064]
sub esi, eax
xor eax, eax
inc eax
lea ebx, [esi - 2]
mov dword [edi + 0x38], ebx
cmp dword [esp + 0x18], eax
jne 0x40aa61
xor ebp, ebp
cmp dword [esp + 0x1c], ebp
je 0x40aa65
xor ebp, ebp
xor eax, eax
mov ecx, dword [edi + 0x48]
mov dword [edi + 0x34], eax
mov dword [edi + 0x2c], eax
mov eax, dword [edi + 0x448c]
xor edx, edx
div ecx
xor edx, edx
inc eax
mov dword [edi + 0x30], eax
mov eax, dword [0x429bf0]
div ecx
mov dword [edi + 0x54], eax
cmp dword [esp + 0x1c], ebp
je 0x40ab12
push 0x200
lea eax, [esp + 0x40]
push ebp
push eax
call fcn.0040ed20
push ebx
push dword [esp + 0x38]
lea eax, [esp + 0x50]
push eax
call fcn.0040e730
add esi, 0xfffffffe
add esp, 0x18
xor eax, eax
cmp esi, ebp
jle 0x40aade
lea ecx, [esp + eax + 0x3c]
cmp byte [ecx], 0
jne 0x40aad9
mov edx, ebp
and dl, 1
inc ebp
test dl, dl
je 0x40aad4
push 0x2c
jmp 0x40aad6
push 0x3d
pop edx
mov byte [ecx], dl
inc eax
cmp eax, esi
jl 0x40aabd
lea eax, [esp + 0x3c]
push eax
push str.OACK:___s_
push 3
call fcn.004010eb
push dword [edi + 0x38]
push str.Size_of_OACK_string_:___d_
push 0xd
call fcn.004010eb
xor eax, eax
add esp, 0x18
cmp dword [esp + 0x18], 1
setne al
add eax, 0x3e8
jmp 0x40ab21
xor eax, eax
cmp dword [esp + 0x18], 1
setne al
add eax, 0x3ea
pop ebp
mov ecx, dword [esp + 0x440]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040e208
add esp, 0x438
ret