Function at 0x4034a0
Capabilities:
Get file size

Disassembly:
sub esp, 0x218
push ebx
push ebp
mov ebp, dword [esp + 0x224]
push esi
push edi
mov dword [esp + 0x1c], 0
mov ax, word [ebp + 0x4268]
mov ebx, dword [ebp + 0x10]
push eax
mov dword [esp + 0x14], ebx
mov byte [ebp + 0x4469], 0
mov byte [ebp + 0x4468], 0
call sub.WSOCK32.dll_ntohs
mov di, ax
and edi, 0xffff
cmp edi, 1
mov dword [esp + 0x20], edi
je 0x403536
cmp edi, 2
je 0x403544
mov ecx, dword [ebp + 0x446c]
push edi
push str.Unexpected_request__d_from_peer
push ecx
push ebx
push 0
call fcn.004053b0
mov edx, dword [ebp + 0x446c]
push str.Returning_EBADOP_to_Peer
push edx
push ebx
push 0
call fcn.004053b0
push 4
push ebp
call fcn.00405310
add esp, 0x2c
mov eax, 0x3ec
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x218
ret
mov eax, dword [0x41263c]
test eax, eax
je 0x403544
call fcn.004068c0
mov eax, dword [ebp + 0x446c]
lea esi, [ebp + 0x426a]
push esi
push str.FileName_is___s_
push eax
push ebx
push 9
call fcn.004053b0
add esp, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, eax
push str.netascii
inc ebx
lea esi, [ebx + ebp + 0x426a]
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40360c
push str.ascii
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40360c
push str.mail
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4035b0
mov dword [ebp + 0x44], 2
jmp 0x403613
push str.octet
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x403603
push str.binary
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x403603
mov ecx, dword [ebp + 0x446c]
mov edx, dword [esp + 0x10]
push str.Uncorrect_message
push ecx
push edx
push 0
call fcn.004053b0
push 4
push ebp
call fcn.00405310
add esp, 0x18
mov eax, 0x3ec
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x218
ret
mov dword [ebp + 0x44], 0
jmp 0x403613
mov dword [ebp + 0x44], 1
mov eax, dword [ebp + 0x446c]
mov ecx, dword [esp + 0x10]
push esi
push str.Mode_is___s_
push eax
push ecx
push 0xc
call fcn.004053b0
add esp, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [ebx + eax + 1]
cmp edi, 1
mov dword [esp + 0x14], ebx
mov eax, str.Read
je 0x40364d
mov eax, str.Write
mov edx, dword [ebp + 0x446c]
push esi
lea esi, [ebp + 0x426a]
push esi
push eax
mov eax, dword [esp + 0x1c]
push str._s_request_for_file___s_._Mode__s
push edx
push eax
push 1
call fcn.004053b0
push esi
call fcn.004089b0
push edi
push esi
call fcn.00408a10
add esp, 0x28
test eax, eax
jne 0x4036bb
call fcn.00402c20
mov ecx, dword [ebp + 0x446c]
mov edx, dword [esp + 0x10]
push eax
push str.Error_:_EACCESS._Ext_error__s
push ecx
push edx
push 1
call fcn.004053b0
push 2
push ebp
call fcn.00405310
add esp, 0x1c
mov eax, 0x3ec
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x218
ret
mov eax, edi
mov ecx, edi
dec eax
push 0
neg eax
sbb eax, eax
push 0x8000020
add eax, 3
dec ecx
neg ecx
sbb ecx, ecx
push eax
and ecx, 0xc0000000
push 0
add ecx, 0x80000000
push 1
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 0x1c], eax
jne 0x403750
call fcn.00402c20
push eax
push str.CreateFile
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x34]
push str.error__d_in_system_call__s__s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [ebp + 0x446c]
mov edx, dword [ebp + 0x10]
lea eax, [esp + 0x3c]
push eax
push ecx
push edx
push 0
call fcn.004053b0
xor eax, eax
cmp edi, 1
setne al
inc eax
push eax
push ebp
call fcn.00405310
add esp, 0x2c
mov eax, 0x3ec
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x218
ret
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea esi, [ebp + 0x4054]
mov dword [ebp + 0x4478], eax
mov ecx, 0x81
xor eax, eax
mov edi, esi
push 6
rep stosd dword es:[edi], eax
call sub.WSOCK32.dll_htons
mov word [esi], ax
mov eax, dword [0x412634]
add esi, 2
test eax, eax
mov dword [esp + 0x24], esi
je 0x403a78
cmp ebx, 0x200
jge 0x403a78
mov al, byte [ebx + ebp + 0x426a]
lea edi, [ebx + ebp + 0x426a]
test al, al
jne 0x4037b6
inc ebx
mov dword [esp + 0x14], ebx
jmp 0x403a6b
mov ecx, dword [ebp + 0x446c]
mov edx, dword [esp + 0x10]
push edi
push str.Option_is___s_
push ecx
push edx
push 0xc
call fcn.004053b0
add esp, 0x14
mov al, byte [ebx + ebp + 0x426a]
test al, al
je 0x4037e6
inc ebx
cmp ebx, 0x200
jl 0x4037d2
mov dword [esp + 0x14], ebx
lea ebx, [ebx + ebp + 0x426b]
mov eax, dword [esp + 0x14]
inc eax
cmp eax, 0x200
mov dword [esp + 0x14], eax
jge 0x403a67
mov cl, byte [eax + ebp + 0x426a]
test cl, cl
je 0x403821
inc eax
cmp eax, 0x200
jl 0x403805
mov dword [esp + 0x14], eax
jmp 0x403a67
cmp eax, 0x200
mov dword [esp + 0x14], eax
jge 0x403a67
mov cl, byte [eax + ebp + 0x426a]
test cl, cl
jne 0x403a67
mov eax, dword [ebp + 0x446c]
mov ecx, dword [esp + 0x10]
push ebx
push edi
push str.Option___s_:_value___s_
push eax
push ecx
push 0xc
call fcn.004053b0
add esp, 0x18
push str.blksize
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x403940
push ebx
call fcn.00409cf5
add esp, 4
cmp eax, 8
mov dword [esp + 0x18], eax
jae 0x4038a3
mov edx, dword [ebp + 0x446c]
push eax
mov eax, dword [esp + 0x14]
push edi
push str.__s__proposed_by_client__d__refused_by_Tftpd32
push edx
push eax
push 9
call fcn.004053b0
mov eax, dword [esp + 0x30]
add esp, 0x18
cmp eax, 0x4000
jbe 0x4038d7
mov ecx, dword [ebp + 0x446c]
mov edx, dword [esp + 0x10]
push 0x4000
push eax
push edi
push str.__s__proposed_by_client__d__reply_with__d
push ecx
push edx
push 2
call fcn.004053b0
mov eax, dword [esp + 0x34]
add esp, 0x1c
mov dword [ebp + 0x3c], 0x4000
cmp eax, 8
jb 0x403940
cmp eax, 0x4000
ja 0x403907
mov eax, dword [ebp + 0x446c]
mov ecx, dword [esp + 0x10]
push ebx
push edi
push str.__s__changed_to___s_
push eax
push ecx
push 9
call fcn.004053b0
mov edx, dword [esp + 0x30]
add esp, 0x18
mov dword [ebp + 0x3c], edx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esi + eax + 1]
mov eax, dword [ebp + 0x3c]
push eax
push 0x411930
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esi + eax + 1]
mov dword [esp + 0x1c], 1
push str.timeout
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4039bb
push ebx
call fcn.00409cf5
add esp, 4
cmp eax, 1
mov dword [esp + 0x18], eax
jb 0x4039bb
cmp eax, 0xff
ja 0x4039bb
mov ecx, dword [ebp + 0x446c]
mov edx, dword [esp + 0x10]
push ebx
push edi
push str.__s__changed_to___s_
push ecx
push edx
push 9
call fcn.004053b0
add esp, 0x18
push edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esi + eax + 1]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esi + eax + 1]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], 1
mov dword [ebp + 0x40], eax
push str.tsize
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x403a67
push edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esi + eax + 1]
mov eax, dword [esp + 0x20]
cmp eax, 1
jne 0x403a17
mov ecx, dword [ebp + 0x4478]
push ecx
push 0x411930
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [ebp + 0x4478]
lea esi, [esi + eax + 1]
mov dword [ebp + 0x4c], edx
jmp 0x403a3c
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebx
lea esi, [esi + eax + 1]
call fcn.00409cf5
add esp, 4
mov dword [ebp + 0x4478], eax
mov dword [ebp + 0x4c], eax
mov eax, dword [ebp + 0x4478]
mov ecx, dword [ebp + 0x446c]
mov edx, dword [esp + 0x10]
push eax
push edi
push str.__s__changed_to___u_
push ecx
push edx
push 0xa
call fcn.004053b0
add esp, 0x18
mov dword [esp + 0x1c], 1
mov ebx, dword [esp + 0x14]
mov eax, dword [0x412634]
test eax, eax
jne 0x40378e
mov ebx, dword [esp + 0x20]
lea eax, [ebp + 0x4054]
sub esi, eax
cmp ebx, 1
lea eax, [esi - 2]
mov dword [ebp + 0x30], eax
jne 0x403a9b
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x403a9b
mov eax, ebx
jmp 0x403a9d
xor eax, eax
mov ecx, dword [ebp + 0x3c]
mov dword [ebp + 0x2c], eax
mov dword [ebp + 0x24], eax
mov eax, dword [ebp + 0x4478]
xor edx, edx
div ecx
xor edx, edx
inc eax
mov dword [ebp + 0x28], eax
mov eax, dword [0x412624]
div ecx
mov dword [ebp + 0x48], eax
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x403b71
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
lea eax, [esi - 2]
mov esi, dword [esp + 0x24]
mov ecx, eax
lea edi, [esp + 0x28]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor ecx, ecx
xor esi, esi
test eax, eax
jle 0x403b21
mov dl, byte [esp + ecx + 0x28]
test dl, dl
jne 0x403b1c
mov edx, esi
and dl, 1
inc esi
test dl, dl
mov edx, 0x2c
jne 0x403b18
mov edx, 0x3d
mov byte [esp + ecx + 0x28], dl
inc ecx
cmp ecx, eax
jl 0x403afc
mov ecx, dword [ebp + 0x446c]
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x28]
push eax
push str.OACK:___s_
push ecx
push esi
push 3
call fcn.004053b0
mov edx, dword [ebp + 0x30]
mov eax, dword [ebp + 0x446c]
push edx
push str.Size_of_OACK_string_:___d_
push eax
push esi
push 0xd
call fcn.004053b0
add esp, 0x28
xor eax, eax
cmp ebx, 1
pop edi
pop esi
setne al
pop ebp
add eax, 0x3e8
pop ebx
add esp, 0x218
ret
xor eax, eax
cmp ebx, 1
pop edi
pop esi
setne al
pop ebp
add eax, 0x3ea
pop ebx
add esp, 0x218
ret