Function at 0x40a443
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 0x40a4b8
cmp esi, 2
je 0x40a4b8
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.0040a095
add esp, 0x1c
mov eax, 0x3ec
jmp 0x40ab0a
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [edi + 0x427a]
push ebx
call ebp
cmp eax, 0x104
jge 0x40a64a
push 0x25
push ebx
call fcn.0040ec40
pop ecx
pop ecx
test eax, eax
je 0x40a4f4
push str.Error:_Tftpd32_does_not_handle_filenames_with_a_percent_sign
push 1
call fcn.004010eb
push 2
jmp 0x40a658
push ebx
push str.FileName_is___s_
push 9
call fcn.004010eb
add esp, 0xc
cmp esi, 1
jne 0x40a517
cmp dword [0x429c0c], 0
je 0x40a517
call fcn.0040b5c4
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 0x40a59d
push str.ascii
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40a59d
push str.mail
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40a55d
mov dword [edi + 0x50], 2
jmp 0x40a5a4
push str.octet
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40a597
push str.binary
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40a597
push str.OCTET
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40a597
push str.Uncorrect_message
jmp 0x40a64f
and dword [edi + 0x50], 0
jmp 0x40a5a4
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 0x40a5d0
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.0040a130
push dword [esp + 0x30]
push esi
call fcn.00409fe1
add esp, 0x20
test eax, eax
jne 0x40a61f
call fcn.0040c61e
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.0040a095
add esp, 0x18
jmp 0x40a6bd
push esi
lea esi, [esp + 0x240]
call fcn.0040a18b
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 0x40a663
push str.File_name_too_long__return_EBADOP_to_peer
push 0
call fcn.004010eb
push 4
push edi
call fcn.0040a095
add esp, 0x10
jmp 0x40a6bd
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 0x40a6c7
xor eax, eax
cmp esi, 1
setne al
push str.CreateFile
mov esi, edi
inc eax
push eax
call fcn.0040a3a3
pop ecx
pop ecx
mov eax, 0x3ec
jmp 0x40ab09
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.0040ed00
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 0x40a712
cmp dword [0x429c04], 0
je 0x40aa2a
mov eax, dword [esp + 0x10]
cmp eax, 0x200
jge 0x40aa2a
lea ebx, [edi + eax + 0x427a]
cmp byte [ebx], 0
jne 0x40a733
inc dword [esp + 0x10]
jmp 0x40a6fc
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 0x40a75d
inc eax
cmp eax, 0x200
mov dword [esp + 0x10], eax
jl 0x40a743
lea ecx, [eax + edi + 0x427b]
inc eax
cmp eax, 0x200
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
jge 0x40a6fc
mov eax, dword [esp + 0x10]
cmp byte [edi + eax + 0x427a], 0
je 0x40a78e
inc eax
cmp eax, 0x200
mov dword [esp + 0x10], eax
jl 0x40a774
cmp eax, 0x200
jge 0x40a6fc
mov eax, dword [esp + 0x10]
cmp byte [edi + eax + 0x427a], 0
jne 0x40a6fc
push ecx
push ebx
push str.Option___s_:_value___s_
push 0xc
call fcn.004010eb
add esp, 0x10
cmp dword [0x429c04], 0
jne 0x40a8f7
push str.blksize
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40a884
push dword [esp + 0x14]
call fcn.0040f11b
pop ecx
mov dword [esp + 0x20], eax
cmp eax, 8
jae 0x40a805
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 0x40a830
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 0x40a884
cmp eax, ecx
ja 0x40a854
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 0x40a8f7
push str.timeout
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40a8f7
push dword [esp + 0x14]
call fcn.0040f11b
mov dword [esp + 0x24], eax
dec eax
pop ecx
cmp eax, 0xfe
ja 0x40a8f7
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 0x40a984
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 0x40a941
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 0x40a963
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.0040f11b
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 0x40a6fc
push str.udpport
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40a6fc
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 0x40a6fc
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.0040c685
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 0x40a6fc
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 0x40aa49
xor ebp, ebp
cmp dword [esp + 0x1c], ebp
je 0x40aa4d
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 0x40aafa
push 0x200
lea eax, [esp + 0x40]
push ebp
push eax
call fcn.0040ed00
push ebx
push dword [esp + 0x38]
lea eax, [esp + 0x50]
push eax
call fcn.0040e710
add esi, 0xfffffffe
add esp, 0x18
xor eax, eax
cmp esi, ebp
jle 0x40aac6
lea ecx, [esp + eax + 0x3c]
cmp byte [ecx], 0
jne 0x40aac1
mov edx, ebp
and dl, 1
inc ebp
test dl, dl
je 0x40aabc
push 0x2c
jmp 0x40aabe
push 0x3d
pop edx
mov byte [ecx], dl
inc eax
cmp eax, esi
jl 0x40aaa5
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 0x40ab09
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.0040e1f0
add esp, 0x438
ret