Function at 0x403dd0
Capabilities:
Get file size

Disassembly:
sub esp, 0x218
push ebx
push ebp
mov ebp, dword [esp + 0x224]
push esi
push edi
mov dword [esp + 0x18], 0
mov ax, word [ebp + 0x4268]
mov esi, dword [ebp + 0x10]
push eax
mov dword [esp + 0x14], esi
mov byte [ebp + 0x4469], 0
mov byte [ebp + 0x4468], 0
call sub.WSOCK32.dll_ntohs
and eax, 0xffff
cmp eax, 1
mov dword [esp + 0x20], eax
je 0x403e62
cmp eax, 2
je 0x403e70
mov ecx, dword [ebp + 0x446c]
push eax
push str.Unexpected_request__d_from_peer
push ecx
push esi
push 0
call fcn.00407550
mov edx, dword [ebp + 0x446c]
push str.Returning_EBADOP_to_Peer
push edx
push esi
push 0
call fcn.00407550
push 4
push ebp
call fcn.00405c90
add esp, 0x2c
mov eax, 0x3ec
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x218
ret
mov eax, dword [0x41382c]
test eax, eax
je 0x403e70
call fcn.004070d0
mov eax, dword [ebp + 0x446c]
lea edi, [ebp + 0x426a]
push edi
push str.FileName_is___s_
push eax
push esi
push 9
call fcn.00407550
add esp, 0x14
push edi
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 0x403f38
push str.ascii
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x403f38
push str.mail
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x403edc
mov dword [ebp + 0x44], 2
jmp 0x403f3f
push str.octet
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x403f2f
push str.binary
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x403f2f
mov ecx, dword [ebp + 0x446c]
mov edx, dword [esp + 0x10]
push str.Uncorrect_message
push ecx
push edx
push 0
call fcn.00407550
push 4
push ebp
call fcn.00405c90
add esp, 0x18
mov eax, 0x3ec
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x218
ret
mov dword [ebp + 0x44], 0
jmp 0x403f3f
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.00407550
add esp, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [ebx + eax + 1]
mov eax, dword [esp + 0x20]
cmp eax, 1
mov dword [esp + 0x14], ebx
mov eax, str.Read
je 0x403f7d
mov eax, str.Write
mov edx, dword [ebp + 0x446c]
push esi
mov esi, dword [esp + 0x14]
push edi
push eax
push str._s_request_for_file___s_._Mode__s
push edx
push esi
push 1
call fcn.00407550
push edi
call fcn.004096d0
mov eax, dword [ebp + 0x446c]
push edi
push str.final_name_:___s_
push eax
push esi
push 0xa
call fcn.00407550
mov esi, dword [esp + 0x54]
push esi
push edi
call fcn.00409740
add esp, 0x3c
test eax, eax
jne 0x403ffe
call fcn.004031a0
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.00407550
push 2
push ebp
call fcn.00405c90
add esp, 0x1c
mov eax, 0x3ec
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x218
ret
mov eax, esi
mov ecx, esi
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 edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 0x1c], eax
jne 0x404093
call fcn.004031a0
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.00407550
xor eax, eax
cmp esi, 1
setne al
inc eax
push eax
push ebp
call fcn.00405c90
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 [0x413824]
add esi, 2
test eax, eax
mov dword [esp + 0x24], esi
je 0x4043bb
cmp ebx, 0x200
jge 0x4043bb
mov al, byte [ebx + ebp + 0x426a]
lea edi, [ebx + ebp + 0x426a]
test al, al
jne 0x4040f9
inc ebx
mov dword [esp + 0x14], ebx
jmp 0x4043ae
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.00407550
add esp, 0x14
mov al, byte [ebx + ebp + 0x426a]
test al, al
je 0x404129
inc ebx
cmp ebx, 0x200
jl 0x404115
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 0x4043aa
mov cl, byte [eax + ebp + 0x426a]
test cl, cl
je 0x404164
inc eax
cmp eax, 0x200
jl 0x404148
mov dword [esp + 0x14], eax
jmp 0x4043aa
cmp eax, 0x200
mov dword [esp + 0x14], eax
jge 0x4043aa
mov cl, byte [eax + ebp + 0x426a]
test cl, cl
jne 0x4043aa
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.00407550
add esp, 0x18
push str.blksize
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x404283
push ebx
call fcn.0040aa84
add esp, 4
cmp eax, 8
mov dword [esp + 0x1c], eax
jae 0x4041e6
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.00407550
mov eax, dword [esp + 0x34]
add esp, 0x18
cmp eax, 0x4000
jbe 0x40421a
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.00407550
mov eax, dword [esp + 0x38]
add esp, 0x1c
mov dword [ebp + 0x3c], 0x4000
cmp eax, 8
jb 0x404283
cmp eax, 0x4000
ja 0x40424a
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.00407550
mov edx, dword [esp + 0x34]
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 0x412ad0
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 + 0x18], 1
push str.timeout
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4042fe
push ebx
call fcn.0040aa84
add esp, 4
cmp eax, 1
mov dword [esp + 0x1c], eax
jb 0x4042fe
cmp eax, 0xff
ja 0x4042fe
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.00407550
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 + 0x1c]
mov dword [esp + 0x18], 1
mov dword [ebp + 0x40], eax
push str.tsize
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4043aa
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 0x40435a
mov ecx, dword [ebp + 0x4478]
push ecx
push 0x412ad0
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 0x40437f
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.0040aa84
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.00407550
add esp, 0x18
mov dword [esp + 0x18], 1
mov ebx, dword [esp + 0x14]
mov eax, dword [0x413824]
test eax, eax
jne 0x4040d1
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 0x4043de
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x4043de
mov eax, ebx
jmp 0x4043e0
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 [0x413814]
div ecx
mov dword [ebp + 0x48], eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4044b4
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 0x404464
mov dl, byte [esp + ecx + 0x28]
test dl, dl
jne 0x40445f
mov edx, esi
and dl, 1
inc esi
test dl, dl
mov edx, 0x2c
jne 0x40445b
mov edx, 0x3d
mov byte [esp + ecx + 0x28], dl
inc ecx
cmp ecx, eax
jl 0x40443f
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.00407550
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.00407550
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