Function at 0x40d9d0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5062e8
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x5364d0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
test eax, eax
je 0x40dbf9
movzx ecx, word [eax]
cmp cx, 0x2d
je 0x40da19
cmp cx, 0x2f
jne 0x40dbf9
lea esi, [eax + 2]
movzx eax, word [esi]
cmp ax, 0x6c
je 0x40da91
cmp ax, 0x4c
je 0x40da91
mov ecx, dword [ebp + 0xc]
lea eax, [ebp + 8]
push eax
call fcn.00401640
mov edi, dword [ebp + 0x14]
lea ecx, [ebp + 8]
push ecx
mov dword [ebp - 4], 4
call int.0041ca50
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40da70
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp + 0x10]
mov edx, esi
call fcn.00401600
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor edi, edi
mov dword [ebp - 0x14], edi
mov ecx, dword [ebp + 0xc]
push edi
push 0x80
push 3
push edi
push 7
push SHChangeNotifyDeregister
push ecx
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x40daf1
call int.0041a490
test eax, eax
jl 0x40dbf9
lea edx, [ebp - 0x1c]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov dword [ebp - 0x20], esi
cmp esi, 0xffffffff
jne 0x40dafb
call int.0041a490
test eax, eax
jge 0x40daf8
test edi, edi
je 0x40dbf9
push edi
jmp 0x40dbf3
mov dword [ebp - 0x14], eax
mov edi, eax
jmp 0x40dac5
mov esi, dword [ebp - 0x20]
lea eax, [esi + 3]
push eax
mov byte [ebp - 4], 1
call fcn.004e3684
mov ebx, eax
add esp, 4
mov ecx, ebx
lea edx, [ebp - 0x14]
mov dword [ebp - 4], 0
call fcn.00417970
test edi, edi
je 0x40db30
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x14], 0
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov byte [esi + ebx], 0
mov byte [esi + ebx + 1], 0
mov byte [esi + ebx + 2], 0
cmp esi, 2
jb 0x40dba9
cmp byte [ebx], 0xff
jne 0x40dba9
cmp byte [ebx + 1], 0xfe
jne 0x40dba9
lea ecx, [ebx + 2]
mov esi, ecx
cmp word [esi], 0
je 0x40dba9
cmp word [esi], 0xd
jne 0x40dba0
cmp word [esi + 2], 0xa
jne 0x40dba0
lea eax, [ebp - 0x1c]
xor edx, edx
push eax
mov word [esi], dx
call fcn.00401640
mov edi, dword [ebp + 0x14]
lea ecx, [ebp - 0x1c]
push ecx
mov byte [ebp - 4], 3
call int.0041ca50
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0
call fcn.004016f0
lea ecx, [esi + 4]
add esi, 2
add esi, 2
cmp word [esi], 0
jne 0x40db63
push ebx
call fcn.004e4aa9
mov edx, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
add esp, 4
add edx, 4
call fcn.00401600
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40dbce
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret